Skip to content

db.value contains #76

Open
Open
@sneshvadvdl

Description

@sneshvadvdl

Hello, we were trying to using scalasql on a new project and I have the following. Using the example from the tutorial below, oracle expects the where clause to be WHERE (city0.name IN (?, ?, ?)). Is there a way i can get this to work?

thanks

val query = City.select
.filter(c => db.values(Seq("Singapore", "Kuala Lumpur", "Jakarta")).contains(c.name))
.map(_.countryCode)

db.renderSql(query) ==> """
SELECT city0.countrycode AS res
FROM city city0
WHERE (city0.name IN (VALUES (?), (?), (?)))
"""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions