serde_sql
serde_sql streams serde::Serialize
structs directly into SQLite INSERT statements without allocating intermediate field structures.
You provide a String buffer and value; the crate appends the literal value list (v1, v2, …) so
you can embed it in any SQL template.
Features
- Zero-copy output: serialise straight into an existing
String. - Handles
Option, numbers, booleans, and strings with proper escaping. - Nested structures (maps/arrays) are emitted as JSON text literals.
Quick start
[]
= { = ".", = "0.1.0" }
= { = "1", = ["derive"] }
= "1"
use Serialize;
use serialize_insert;
Example
Testing
Documentation
- API docs can be generated locally via
cargo doc --open. - Additional usage notes live under
docs/usage.md.