-
-
Save petehunt/6a889fc8d01e14fb1667a1e7f9cb0ffd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create table first (id integer primary key); | |
create table second (id integer primary key); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import connect, { sql } from "@databases/sqlite"; | |
async function main() { | |
const db = await connect(); | |
await db.query(sql.file(__dirname + "/bug.sql")); | |
// Following line throws error: "SQLITE_ERROR: no such table: second" | |
await db.query(sql`select * from second`); | |
} | |
main().catch((e) => { | |
console.error(e); | |
process.exit(1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment