cleanup, docs
This commit is contained in:
@@ -19,4 +19,10 @@ print(sqlite_affected_rows(db));
|
||||
```
|
||||
|
||||
:example
|
||||
print("sqlite_affected_rows is resource-bound; configure the service or connection, then call it in request code.\n");
|
||||
SQLite* db = sqlite_connect("/tmp/doc-sqlite-affected.db");
|
||||
sqlite_query(db, "drop table if exists t");
|
||||
sqlite_query(db, "create table t(id integer primary key, v text)");
|
||||
sqlite_query(db, "insert into t(id, v) values(1,'a'),(2,'b'),(3,'c')");
|
||||
sqlite_query(db, "update t set v = 'x' where id <= 2");
|
||||
print("rows updated: ", sqlite_affected_rows(db), "\n");
|
||||
sqlite_disconnect(db);
|
||||
|
||||
Reference in New Issue
Block a user