Lines Matching refs:jbn
444 JBN jbn = data; in jn_ejdb2impl_finalize() local
445 jn_jbn_destroy(env, &jbn); in jn_ejdb2impl_finalize()
457 JBN jbn = 0; in jn_ejdb2impl_ctor() local
481 rc = jb_jbn_alloc(&jbn); in jn_ejdb2impl_ctor()
502 jbn->opts.kv.path = jn_string_at(env, jbn->pool, varr, false, false, argc++, &rc); in jn_ejdb2impl_ctor()
504 jbn->opts.kv.oflags = jn_int_at(env, varr, false, false, argc++, &rc); in jn_ejdb2impl_ctor()
506 jbn->opts.kv.wal.enabled = jn_bool_at(env, varr, false, false, argc++, &rc); in jn_ejdb2impl_ctor()
508 jbn->opts.kv.wal.check_crc_on_checkpoint = jn_bool_at(env, varr, true, true, argc++, &rc); in jn_ejdb2impl_ctor()
510 jbn->opts.kv.wal.checkpoint_buffer_sz = jn_int_at(env, varr, true, false, argc++, &rc); in jn_ejdb2impl_ctor()
512 jbn->opts.kv.wal.checkpoint_timeout_sec = jn_int_at(env, varr, true, false, argc++, &rc); in jn_ejdb2impl_ctor()
514 jbn->opts.kv.wal.savepoint_timeout_sec = jn_int_at(env, varr, true, false, argc++, &rc); in jn_ejdb2impl_ctor()
516 jbn->opts.kv.wal.wal_buffer_sz = jn_int_at(env, varr, true, false, argc++, &rc); in jn_ejdb2impl_ctor()
518 jbn->opts.document_buffer_sz = jn_int_at(env, varr, true, false, argc++, &rc); in jn_ejdb2impl_ctor()
520 jbn->opts.sort_buffer_sz = jn_int_at(env, varr, true, false, argc++, &rc); in jn_ejdb2impl_ctor()
522 jbn->opts.http.enabled = jn_bool_at(env, varr, true, true, argc++, &rc); in jn_ejdb2impl_ctor()
524 jbn->opts.http.access_token = jn_string_at(env, jbn->pool, varr, true, false, argc++, &rc); in jn_ejdb2impl_ctor()
526 jbn->opts.http.bind = jn_string_at(env, jbn->pool, varr, true, false, argc++, &rc); in jn_ejdb2impl_ctor()
528 jbn->opts.http.max_body_size = jn_int_at(env, varr, true, false, argc++, &rc); in jn_ejdb2impl_ctor()
530 jbn->opts.http.port = jn_int_at(env, varr, true, false, argc++, &rc); in jn_ejdb2impl_ctor()
532 jbn->opts.http.read_anon = jn_bool_at(env, varr, true, true, argc++, &rc); in jn_ejdb2impl_ctor()
535 jbn->opts.kv.file_lock_fail_fast = true; in jn_ejdb2impl_ctor()
536 jbn->opts.no_wal = !jbn->opts.kv.wal.enabled; in jn_ejdb2impl_ctor()
537 jbn->opts.http.blocking = false; in jn_ejdb2impl_ctor()
538 …jbn->opts.http.access_token_len = jbn->opts.http.access_token ? strlen(jbn->opts.http.access_token… in jn_ejdb2impl_ctor()
554 &jbn->resultset_tsf // napi_threadsafe_function* result in jn_ejdb2impl_ctor()
558 JNGO(ns, env, napi_wrap(env, this, jbn, jn_ejdb2impl_finalize, 0, 0), finish); in jn_ejdb2impl_ctor()
563 if (jbn) { in jn_ejdb2impl_ctor()
564 jn_jbn_destroy(env, &jbn); in jn_ejdb2impl_ctor()
641 JBN jbn = work->unwrapped; in jn_open_execute() local
642 if (jbn->db) { in jn_open_execute()
645 work->rc = ejdb_open(&jbn->opts, &jbn->db); in jn_open_execute()
675 JBN jbn = work->unwrapped; in jn_close_execute() local
676 if (!jbn->db) { in jn_close_execute()
679 work->rc = ejdb_close(&jbn->db); in jn_close_execute()
684 JBN jbn = work->unwrapped; in jn_close_complete() local
692 if (jbn->resultset_tsf) { in jn_close_complete()
693 napi_release_threadsafe_function(jbn->resultset_tsf, napi_tsfn_abort); in jn_close_complete()
694 jbn->resultset_tsf = 0; in jn_close_complete()
722 JBN jbn = work->unwrapped; in jn_put_execute() local
723 if (!jbn->db) { in jn_put_execute()
734 work->rc = ejdb_patch(jbn->db, wdata->coll, wdata->json, wdata->id); in jn_put_execute()
736 work->rc = ejdb_put(jbn->db, wdata->coll, jbl, wdata->id); in jn_put_execute()
739 work->rc = ejdb_put_new(jbn->db, wdata->coll, jbl, &wdata->id); in jn_put_execute()
838 JBN jbn = work->unwrapped; in jn_get_execute() local
839 if (!jbn->db) { in jn_get_execute()
844 work->rc = ejdb_get(jbn->db, wdata->coll, wdata->id, &wdata->jbl); in jn_get_execute()
917 JBN jbn = work->unwrapped; in jn_del_execute() local
918 if (!jbn->db) { in jn_del_execute()
923 work->rc = ejdb_del(jbn->db, wdata->coll, wdata->id); in jn_del_execute()
983 JBN jbn = work->unwrapped; in jn_rename_collection_execute() local
984 if (!jbn->db) { in jn_rename_collection_execute()
989 work->rc = ejdb_rename_collection(jbn->db, wdata->old_name, wdata->new_name); in jn_rename_collection_execute()
1047 JBN jbn = work->unwrapped; in jn_info_execute() local
1048 if (!jbn->db) { in jn_info_execute()
1053 work->rc = ejdb_get_meta(jbn->db, &wdata->jbl); in jn_info_execute()
1123 JBN jbn = work->unwrapped; in jn_index_execute() local
1124 if (!jbn->db) { in jn_index_execute()
1130 work->rc = ejdb_remove_index(jbn->db, wdata->coll, wdata->path, wdata->mode); in jn_index_execute()
1132 work->rc = ejdb_ensure_index(jbn->db, wdata->coll, wdata->path, wdata->mode); in jn_index_execute()
1196 JBN jbn = work->unwrapped; in jn_rmcoll_execute() local
1197 if (!jbn->db) { in jn_rmcoll_execute()
1202 work->rc = ejdb_remove_collection(jbn->db, wdata->coll); in jn_rmcoll_execute()
1260 JBN jbn = work->unwrapped; in jn_online_backup_execute() local
1261 if (!jbn->db) { in jn_online_backup_execute()
1266 work->rc = ejdb_online_backup(jbn->db, &wdata->ts, wdata->file_name); in jn_online_backup_execute()
1408 JBN jbn; member
1593 napi_status ns = napi_call_threadsafe_function(qs->jbn->resultset_tsf, cs, napi_tsfn_blocking); in jn_jql_stream_visitor()
1639 ux.db = qs->jbn->db; in jn_jql_stream_execute()
1663 ns = napi_call_threadsafe_function(qs->jbn->resultset_tsf, cs, napi_tsfn_blocking); in jn_jql_stream_execute()
1790 JBN jbn; in jn_jql_stream_attach() local
1828 JNGO(ns, env, napi_unwrap(env, this, (void**) &jbn), finish); // -V580 in jn_jql_stream_attach()
1835 qs->jbn = jbn; in jn_jql_stream_attach()