about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-06-15 01:26:39 +0300
committerVika <vika@fireburn.ru>2024-06-15 01:37:55 +0300
commit2f33ce7ecf96fedf4fc8511e6d57c459de2ffabc (patch)
treeb1f3cdba1537c0463b86110d32de170356f909ae
parent919bc2e9973bf57b2e2fe09ed0456fb0d07bdae9 (diff)
downloadkittybox-2f33ce7ecf96fedf4fc8511e6d57c459de2ffabc.tar.zst
examples/sql: make optional
-rw-r--r--Cargo.toml7
-rw-r--r--examples/sql.rs1
2 files changed, 7 insertions, 1 deletions
diff --git a/Cargo.toml b/Cargo.toml
index f32ce6d..89c2d1f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -46,6 +46,11 @@ name = "kittybox-mf2"
 path = "src/bin/kittybox-mf2.rs"
 required-features = ["cli"]
 
+[[example]]
+name = "sql"
+path = "examples/sql.rs"
+required-features = ["sqlparser"]
+
 [workspace]
 members = [".", "./util", "./templates", "./indieauth", "./templates-neo"]
 default-members = [".", "./util", "./templates", "./indieauth"]
@@ -159,4 +164,4 @@ optional = true
 [dependencies.sqlparser]
 version = "0.44.0"
 features = ["serde", "serde_json"]
-optional = true
\ No newline at end of file
+optional = true
diff --git a/examples/sql.rs b/examples/sql.rs
index c28f8dc..5d552da 100644
--- a/examples/sql.rs
+++ b/examples/sql.rs
@@ -1,3 +1,4 @@
+#![cfg(feature = "sqlparser")]
 use sqlparser::ast::Expr;
 
 #[derive(Debug, thiserror::Error)]