diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-04-28 14:02:23 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-04-28 14:02:23 -0400 |
commit | caf010bca085bea65037d194c3eb21ca8b83c23b (patch) | |
tree | 97c50c49b7e1358f4cc22a2d9adf9f6d4b911353 /src/monoize.sml | |
parent | 19b1fab19ef9a3931f21b6f5c3472db4191caf96 (diff) |
Preparing to allow views in SELECT FROM clauses
Diffstat (limited to 'src/monoize.sml')
-rw-r--r-- | src/monoize.sml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index 16839cf9..ccc5a851 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -184,6 +184,8 @@ fun monoType env = (L'.TFfi ("Basis", "string"), loc) | L.CFfi ("Basis", "sql_offset") => (L'.TFfi ("Basis", "string"), loc) + | L.CApp ((L.CApp ((L.CFfi ("Basis", "fieldsOf"), _), _), _), _) => + (L'.TRecord [], loc) | L.CApp ((L.CFfi ("Basis", "sql_injectable_prim"), _), t) => (L'.TFun (mt env dtmap t, (L'.TFfi ("Basis", "string"), loc)), loc) @@ -1725,8 +1727,13 @@ fun monoExp (env, st, fm) (all as (e, loc)) = | L.ECApp ((L.EFfi ("Basis", "sql_subset_all"), _), _) => ((L'.ERecord [], loc), fm) - | L.ECApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_from_table"), _), _), _), _), _), - (L.CName name, _)) => + | L.ECApp ((L.ECApp ((L.EFfi ("Basis", "fieldsOf_table"), _), _), _), _) => + ((L'.ERecord [], loc), fm) + | L.ECApp ((L.EFfi ("Basis", "fieldsOf_view"), _), _) => + ((L'.ERecord [], loc), fm) + + | L.ECApp ((L.EApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_from_table"), _), _), _), _), _), _), _), + (L.CName name, _)) => let val s = (L'.TFfi ("Basis", "string"), loc) in |