Skip to content

[BUG]: inArray in prepared statements causes syntax error with Planetscale #1415

Open
@geauser

Description

@geauser

What version of drizzle-orm are you using?

0.28.6

What version of drizzle-kit are you using?

0.19.13

Describe the Bug

When using inArray in a prepared statement in Planetscale it throws a syntax error:

const prepared = await db.select().from(table).where(inArray(table.field, sql.placeholder('fields'))).prepare();
await prepared.execute({ fields: ['SOME_VALUE_IN_ARRAY'] });

I get an error like this:

syntax error at position 256 near 'SOME_VALUE_IN_ARRAY'

Expected behavior

No response

Environment & setup

No response

Metadata

Metadata

Assignees

Labels

docsImprovements or additions to documentationdocs/improvementspriorityWill be worked on next

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions