sql-type
Type sql statements
This crate provides a facility to process a sql schema definition, and then use this definition to type the argument and return value of sql statements.
Currently primarily focused on MariaDB/Mysql.
Example code:
use ;
let schemas = "
CREATE TABLE `events` (
`id` bigint(20) NOT NULL,
`user` int(11) NOT NULL,
`message` text NOT NULL
);";
let mut issues = Vec new;
// Compute terse representation of the schemas
let schemas = parse_schemas;
assert!;
let sql = "SELECT `id`, `user`, `message` FROM `events` WHERE `id` = ?";
let stmt = type_statement;
assert!;
let stmt = match stmt ;