19 lines
516 B
Plaintext
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());
|
|
```
|