diff --git a/site/doc/pages/0_SQLite.txt b/site/doc/pages/0_SQLite.txt deleted file mode 100644 index f4f92be..0000000 --- a/site/doc/pages/0_SQLite.txt +++ /dev/null @@ -1,28 +0,0 @@ -:title -SQLite - -:sig -SQLite - -:see ->types -0_DValue -0_StringMap -sqlite_connect -sqlite_query -2_SQLite_connect -2_SQLite_query -2_SQLite_error -2_SQLite_disconnect - -:content -SQLite connection wrapper for unit code. It opens database files, applies the runtime default pragmas, supports named parameters, and returns query rows as list-shaped `DValue` values. - -```cpp -SQLite db; -if(db.connect("tmp/app.db")) { - DValue rows = db.query("select * from notes"); -} -``` - -Use exactly one SQL statement per `query()` call and named `:name` parameters. diff --git a/site/doc/pages/2_SQLite_connect.txt b/site/doc/pages/2_SQLite_connect.txt deleted file mode 100644 index 4a4c62c..0000000 --- a/site/doc/pages/2_SQLite_connect.txt +++ /dev/null @@ -1,18 +0,0 @@ -:sig -bool SQLite::connect(String path) - -:params -path : database file path -return value : true when the database opens and default pragmas apply - -:see -0_SQLite -2_SQLite_error -2_SQLite_disconnect - -:content -Opens or creates a SQLite database, registers the wrapper for request cleanup, sets a busy timeout, and applies default pragmas (`foreign_keys=ON`, WAL journal mode, synchronous NORMAL). On failure, details are available through `error()`. - -```cpp -SQLite db; if(!db.connect("tmp/app.db")) print(db.error()); -``` diff --git a/site/doc/pages/2_SQLite_disconnect.txt b/site/doc/pages/2_SQLite_disconnect.txt deleted file mode 100644 index cc09e81..0000000 --- a/site/doc/pages/2_SQLite_disconnect.txt +++ /dev/null @@ -1,15 +0,0 @@ -:sig -void SQLite::disconnect() - -:params -return value : none - -:see -0_SQLite - -:content -Forgets any worker-cache entry for this wrapper, closes the SQLite connection if open, clears the connection pointer, and unregisters it from request cleanup. - -```cpp -db.disconnect(); -``` diff --git a/site/doc/pages/2_SQLite_error.txt b/site/doc/pages/2_SQLite_error.txt deleted file mode 100644 index d1beb96..0000000 --- a/site/doc/pages/2_SQLite_error.txt +++ /dev/null @@ -1,16 +0,0 @@ -:sig -String SQLite::error() - -:params -return value : current statement/connection error text, or an empty string - -:see -0_SQLite - -:content -Returns stored statement information when present; otherwise returns SQLite's current connection error message when connected. - -```cpp -DValue rows = db.query("select * from missing"); -print(db.error()); -``` diff --git a/site/doc/pages/2_SQLite_query.txt b/site/doc/pages/2_SQLite_query.txt deleted file mode 100644 index 8fa5788..0000000 --- a/site/doc/pages/2_SQLite_query.txt +++ /dev/null @@ -1,19 +0,0 @@ -:sig -DValue SQLite::query(String q) -DValue SQLite::query(String q, const StringMap& params) - -:params -q : exactly one SQL statement -params : named :name parameter values; missing keys bind NULL -return value : result rows as a list-shaped DValue, or empty on error/non-row statements - -:see -0_SQLite -2_SQLite_error - -:content -Prepares and runs exactly one SQL statement. Extra trailing SQL statements are rejected. Parameters must be named `:name` placeholders; positional `?` placeholders are rejected. Result rows are returned as a list of maps keyed by column name. Integer, float, text, blob, and null column types map to matching `DValue` representations where null leaves the field empty. After completion, `affected_rows`, `insert_id`, and `statement_info` are updated. - -```cpp -DValue rows = db.query("select * from users where id=:id", {{"id", "42"}}); -```