sqlx-type
Proc macros to perform type sql queries similarly to sqlx::query, but without the need
to run cargo sqlx prepare
A schema definition must be placed in "sqlx-type-schema.sql" in the root of a using crate:
EXISTS `t1`;
(
`id` int(11) NOT NULL,
`cbool` tinyint(1) NOT NULL,
`cu8` tinyint UNSIGNED NOT NULL,
`cu16` smallint UNSIGNED NOT NULL,
`cu32` int UNSIGNED NOT NULL,
`cu64` bigint UNSIGNED NOT NULL,
`ci8` tinyint,
`ci16` smallint,
`ci32` int,
`ci64` bigint,
`ctext` varchar(100) NOT NULL,
`cbytes` blob,
`cf32` float,
`cf64` double
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
`t1`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
IF
See sql_type::schema for a detailed description.
This schema can then be used to type queries:
use env, MySqlPool, query;
async