2023-03-22 19:03:38 -04:00
|
|
|
# deno_kv
|
|
|
|
|
2023-08-22 01:56:00 -04:00
|
|
|
This crate provides a key/value store for Deno. For an overview of Deno KV,
|
|
|
|
please read the [manual](https://deno.land/manual/runtime/kv).
|
|
|
|
|
|
|
|
## Storage Backends
|
|
|
|
|
|
|
|
Deno KV has a pluggable storage interface that supports multiple backends:
|
|
|
|
|
|
|
|
- SQLite - backed by a local SQLite database. This backend is suitable for
|
2023-10-31 07:13:57 -04:00
|
|
|
development and is the default when running locally. It is implemented in the
|
|
|
|
[denokv_sqlite crate](https://github.com/denoland/denokv/blob/main/sqlite).
|
2023-08-22 01:56:00 -04:00
|
|
|
- Remote - backed by a remote service that implements the
|
|
|
|
[KV Connect](#kv-connect) protocol, for example
|
|
|
|
[Deno Deploy](https://deno.com/deploy).
|
|
|
|
|
2023-10-31 07:13:57 -04:00
|
|
|
Additional backends can be added by implementing the `Database` trait.
|
2023-08-22 01:56:00 -04:00
|
|
|
|
|
|
|
## KV Connect
|
|
|
|
|
2023-10-31 07:13:57 -04:00
|
|
|
The KV Connect protocol allows the Deno CLI to communicate with a remote KV
|
|
|
|
database. The
|
|
|
|
[specification for the protocol](https://github.com/denoland/denokv/blob/main/proto/kv-connect.md),
|
|
|
|
and the
|
|
|
|
[protobuf definitions](https://github.com/denoland/denokv/blob/main/proto/schema/datapath.proto)
|
|
|
|
can be found in the `denokv` repository, under the `proto` directory.
|