docs: better example

This commit is contained in:
2020-01-26 16:06:06 +01:00
parent f23d4ed496
commit e239ac2b7f
2 changed files with 6 additions and 4 deletions

View File

@@ -22,8 +22,9 @@ databases.
; ignore that
(let-do [db (Result.unsafe-from-success (SQLite3.open \"db\"))]
; we can prepare statements
(println* &(SQLite3.query &db \"INSERT INTO mytable VALUES (?1, ?2);\"
&[(to-sqlite3 @\"hello\") (to-sqlite3 100)]))
(ignore
(SQLite3.query &db \"INSERT INTO mytable VALUES (?1, ?2);\"
&[(to-sqlite3 @\"hello\") (to-sqlite3 100)]))
; and query things
(println* &(SQLite3.query &db \"SELECT * from mytable;\" &[]))
(SQLite3.close db)