mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-07 18:30:28 +00:00
Add statement readonly check to redbean sqlite
This commit is contained in:
parent
6c633e2423
commit
6cc9fc32d6
1 changed files with 7 additions and 0 deletions
|
@ -234,6 +234,12 @@ static int dbvm_isopen(lua_State *L) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int dbvm_readonly(lua_State *L) {
|
||||
sdb_vm *svm = lsqlite_checkvm(L, 1);
|
||||
lua_pushboolean(L, sqlite3_stmt_readonly(svm->vm));
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dbvm_tostring(lua_State *L) {
|
||||
char buff[40];
|
||||
sdb_vm *svm = lsqlite_getvm(L, 1);
|
||||
|
@ -2660,6 +2666,7 @@ static const luaL_Reg dblib[] = {
|
|||
|
||||
static const luaL_Reg vmlib[] = {
|
||||
{"isopen", dbvm_isopen },
|
||||
{"readonly", dbvm_readonly },
|
||||
|
||||
{"step", dbvm_step },
|
||||
{"reset", dbvm_reset },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue