Skip to content

whereIn doesn't work with more than one value in 'values' on pg #101

@mkozjak

Description

@mkozjak

(haven't tested other drivers)

Throws:
{"name":"error","length":84,"severity":"ERROR","code":"42601","position":"423","file":"scan.l","line":"1053","routine":"scanner_yyerror"}

when this piece of code is used:

myModel.using(connection)
.whereIn('nameofcolumn', ['one', 'two'])
.all....

Managed to debug up to _runSql3, where it gave:

text: select t0."nameofcolumn1" AS c0, t0."nameofcolumn2" AS c1 FROM tablename1 AS t0 WHERE t0.nameofcolumn IN ($1,?)

values: [ 'one', 'two' ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions