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?
https://github.com/margelo/react-native-nitro-sqlite?tab=readme-ov-file#batch-operation
Specifically this.
Is this inserting 4 rows at once? If so, how would it look with multiple columns?