summaryrefslogtreecommitdiff
path: root/ext/kv/lib.rs
AgeCommit message (Collapse)Author
2024-11-15refactor: use boxed_error in some places (#26887)David Sherret
2024-10-17refactor(ext/kv): use concrete error type (#26239)Leo Kettmeir
2024-09-19refactor(ext/kv): align error messages (#25500)Ian Bull
Towards https://github.com/denoland/deno/issues/25269
2024-09-17chore: upgrade deno_core (#25674)Bartek Iwańczuk
No functional changes, just removes dead code.
2024-08-27feat(ext/kv): configurable limit params (#25174)Yusuke Tanaka
This commit makes various limit parameters in `deno_kv` configurable. Currently these values are declared as constants and thus can't be modified from outside. However, there may be situations where we want to change it. This commit makes this possible by introducing a new struct `KvConfig` that needs to be given as the 2nd param in `init_ops`.
2024-05-23chore: update denokv_* crates (#23949)Bartek Iwańczuk
Co-authored-by: losfair <zhy20000919@hotmail.com>
2024-05-23refactor: remove custom `utc_now` in favor of `chrono::Utc:now` feature ↵Felipe Baltor
(#23888) This PR removes the use of the custom `utc_now` function in favor of the `chrono` implementation. It resolves #22864. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-03-07perf(cli): use faster_hex (#22761)Matt Mastracci
`cli::util::checksum` was showing up on flame graphs because it was concatenating allocated strings. We can use `faster-hex` to improve it.
2024-02-06fix(unstable): validate kv list selector (#22265)Heyang Zhou
Check that in a `KvListSelector`, `start` and `end` are actually within the keyspace bounds defined by `prefix`, if both are present.
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-12-22fix(unstable): kv watch should stop when db is closed (#21665)Heyang Zhou
Fixes #21634.
2023-12-14feat(unstable): append commit versionstamp to key (#21556)Heyang Zhou
2023-12-12feat(ext/kv) add backoffSchedule to enqueue (#21474)Igor Zinkovsky
Also reduces the time to run `kv_queue_undelivered_test.ts` test from 100 seconds down to 3 seconds. closes #21437
2023-12-05feat(unstable): kv.watch() (#21147)Luca Casonato
This commit adds support for a new `kv.watch()` method that allows watching for changes to a key-value pair. This is useful for cases where you want to be notified when a key-value pair changes, but don't want to have to poll for changes. --------- Co-authored-by: losfair <zhy20000919@hotmail.com>
2023-11-02feat(ext/kv): increase checks limit (#21055)Igor Zinkovsky
2023-11-01feat: disposable Deno resources (#20845)Luca Casonato
This commit implements Symbol.dispose and Symbol.asyncDispose for the relevant resources. Closes #20839 --------- Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-31chore: update ext/kv to use denokv_* crates (#20986)Luca Casonato
This commit updates the ext/kv module to use the denokv_* crates for the protocol and the sqlite backend. This also fixes a couple of bugs in the sqlite backend, and updates versionstamps to be updated less linearly.
2023-10-30chore: remove usage of chrono::Utc::now() (#20995)Divy Srivastava
Remove usage of Chrono's clock feature which pulls in iana-time-zone -> core-foundation
2023-10-26chore: update base64 crate (#20877)Luca Casonato
2023-10-12refactor: FeatureChecker integration in ext/ crates (#20797)Bartek Iwańczuk
Towards https://github.com/denoland/deno/issues/20779.
2023-10-04refactor: use deno_core::FeatureChecker for unstable checks (#20765)Bartek Iwańczuk
2023-09-26fix(kv_queues): graceful shutdown (#20627)Igor Zinkovsky
This fixes the `TypeError: Database closed` error during shutdown.
2023-09-14refactor: rewrite more ops to op2 macro (#20478)Bartek Iwańczuk
2023-09-08fix(ext/kv): same `expireIn` should generate same `expireAt` (#20396)Heyang Zhou
Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-09-07chore(ext/kv): limit total key size in an atomic op to 80 KiB (#20395)Heyang Zhou
Keys are expensive metadata. We track it for various purposes, e.g. transaction conflict check, and key expiration. This patch limits the total key size in an atomic operation to 80 KiB (81920 bytes). This helps ensure efficiency in implementations.
2023-08-26fix(kv) increase number of allowed mutations in atomic (#20126)Igor Zinkovsky
fixes #19741 Impose a limit on the total atomic payload size
2023-08-22feat(ext/kv): connect to remote database (#20178)Heyang Zhou
This patch adds a `remote` backend for `ext/kv`. This supports connection to Deno Deploy and potentially other services compatible with the KV Connect protocol.
2023-08-18feat(ext/kv): key expiration (#20091)Heyang Zhou
Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-07-31refactor: update core extension api usage (#19952)Nayeem Rahman
2023-06-22refactor(serde_v8): split ZeroCopyBuf into JsBuffer and ToJsBuffer (#19566)Bartek Iwańczuk
`ZeroCopyBuf` was convenient to use, but sometimes it did hide details that some copies were necessary in certain cases. Also it made it way to easy for the caller to pass around and convert into different values. This commit splits `ZeroCopyBuf` into `JsBuffer` (an array buffer coming from V8) and `ToJsBuffer` (a Rust buffer that will be converted into a V8 array buffer). As a result some magical conversions were removed (they were never used) limiting the API surface and preparing for changes in #19534.
2023-06-13feat(kv) queue implementation (#19459)Igor Zinkovsky
Extend the unstable `Deno.Kv` API to support queues.
2023-05-03fix(ext/kv): KvU64#valueOf and KvU64 inspect (#18656)Luca Casonato
`new Deno.KvU64(1n) + 2n == 3n` is now true. `new Deno.KvU64(1n)` is now inspected as `[Deno.KvU64: 1n]` (`Object(1n)` is inspected as `[BigInt: 1n]`). --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-03-30feat(ext/kv): return versionstamp from set/commit (#18512)Luca Casonato
This commit updates the `Deno.Kv` API to return the new commited versionstamp for the mutated data from `db.set` and `ao.commit`. This is returned in the form of a `Deno.KvCommitResult` object that has a `versionstamp` property.
2023-03-25chore(ext/kv): add limits (#18415)Heyang Zhou
2023-03-22fix(ext/kv): reverse mapping between `AnyValue::Bool` and `KeyPart::Bool` ↵Heyang Zhou
(#18365) Previously the mapping between `AnyValue::Bool` and `KeyPart::Bool` was inverted. This patch also allows using the empty key `[]` as range start/end to `snapshot_read`.
2023-03-22Revert "refactor: rename Deno.openKv() to Deno.kv() (#18349)" (#18362)Ryan Dahl
This reverts commit 50b793c9ed866ee29e8f04b4fa24b485b01a2b74.
2023-03-22refactor: rename Deno.openKv() to Deno.kv() (#18349)Ryan Dahl
2023-03-22feat(ext/kv): key-value store (#18232)Heyang Zhou
This commit adds unstable "Deno.openKv()" API that allows to open a key-value database at a specified path. --------- Co-authored-by: Luca Casonato <hello@lcas.dev> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>