Closed psychemedia closed 3 months ago
We can handle multlupe query statements with the .exec() call https://github.com/electric-sql/pglite/blob/main/docs/docs/api.md#exec
.exec()
await pg.exec(` CREATE TABLE IF NOT EXISTS test ( id SERIAL PRIMARY KEY, name TEXT ); INSERT INTO test (name) VALUES ('test'); SELECT * FROM test; `)
[ { affectedRows: 0 }, { affectedRows: 1 }, { rows: [ { id: 1, name: 'test' } ] affectedRows: 0, fields: [ { name: 'id', dataTypeID: '23' }, { name: 'name', dataTypeID: '25' }, ] } ]
We can handle multlupe query statements with the
.exec()
call https://github.com/electric-sql/pglite/blob/main/docs/docs/api.md#exec