cleanup, docs
This commit is contained in:
@@ -19,4 +19,9 @@ u64 id = sqlite_insert_id(db);
|
||||
```
|
||||
|
||||
:example
|
||||
print("sqlite_insert_id is resource-bound; configure the service or connection, then call it in request code.\n");
|
||||
SQLite* db = sqlite_connect("/tmp/doc-sqlite-insertid.db");
|
||||
sqlite_query(db, "drop table if exists t");
|
||||
sqlite_query(db, "create table t(id integer primary key autoincrement, v text)");
|
||||
sqlite_query(db, "insert into t(v) values('x')");
|
||||
print("new row id: ", sqlite_insert_id(db), "\n");
|
||||
sqlite_disconnect(db);
|
||||
|
||||
Reference in New Issue
Block a user