fix: sqlite params! macro
This commit is contained in:
parent
3ab9f14ce6
commit
0177b5676d
4 changed files with 7 additions and 6 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -549,7 +549,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "oiseau"
|
name = "oiseau"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bb8-postgres",
|
"bb8-postgres",
|
||||||
"redis",
|
"redis",
|
||||||
|
|
|
@ -4,7 +4,7 @@ description = "Super simple SQL helper"
|
||||||
authors = ["trisuaso <me@trisua.com>"]
|
authors = ["trisuaso <me@trisua.com>"]
|
||||||
license = "AGPL-3.0-or-later"
|
license = "AGPL-3.0-or-later"
|
||||||
homepage = "https://bugs.tetratto.com/trisua/tetratto"
|
homepage = "https://bugs.tetratto.com/trisua/tetratto"
|
||||||
version = "0.1.0"
|
version = "0.1.1"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
|
@ -9,9 +9,10 @@ pub mod sqlite;
|
||||||
pub use rusqlite::Row as SqliteRow;
|
pub use rusqlite::Row as SqliteRow;
|
||||||
|
|
||||||
#[cfg(feature = "sqlite")]
|
#[cfg(feature = "sqlite")]
|
||||||
#[allow(unused_imports)] // compiler bug
|
#[allow(unused_imports)]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rusqlite;
|
pub extern crate rusqlite;
|
||||||
|
pub use rusqlite::params as rparams;
|
||||||
|
|
||||||
pub mod cache;
|
pub mod cache;
|
||||||
pub mod config;
|
pub mod config;
|
||||||
|
|
|
@ -84,9 +84,9 @@ macro_rules! execute {
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! params {
|
macro_rules! params {
|
||||||
() => {
|
() => {
|
||||||
$crate::rusqlite::params![]
|
$crate::rparams![]
|
||||||
};
|
};
|
||||||
($($params:expr),+ $(,)?) => {
|
($($params:expr),+ $(,)?) => {
|
||||||
$crate::rusqlite::params![$($params),+]
|
$crate::rparams![$($params),+]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue