| Crates.io | storeit_libsql |
| lib.rs | storeit_libsql |
| version | 0.1.7 |
| created_at | 2025-08-20 09:39:12.250632+00 |
| updated_at | 2025-08-28 08:37:45.547093+00 |
| description | LibSQL/Turso backend adapter for the storeit repository framework |
| homepage | |
| repository | https://github.com/dahankzter/storeit-rs/ |
| max_upload_size | |
| id | 1803063 |
| size | 131,488 |
LibSQL/Turso backend adapter for the storeit repository framework.
libsql-backend enables the implementation using the libsql crate and Tokio runtime.Repository<T> for your entities and provides a LibsqlTransactionManager for transaction semantics (including nested savepoints).Quick start:
use storeit_core::{RowAdapter, Repository};
use storeit_libsql::LibsqlRepository;
#[derive(Clone, Debug)]
struct User { id: Option<i64>, email: String, active: bool }
// implement Fetchable/Identifiable/Insertable/Updatable for User...
struct UserAdapter;
impl RowAdapter<User> for UserAdapter {
type Row = libsql::Row;
fn from_row(&self, row: &Self::Row) -> storeit_core::RepoResult<User> { /* map columns */ }
}
# async fn demo() -> storeit_core::RepoResult<()> {
let repo = LibsqlRepository::from_url("file:./db.sqlite3", UserAdapter).await?;
let _ = repo.find_by_id(&1).await?;
# Ok(()) }
More runnable examples are available in the workspace under storeit/examples/.
MSRV: 1.70 License: MIT OR Apache-2.0