| 143 | } |
| 144 | |
| 145 | bool DB::insert(String tableName, const std::deque<std::vector<Own<Value>>>& rows) { |
| 146 | bool success = false; |
| 147 | _thread->runInMainSync([&]() { |
| 148 | success = transactionUnsafe(_database.get(), [&](SQLite::Database* db) { |
| 149 | insertUnsafe(db, tableName, rows); |
| 150 | }); |
| 151 | }); |
| 152 | return success; |
| 153 | } |
| 154 | |
| 155 | bool DB::transaction(const std::function<void(SQLite::Database*)>& sqls) { |
| 156 | bool success = false; |
nothing calls this directly
no test coverage detected