![]() |
Fun 0.41.5
The programming language that makes you have fun!
|
Implements the OP_SQLITE_OPEN opcode (conditional build). More...
Go to the source code of this file.
Functions | |
| free_value (vpath) | |
| if (!path) | |
| free (path) | |
| if (rc !=SQLITE_OK||!db) | |
| push_value (vm, make_int(h->id)) | |
Variables | |
| case | OP_SQLITE_OPEN |
| char * | path = value_to_string_alloc(&vpath) |
| sqlite3 * | db = NULL |
| int | rc = sqlite3_open(path, &db) |
| SqlHandle * | h = sql_reg_add(db) |
| break | |
Implements the OP_SQLITE_OPEN opcode (conditional build).
Opens a SQLite database and registers a handle when FUN_WITH_SQLITE is enabled. On failure or when SQLite support is disabled, pushes 0.
OP_SQLITE_OPEN: (path:string) -> handle:int (>0) or 0 on error
Definition in file open.c.
| free | ( | path | ) |
| free_value | ( | vpath | ) |
| SqlHandle* h = sql_reg_add(db) |
| char* path = value_to_string_alloc(&vpath) |