Show a complete SQLite connection example

This commit is contained in:
waozi committed 2026-09-30 15:59:33 -03:00
1 parent 66996ed7ac
commit 42cccd69f8
1 file changed
+2 -1
+2 -1
View File
@@ -11,8 +11,9 @@ ziran add https://github.com/ziranlang/sqlite.git
database: *void = null
flags: s32 = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE
if SqliteOpen(path, *database, flags) == SQLITE_OK {
if SqliteOpenText(":memory:", *database, flags) == SQLITE_OK {
SqliteExecText(database, "create table if not exists votes (voter text, score integer)")
SqliteClose(database)
}
```