Mercurial > urweb
comparison src/prepare.sml @ 678:5ff1ff38e2db
Preliminary work supporting channels in databases
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 26 Mar 2009 16:22:34 -0400 |
parents | 162d5308e34f |
children | 5bbb542243e8 |
comparison
equal
deleted
inserted
replaced
677:81573f62d6c3 | 678:5ff1ff38e2db |
---|---|
45 SOME ("$" ^ Int.toString (n + 1) ^ "::text" :: ss, n + 1) | 45 SOME ("$" ^ Int.toString (n + 1) ^ "::text" :: ss, n + 1) |
46 | EFfiApp ("Basis", "sqlifyBool", [e]) => | 46 | EFfiApp ("Basis", "sqlifyBool", [e]) => |
47 SOME ("$" ^ Int.toString (n + 1) ^ "::bool" :: ss, n + 1) | 47 SOME ("$" ^ Int.toString (n + 1) ^ "::bool" :: ss, n + 1) |
48 | EFfiApp ("Basis", "sqlifyTime", [e]) => | 48 | EFfiApp ("Basis", "sqlifyTime", [e]) => |
49 SOME ("$" ^ Int.toString (n + 1) ^ "::timestamp" :: ss, n + 1) | 49 SOME ("$" ^ Int.toString (n + 1) ^ "::timestamp" :: ss, n + 1) |
50 | 50 | EFfiApp ("Basis", "sqlifyChannel", [e]) => |
51 | EFfiApp ("Basis", "sqlifyIntN", [e]) => | 51 SOME ("$" ^ Int.toString (n + 1) ^ "::int4" :: ss, n + 1) |
52 SOME ("$" ^ Int.toString (n + 1) ^ "::int8" :: ss, n + 1) | 52 |
53 | EFfiApp ("Basis", "sqlifyFloatN", [e]) => | 53 | ECase (e, |
54 SOME ("$" ^ Int.toString (n + 1) ^ "::float8" :: ss, n + 1) | 54 [((PNone _, _), |
55 | EFfiApp ("Basis", "sqlifyStringN", [e]) => | 55 (EPrim (Prim.String "NULL"), _)), |
56 SOME ("$" ^ Int.toString (n + 1) ^ "::text" :: ss, n + 1) | 56 ((PSome (_, (PVar _, _)), _), |
57 | EFfiApp ("Basis", "sqlifyBoolN", [e]) => | 57 (EFfiApp (m, x, [(ERel 0, _)]), _))], |
58 SOME ("$" ^ Int.toString (n + 1) ^ "::bool" :: ss, n + 1) | 58 _) => prepString ((EFfiApp (m, x, [e]), #2 e), ss, n) |
59 | EFfiApp ("Basis", "sqlifyTimeN", [e]) => | |
60 SOME ("$" ^ Int.toString (n + 1) ^ "::timestamp" :: ss, n + 1) | |
61 | 59 |
62 | ECase (e, | 60 | ECase (e, |
63 [((PCon (_, PConFfi {mod = "Basis", con = "True", ...}, _), _), | 61 [((PCon (_, PConFfi {mod = "Basis", con = "True", ...}, _), _), |
64 (EPrim (Prim.String "TRUE"), _)), | 62 (EPrim (Prim.String "TRUE"), _)), |
65 ((PCon (_, PConFfi {mod = "Basis", con = "False", ...}, _), _), | 63 ((PCon (_, PConFfi {mod = "Basis", con = "False", ...}, _), _), |