Mercurial > urweb
comparison src/cjr_print.sml @ 1293:acabf3935060
tryDml
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 05 Sep 2010 14:00:57 -0400 |
parents | 514be09d5018 |
children | b4480a56cab7 |
comparison
equal
deleted
inserted
replaced
1292:a671c986f517 | 1293:acabf3935060 |
---|---|
1789 string ")" | 1789 string ")" |
1790 else | 1790 else |
1791 box []] | 1791 box []] |
1792 end | 1792 end |
1793 | 1793 |
1794 | EDml {dml, prepared} => | 1794 | EDml {dml, prepared, mode} => |
1795 box [string "(uw_begin_region(ctx), ({", | 1795 box [case mode of |
1796 Settings.Error => box [] | |
1797 | Settings.None => string "({const char *uw_errmsg = NULL;", | |
1798 string "(uw_begin_region(ctx), ({", | |
1796 newline, | 1799 newline, |
1797 case prepared of | 1800 case prepared of |
1798 NONE => box [string "char *dml = ", | 1801 NONE => box [string "char *dml = ", |
1799 p_exp env dml, | 1802 p_exp env dml, |
1800 string ";", | 1803 string ";", |
1801 newline, | 1804 newline, |
1802 newline, | 1805 newline, |
1803 #dml (Settings.currentDbms ()) loc] | 1806 #dml (Settings.currentDbms ()) (loc, mode)] |
1804 | SOME {id, dml = dml'} => | 1807 | SOME {id, dml = dml'} => |
1805 let | 1808 let |
1806 val inputs = getPargs dml | 1809 val inputs = getPargs dml |
1807 in | 1810 in |
1808 box [p_list_sepi newline | 1811 box [p_list_sepi newline |
1821 newline, | 1824 newline, |
1822 | 1825 |
1823 #dmlPrepared (Settings.currentDbms ()) {loc = loc, | 1826 #dmlPrepared (Settings.currentDbms ()) {loc = loc, |
1824 id = id, | 1827 id = id, |
1825 dml = dml', | 1828 dml = dml', |
1826 inputs = map #2 inputs}] | 1829 inputs = map #2 inputs, |
1830 mode = mode}] | |
1827 end, | 1831 end, |
1828 newline, | 1832 newline, |
1829 newline, | 1833 newline, |
1830 | |
1831 string "uw_end_region(ctx);", | 1834 string "uw_end_region(ctx);", |
1832 newline, | 1835 newline, |
1833 string "uw_unit_v;", | 1836 |
1834 newline, | 1837 case mode of |
1835 string "}))"] | 1838 Settings.Error => string "uw_unit_v;" |
1839 | Settings.None => string "uw_errmsg ? uw_strdup(ctx, uw_errmsg) : NULL;", | |
1840 | |
1841 newline, | |
1842 string "}))", | |
1843 case mode of | |
1844 Settings.Error => box [] | |
1845 | Settings.None => string ";})"] | |
1836 | 1846 |
1837 | ENextval {seq, prepared} => | 1847 | ENextval {seq, prepared} => |
1838 box [string "({", | 1848 box [string "({", |
1839 newline, | 1849 newline, |
1840 string "uw_Basis_int n;", | 1850 string "uw_Basis_int n;", |