Batch
Batch
client.sqlite.batch(SqliteBatchParamsbody, RequestOptionsoptions?): columnsarraycolumnTypesarrayrowsarrayrowsAffectednumberlastInsertRowidunionSqliteBatchResponse
post/v1/sqlite/batch
Execute a batch of SQLite statements and return results for all of them
Parameters
bodystatementsarraymodeunionSqliteBatchParams
Returns
SqliteBatchResponsealias
Array of results from the statements executed
import ValTown from '@valtown/sdk';
const client = new ValTown({
bearerToken: 'My Bearer Token',
});
const resultSets = await client.sqlite.batch({ statements: ['SELECT 1;'], mode: 'read' });
console.log(resultSets);
200 Example
[
{
"columns": [
"string"
],
"columnTypes": [
"string"
],
"rows": [
[
{}
]
],
"rowsAffected": 0,
"lastInsertRowid": "string"
}
]