denodrivers / denodrivers/mysql

Pass an array as parameter

Open
#70 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
264
Forks
64
PR merge metrics
No merged PRs in 30d

Description

Hello,

It is possible to pass an array as parameter?
The query bellow returns the error: `Error: Operand should contain 1 column(s)`.

```typescript
const ids = [1, 2, 3];
return client.query('SELECT * FROM mytable WHERE id in (?)', [ids]);
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the client.query parameter-binding entry point shown in the example and reproduce the SELECT with ids = [1, 2, 3]. Determine how array parameters are handled for the IN (?) placeholder; done means the query accepts the array and returns the matching rows without the operand-column error.

Written by the indexing model from the issue text.

Assessment

Tech stack
deno, mysql, typescript
Domain
database
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.