planetscale / planetscale/database-js
Support for multiple statements?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
Apologies if this is already supported, but would it be possible to get the ability to run multiple statements in one request? Something like
await conn.execute("INSERT INTO foo(x) VALUES(12); SELECT LAST_INSERT_ID() as id;")
Obviously you can achieve that with separate queries, but that would require blocking until the insert is done, and then blocking while you grab the inserted id.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the conn.execute entry point shown in the issue and read the comment thread to understand the intended multiple-statement behavior and constraints. Determine how one request should return results from both statements, then verify that the insert and LAST_INSERT_ID example works without requiring separate queries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, typescript
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100