| Crates.io | sqlvec |
| lib.rs | sqlvec |
| version | 0.0.2 |
| created_at | 2024-02-15 23:32:44.382143+00 |
| updated_at | 2024-03-02 18:34:19.92994+00 |
| description | A generic container for vectors allowing for rusqlite operations |
| homepage | https://github.com/5-pebbles/sqlvec |
| repository | https://github.com/5-pebbles/sqlvec |
| max_upload_size | |
| id | 1141710 |
| size | 42,828 |
A generic container for vectors allowing for rusqlite operations.
The vector must contain elements that implement ToString & FromStr.
SqlVec implements ToSql & FromSql storing values as \u{F1} delimited text.
If the sqlite conversion is to be bidirectional then the
ToString&FromStrmust also be bidirectional.
[dependencies]
sqlvec = { version = "0.0.1", features = ["serde"] }
Wrap a vector with SqlVec before passing to the database.
use sqlvec::SqlVec;
let values = SqlVec::new(vec!["one".to_string(), "two".to_string()]);
connection.execute(
"INSERT INTO test (data) VALUES (?1)",
params![values],
).unwrap();