| 10 | const napi_type_tag Database::TYPE_TAG = RandomTypeTag(); |
| 11 | |
| 12 | Database::Database(const Napi::CallbackInfo& info) : |
| 13 | Napi::ObjectWrap<Database>(info), |
| 14 | db_handle(NULL), |
| 15 | open(false), |
| 16 | busy(false), |
| 17 | safe_ints(false), |
| 18 | unsafe_mode(false), |
| 19 | was_js_error(false), |
| 20 | has_logger(false), |
| 21 | iterators(0), |
| 22 | addon(static_cast<Addon*>(info.Data())), |
| 23 | logger(), |
| 24 | stmts(), |
| 25 | backups() { |
| 26 | napi_status status = napi_type_tag_object(info.Env(), info.This(), &TYPE_TAG); |
| 27 | assert(status == napi_ok); ((void)status); |
| 28 | JS_new(info); |
| 29 | } |
| 30 | |
| 31 | Database::~Database() { |
| 32 | if (open) addon->dbs.erase(this); |
nothing calls this directly
no outgoing calls
no test coverage detected