electric-sql / electric-sql/pglite
Error:[tyeporm migration] cannot insert multiple commands into a prepared statement
- Dominant language
- TypeScript
- Stars
- 16k
- Forks
- 442
- Avg merge
- 20h 19m
- Merged PRs (30d)
- 7
Description
Summary
If I run typeorm migration, i have cannot insert multiple commands into a prepared statement, I dig into typeorm code and find out it use `driver's query `function. and pglite `query` seems not support multiple commands, whilte `exec` function support multiple command.
Example
```
const db = new PGlite()
// typeorm uses query function in migration code.
await db.query(`
CREATE TABLE IF NOT EXISTS test1 (
id SERIAL PRIMARY KEY,
name TEXT
);
CREATE TABLE IF NOT EXISTS test2 (
id SERIAL PRIMARY KEY,
name TEXT
);
`)
})
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.