comparison src/mysql.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 19e8e3d556d6
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 *
1200 Settings.Error => box [string "uw_error(ctx, FATAL, \"", 1200 Settings.Error => box [string "uw_error(ctx, FATAL, \"",
1201 string (ErrorMsg.spanToString loc), 1201 string (ErrorMsg.spanToString loc),
1202 string ": Error executing DML: %s\\n%s\", ", 1202 string ": Error executing DML: %s\\n%s\", ",
1203 dml, 1203 dml,
1204 string ", mysql_error(conn->conn));"] 1204 string ", mysql_error(conn->conn));"]
1205 | Settings.None => string "uw_errmsg = mysql_error(conn->conn);", 1205 | Settings.None => string "uw_set_error_message(ctx, mysql_error(conn->conn));",
1206 newline, 1206 newline,
1207 newline] 1207 newline]
1208 1208
1209 fun dml (loc, mode) = 1209 fun dml (loc, mode) =
1210 box [string "uw_conn *conn = uw_get_db(ctx);", 1210 box [string "uw_conn *conn = uw_get_db(ctx);",