diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-08-14 18:35:08 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-08-14 18:35:08 -0400 |
commit | 7bdc4cabdb8e5efbc4a194fe0bfe9442c7644798 (patch) | |
tree | ce4be93140bacbd8900ff57affd5f866fbbf3ad0 /lib/basis.lig | |
parent | 5c9a5278b49ccf481468d5a766a8c4ab0cde2658 (diff) |
Non-star SELECT
Diffstat (limited to 'lib/basis.lig')
-rw-r--r-- | lib/basis.lig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/basis.lig b/lib/basis.lig index a7cfd276..0655c2b7 100644 --- a/lib/basis.lig +++ b/lib/basis.lig @@ -15,10 +15,12 @@ con sql_table :: {Type} -> Type con sql_query :: {{Type}} -> Type -val sql_query : tables ::: {{Type}} - -> $(fold (fn nm => fn ts => fn acc => [nm] ~ acc => - [nm = sql_table ts] ++ acc) [] tables) - -> sql_query tables +val sql_query : tables :: {({Type} * {Type})} + -> $(fold (fn nm => fn selected_unselected :: ({Type} * {Type}) => fn acc => + [nm] ~ acc => selected_unselected.1 ~ selected_unselected.2 => + [nm = sql_table (selected_unselected.1 ++ selected_unselected.2)] ++ acc) [] tables) + -> sql_query (fold (fn nm => fn selected_unselected :: ({Type} * {Type}) => fn acc => [nm] ~ acc => + [nm = selected_unselected.1] ++ acc) [] tables) (** XML *) |