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

Method Bind

src/util/binder.cpp:11–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9 }
10
11 bool Bind(NODE_ARGUMENTS info, int argc, Statement* stmt) {
12 assert(anon_index == 0);
13 Napi::Env env = info.Env();
14 Result result = BindArgs(info, argc, stmt);
15 if (success && result.count != param_count) {
16 if (result.count < param_count) {
17 if (!result.bound_object && stmt->GetBindMap(env).GetSize()) {
18 Fail(ThrowTypeError, env, "Missing named parameters");
19 } else {
20 Fail(ThrowRangeError, env, "Too few parameter values were provided");
21 }
22 } else {
23 Fail(ThrowRangeError, env, "Too many parameter values were provided");
24 }
25 }
26 return success;
27 }
28
29private:
30

Callers

nothing calls this directly

Calls 1

GetSizeMethod · 0.80

Tested by

no test coverage detected