comparison src/sqlite.sml @ 1936:6745eafff617

Start SQL transactions as read-only when possible, based on conservative program analysis
author Adam Chlipala <adam@chlipala.net>
date Thu, 12 Dec 2013 17:42:48 -0500
parents 2f33d9a51765
children 661b531f55bd
comparison
equal deleted inserted replaced
1935:fda9d5af69e7 1936:6745eafff617
342 newline, 342 newline,
343 string "}", 343 string "}",
344 newline, 344 newline,
345 newline, 345 newline,
346 346
347 string "static int uw_db_begin(uw_context ctx) {", 347 string "static int uw_db_begin(uw_context ctx, int could_write) {",
348 newline, 348 newline,
349 string "uw_conn *conn = uw_get_db(ctx);", 349 string "uw_conn *conn = uw_get_db(ctx);",
350 newline, 350 newline,
351 newline, 351 newline,
352 string "if (sqlite3_exec(conn->conn, \"BEGIN\", NULL, NULL, NULL) == SQLITE_OK)", 352 string "if (sqlite3_exec(conn->conn, \"BEGIN\", NULL, NULL, NULL) == SQLITE_OK)",