Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Support for mutiple statements and REPLACE

Open
#252 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
32/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript, sqlite
Domain
databases

Research direction

No source file, test, or entry point is named. Start by reproducing both SQL snippets in sql.js and compare how the multiple statements, INSERT OR REPLACE, and last_insert_rowid() cases are executed. Done means the expected behavior is established and the relevant behavior or documentation is updated accordingly.

Written by the indexing model from the issue text.

Description

I'm a little confused.

When I try to run this, I get 0 results:

INSERT OR REPLACE INTO driver (license_plate, country, province, insert_date) VALUES (:license_plate, :country, :province, '2018-10-17T08:51:34.116Z'); SELECT * FROM driver WHERE license_plate = :license_plate;

But when I try

INSERT INTO driver (license_plate, country, province, insert_date) VALUES (:license_plate, :country, :province, '2018-10-17T08:51:34.116Z'); SELECT * FROM driver WHERE id = last_insert_rowid()

I get 1 result. I don't understand why

Dominant language
JavaScript
Stars
13.7k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sql-js/sql.js

All issues in sql-js/sql.js

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.