ITADN
clbarnes/zarrs_sqlite
clbarnes/zarrs_sqlite · 文件 下载 ZIP
文件最后提交记录最后更新时间
README.md

zarrs_sqlite

An SQLite-based Zarr store for the zarrs ecosystem.

Work in progress; see the specification proposal.

Usage

/// `None` would build an in-memory database.
let mut builder = zarrs_sqlite::TursoStore::builder(Some("path/to/file.zarrdb"));

// By default, this will be read-only and the database must already exist.

// The below allows the builder to create a new database, and truncates any existing database.
builder.create().truncate();

let inner = builder.build().await.unwrap();
let store: zarrs::storage::AsyncReadableWritableListableStorage = Arc::new(inner);

Features

Backends

This crate supports multiple SQLite backends, each behind a cargo feature.

storefeaturebackendnotes
zarrs_sqlite::TursoStorebackend-tursotursoAsync (requires tokio), WAL mode, pure rust
zarrs_sqlite::RusqliteStorebackend-rusqliterusqlite + r2d2Sync, binds to libsqlite3; default