uce/site/doc/pages/2_SQLite_connect.txt
2026-06-15 21:42:50 +00:00

19 lines
516 B
Plaintext

: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());
```