diff --git a/Makefile b/Makefile index 5f3f9de9..a62e3c03 100644 --- a/Makefile +++ b/Makefile @@ -9,3 +9,6 @@ DUCKDB_INCLUDE_DIR = /Users/wangfenjin/duckdb all: cargo test --features buildtime_bindgen --features modern-full -- --nocapture cargo clippy --all-targets --workspace --features buildtime_bindgen --features modern-full -- -D warnings -A clippy::redundant-closure + +test: + cargo test --features bundled --features modern-full -- --nocapture diff --git a/src/types/to_sql.rs b/src/types/to_sql.rs index b3d9459e..15d9fe63 100644 --- a/src/types/to_sql.rs +++ b/src/types/to_sql.rs @@ -328,8 +328,8 @@ mod test { let id_vec = id.as_bytes().to_vec(); db.execute("INSERT INTO foo (id, label) VALUES (?, ?)", params![id_vec, "target"])?; - let mut stmt = db.prepare("SELECT id, label FROM foo")?; - let mut rows = stmt.query([])?; + let mut stmt = db.prepare("SELECT id, label FROM foo WHERE id = ?")?; + let mut rows = stmt.query(params![id_vec])?; let row = rows.next()?.unwrap(); let found_id: Uuid = row.get_unwrap(0); let found_label: String = row.get_unwrap(1);