| 3436 | } |
| 3437 | |
| 3438 | static int dbstmt_fetch(Lua lua) |
| 3439 | { |
| 3440 | SP sp = getsp(lua); |
| 3441 | luaL_checkudata(lua, 1, dbtypes.dbstmt); |
| 3442 | dbstmt_t *dbstmt = lua_touserdata(lua, 1); |
| 3443 | no_stmt_chk(lua, dbstmt); |
| 3444 | if (!dbstmt->readonly) { |
| 3445 | return luaL_error(lua, "statement must be read-only"); |
| 3446 | } |
| 3447 | setup_first_sqlite_step(sp, dbstmt, 1); |
| 3448 | int rc = stmt_sql_step(lua, dbstmt); |
| 3449 | if (rc == SQLITE_ROW) return 1; |
| 3450 | donate_stmt(sp, dbstmt); |
| 3451 | return 0; |
| 3452 | } |
| 3453 | |
| 3454 | static int dbstmt_emit(Lua L) |
| 3455 | { |
nothing calls this directly
no test coverage detected