comparison src/cjr_print.sml @ 1295:929981850d9d

'tryDml' works with Postgres
author Adam Chlipala <adam@chlipala.net>
date Tue, 07 Sep 2010 09:06:13 -0400
parents b4480a56cab7
children e665527fce1c
comparison
equal deleted inserted replaced
1294:b4480a56cab7 1295:929981850d9d
1792 else 1792 else
1793 box []] 1793 box []]
1794 end 1794 end
1795 1795
1796 | EDml {dml, prepared, mode} => 1796 | EDml {dml, prepared, mode} =>
1797 box [case mode of 1797 box [string "(uw_begin_region(ctx), ({",
1798 Settings.Error => box []
1799 | Settings.None => string "({const char *uw_errmsg = NULL;",
1800 string "(uw_begin_region(ctx), ({",
1801 newline, 1798 newline,
1802 case prepared of 1799 case prepared of
1803 NONE => box [string "char *dml = ", 1800 NONE => box [string "char *dml = ",
1804 p_exp env dml, 1801 p_exp env dml,
1805 string ";", 1802 string ";",
1836 string "uw_end_region(ctx);", 1833 string "uw_end_region(ctx);",
1837 newline, 1834 newline,
1838 1835
1839 case mode of 1836 case mode of
1840 Settings.Error => string "uw_unit_v;" 1837 Settings.Error => string "uw_unit_v;"
1841 | Settings.None => string "uw_errmsg ? uw_strdup(ctx, uw_errmsg) : NULL;", 1838 | Settings.None => string "uw_dup_and_clear_error_message(ctx);",
1842 1839
1843 newline, 1840 newline,
1844 string "}))", 1841 string "}))"]
1845 case mode of
1846 Settings.Error => box []
1847 | Settings.None => string ";})"]
1848 1842
1849 | ENextval {seq, prepared} => 1843 | ENextval {seq, prepared} =>
1850 box [string "({", 1844 box [string "({",
1851 newline, 1845 newline,
1852 string "uw_Basis_int n;", 1846 string "uw_Basis_int n;",