1 #ifndef cetlib_sqlite_Connection_h 2 #define cetlib_sqlite_Connection_h 53 template <std::
size_t NColumns,
typename Row>
58 template <
typename DatabaseOpenPolicy>
60 std::shared_ptr<std::recursive_mutex>,
66 std::shared_ptr<std::recursive_mutex>
mutex_{
nullptr};
69 template <
typename DatabaseOpenPolicy>
71 std::shared_ptr<std::recursive_mutex> spmutex,
72 DatabaseOpenPolicy policy)
80 template <std::
size_t NColumns,
typename Row>
86 std::lock_guard sentry{*
mutex_};
88 for (
auto const&
r : buffer) {
90 int const rc{sqlite3_step(insertStmt)};
91 if (
rc != SQLITE_DONE) {
94 sqlite3_reset(insertStmt);
std::shared_ptr< std::recursive_mutex > mutex_
struct sqlite3_stmt sqlite3_stmt
int flush_no_throw(std::vector< Row > const &buffer, sqlite3_stmt *&insertStmt)
static void bind(sqlite3_stmt *s, TUP const &t)