MCPcopy Create free account
hub / github.com/acl-dev/acl / db_sqlite

Method db_sqlite

lib_acl_cpp/src/db/db_sqlite.cpp:545–565  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

543}
544
545db_sqlite::db_sqlite(const char* dbfile, const char* charset /* ="utf-8" */)
546: db_(NULL)
547, dbfile_(dbfile)
548{
549 if (charset && strcasecmp(charset, "utf-8") !=0) {
550 charset_ = charset;
551 conv_ = NEW charset_conv();
552 } else {
553 conv_ = NULL;
554 }
555
556 acl_assert(dbfile && *dbfile);
557#ifdef HAS_SQLITE_DLL
558 acl_pthread_once(&__sqlite_once, __sqlite_dll_load);
559 if (__sqlite_dll == NULL) {
560 const char* ptr = acl::db_handle::get_loadpath();
561 logger_fatal("Load mysql error: %s, path=%s",
562 acl_dlerror(), ptr ? ptr : "unkonwn");
563 }
564#endif
565}
566
567db_sqlite::~db_sqlite(void)
568{

Callers

nothing calls this directly

Calls 3

acl_pthread_onceFunction · 0.85
acl_dlerrorFunction · 0.85
charset_convClass · 0.50

Tested by

no test coverage detected