dbd/db2/connection.c

changeset 22
fd78e9cdc6e9
parent 16
318e5dfd03b8
child 23
a4825c3e65e9
equal deleted inserted replaced
21:7956401a0c5e 22:fd78e9cdc6e9
195 lua_pushstring(L, DBI_ERR_DB_UNAVAILABLE); 195 lua_pushstring(L, DBI_ERR_DB_UNAVAILABLE);
196 return 2; 196 return 2;
197 } 197 }
198 198
199 /* 199 /*
200 * quoted = connection:quote(str)
201 */
202 static int connection_quote(lua_State *L) {
203 luaL_error(L, DBI_ERR_NOT_IMPLEMENTED, DBD_DB2_CONNECTION, "quote");
204 return 0;
205 }
206
207 /*
200 * success = connection:rollback() 208 * success = connection:rollback()
201 */ 209 */
202 static int connection_rollback(lua_State *L) { 210 static int connection_rollback(lua_State *L) {
203 connection_t *conn = (connection_t *)luaL_checkudata(L, 1, DBD_DB2_CONNECTION); 211 connection_t *conn = (connection_t *)luaL_checkudata(L, 1, DBD_DB2_CONNECTION);
204 int err = 1; 212 int err = 1;
226 {"autocommit", connection_autocommit}, 234 {"autocommit", connection_autocommit},
227 {"close", connection_close}, 235 {"close", connection_close},
228 {"commit", connection_commit}, 236 {"commit", connection_commit},
229 {"ping", connection_ping}, 237 {"ping", connection_ping},
230 {"prepare", connection_prepare}, 238 {"prepare", connection_prepare},
239 {"quote", connection_quote},
231 {"rollback", connection_rollback}, 240 {"rollback", connection_rollback},
232 {NULL, NULL} 241 {NULL, NULL}
233 }; 242 };
234 243
235 static const luaL_Reg connection_class_methods[] = { 244 static const luaL_Reg connection_class_methods[] = {

mercurial