| 165 | // displayed by console.log(), albeit as [Getter]). |
| 166 | template <typename T, Napi::Value (*method)(const Napi::CallbackInfo&)> |
| 167 | void SetInstanceGetter(Napi::Object obj, const char* name, Addon* addon) { |
| 168 | napi_property_descriptor desc = {}; |
| 169 | desc.utf8name = name; |
| 170 | desc.getter = TypeSafeCallback<T, method>; |
| 171 | desc.attributes = napi_enumerable; |
| 172 | desc.data = addon; |
| 173 | napi_status status = napi_define_properties(obj.Env(), obj, 1, &desc); |
| 174 | assert(status == napi_ok || status == napi_cannot_run_js); ((void)status); |
| 175 | } |
| 176 | |
| 177 | // Determines whether to skip the given character at the start of an SQL string. |
| 178 | inline bool IS_SKIPPED(char c) { |
nothing calls this directly
no outgoing calls
no test coverage detected