laminate-sql 0.1.0

Database connectors for laminate — PostgreSQL, SQLite, MySQL data sources
Documentation

laminate-sql — Database connectors for laminate

Provides the [DataSource] trait and implementations for PostgreSQL, SQLite, and MySQL. Queries return rows as [FlexValue] for shaping, coercion, and schema inference.

Features

  • postgres — PostgreSQL via sqlx
  • sqlite — SQLite via sqlx
  • mysql — MySQL via sqlx
  • all-databases — All of the above

Quick Start

use laminate_sql::{DataSource, PostgresSource};

let source = PostgresSource::connect("postgres://user:pass@localhost/mydb").await?;
let rows = source.query("SELECT * FROM customers LIMIT 100").await?;

// Use with laminate schema inference
let raw_rows: Vec<serde_json::Value> = rows.iter().map(|r| r.into_raw()).collect();
let schema = laminate::InferredSchema::from_values(&raw_rows);
let report = schema.audit(&raw_rows);
println!("{}", report.summary());