MCPcopy Create free account
hub / github.com/WiseLibs/better-sqlite3 / ConfigureURI

Method ConfigureURI

src/addon.cpp:17–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15 }
16
17 static void ConfigureURI() {
18 static std::once_flag init_flag;
19 std::call_once(init_flag, [](){
20 const char* env = getenv("SQLITE_USE_URI");
21 if (env != NULL) {
22 if (strcmp(env, "1") == 0) {
23 int status = sqlite3_config(SQLITE_CONFIG_URI, 1);
24 assert(status == SQLITE_OK); ((void)status);
25 } else if (strcmp(env, "0") == 0) {
26 int status = sqlite3_config(SQLITE_CONFIG_URI, 0);
27 assert(status == SQLITE_OK); ((void)status);
28 }
29 }
30 });
31 }
32
33 static NODE_METHOD(JS_initialize) {
34 REQUIRE_ARGUMENT_FUNCTION(first, Napi::Function SqliteError);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected