From 92ebf4afe5d55135b3ba39616bcb77106c07c597 Mon Sep 17 00:00:00 2001 From: Heyang Zhou Date: Wed, 22 Mar 2023 12:13:24 +0800 Subject: feat(ext/kv): key-value store (#18232) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds unstable "Deno.openKv()" API that allows to open a key-value database at a specified path. --------- Co-authored-by: Luca Casonato Co-authored-by: Bartek IwaƄczuk --- runtime/js/90_deno_ns.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'runtime/js') diff --git a/runtime/js/90_deno_ns.js b/runtime/js/90_deno_ns.js index 7c3a9226d..54480c9c7 100644 --- a/runtime/js/90_deno_ns.js +++ b/runtime/js/90_deno_ns.js @@ -23,6 +23,7 @@ import * as signals from "ext:runtime/40_signals.js"; import * as tty from "ext:runtime/40_tty.js"; // TODO(bartlomieju): this is funky we have two `http` imports import * as httpRuntime from "ext:runtime/40_http.js"; +import * as kv from "ext:deno_kv/01_db.ts"; const denoNs = { metrics: core.metrics, @@ -169,6 +170,10 @@ const denoNsUnstable = { funlockSync: fs.funlockSync, upgradeHttp: http.upgradeHttp, upgradeHttpRaw: flash.upgradeHttpRaw, + openKv: kv.openKv, + Kv: kv.Kv, + KvU64: kv.KvU64, + KvListIterator: kv.KvListIterator, }; export { denoNs, denoNsUnstable }; -- cgit v1.2.3