dactyl-db 0.4.0

Interchangeably read and write to local SQLite or cloud-hosted Vercel Neon instances behind a single unified facade.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Private backend adapters.

use crate::error::DactylError;
use crate::rows::{Parameter, Rows};

/// The small operation seam Dactyl needs from each backend.
pub trait Adapter {
    fn read(&self, sql: &str, params: &[Parameter]) -> Result<Rows, DactylError>;
    fn write(&self, sql: &str, params: &[Parameter]) -> Result<u64, DactylError>;
}

#[cfg(feature = "sqlite")]
pub mod sqlite;

#[cfg(feature = "neon")]
pub mod neon;