-
-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
https://github.com/margelo/react-native-nitro-sqlite?tab=readme-ov-file#batch-operation
const commands = [
{query: 'CREATE TABLE TEST (id integer)'},
{query: 'INSERT INTO TEST (id) VALUES (?)', params: [value1]},
{query: 'INSERT INTO TEST (id) VALUES (?)', params: [value2]},
{query: 'INSERT INTO TEST (id) VALUES (?)', params: [value3, value4, value5, value6]},
];
const res = NitroSQLite.executeSqlBatch('myDatabase', commands);
console.log(`Batch affected ${result.rowsAffected} rows`);
Specifically this.
{query: 'INSERT INTO TEST (id) VALUES (?)', params: [value3, value4, value5, value6]}
Is this inserting 4 rows at once? If so, how would it look with multiple columns?
Metadata
Metadata
Assignees
Labels
No labels