comparison src/sqlite.sml @ 1295:929981850d9d

'tryDml' works with Postgres
author Adam Chlipala <adam@chlipala.net>
date Tue, 07 Sep 2010 09:06:13 -0400
parents acabf3935060
children 703c2c94afd5
comparison
equal deleted inserted replaced
1294:b4480a56cab7 1295:929981850d9d
1 (* Copyright (c) 2009, Adam Chlipala 1 (* Copyright (c) 2009-2010, Adam Chlipala
2 * All rights reserved. 2 * All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met: 5 * modification, are permitted provided that the following conditions are met:
6 * 6 *
706 Settings.Error => box [string "uw_error(ctx, FATAL, \"", 706 Settings.Error => box [string "uw_error(ctx, FATAL, \"",
707 string (ErrorMsg.spanToString loc), 707 string (ErrorMsg.spanToString loc),
708 string ": DML step failed: %s<br />%s\", ", 708 string ": DML step failed: %s<br />%s\", ",
709 dml, 709 dml,
710 string ", sqlite3_errmsg(conn->conn));"] 710 string ", sqlite3_errmsg(conn->conn));"]
711 | Settings.None => string "uw_errmsg = sqlite3_errmsg(conn->conn);", 711 | Settings.None => string "uw_set_error_message(ctx, sqlite3_errmsg(conn->conn));",
712 newline] 712 newline]
713 713
714 fun dml (loc, mode) = 714 fun dml (loc, mode) =
715 box [string "uw_conn *conn = uw_get_db(ctx);", 715 box [string "uw_conn *conn = uw_get_db(ctx);",
716 newline, 716 newline,