| 7005 | } |
| 7006 | |
| 7007 | static int emit_sqlite_result(struct sqlclntstate *clnt, sqlite3_context *context) |
| 7008 | { |
| 7009 | Lua L = clnt->sp->lua; |
| 7010 | if (lua_gettop(L) != 1) { |
| 7011 | sqlite3_result_error(context, "bad number of return values", -1); |
| 7012 | return -1; |
| 7013 | } |
| 7014 | return lua_to_sqlite(L, context); |
| 7015 | } |
| 7016 | |
| 7017 | /* This runs some Lua code in context of on-going SQL stmt. Should not |
| 7018 | * start/commit/rollback ongoing transaction. Calling SQL stmt will cleanup on |
no test coverage detected