-
-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathsqlbatchexecutor.h
More file actions
25 lines (21 loc) · 709 Bytes
/
sqlbatchexecutor.h
File metadata and controls
25 lines (21 loc) · 709 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/**
* SQL Batch execution implementation using default sqliteBridge implementation
*/
#include "JSIHelper.h"
#include "sqliteBridge.h"
using namespace std;
using namespace facebook;
struct QuickQueryArguments
{
string sql;
shared_ptr<vector<QuickValue>> params;
};
/**
* Local Helper method to translate JSI objects QuickQueryArguments datastructure
* MUST be called in the JavaScript Thread
*/
void jsiBatchParametersToQuickArguments(jsi::Runtime &rt, jsi::Array const &batchParams, vector<QuickQueryArguments> *commands);
/**
* Execute a batch of commands in a exclusive transaction
*/
SequelBatchOperationResult sqliteExecuteBatch(std::string dbName, vector<QuickQueryArguments> *commands);