MCPcopy Create free account
hub / github.com/davisking/dlib / open

Method open

dlib/sqlite/sqlite.h:68–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 }
67
68 void open (
69 const std::string& file
70 )
71 {
72 filename = file;
73 sqlite3* ptr = 0;
74 int status = sqlite3_open(file.c_str(), &ptr);
75 db.reset(ptr, impl::db_deleter());
76 if (status != SQLITE_OK)
77 {
78 throw sqlite_error(sqlite3_errmsg(db.get()));
79 }
80 }
81
82 const std::string& get_database_filename (
83 ) const

Callers

nothing calls this directly

Calls 4

db_deleterClass · 0.85
sqlite_errorClass · 0.70
resetMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected