Mercurial > urweb
comparison lib/basis.lig @ 209:1487c712eb12
Stub WHERE support
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 16 Aug 2008 12:15:38 -0400 |
parents | cc68da3801bc |
children | 38b299373676 |
comparison
equal
deleted
inserted
replaced
208:63a2f2322c1f | 209:1487c712eb12 |
---|---|
12 con sql_table :: {Type} -> Type | 12 con sql_table :: {Type} -> Type |
13 | 13 |
14 (*** Queries *) | 14 (*** Queries *) |
15 | 15 |
16 con sql_query :: {{Type}} -> Type | 16 con sql_query :: {{Type}} -> Type |
17 con sql_exp :: {{Type}} -> Type -> Type | |
17 | 18 |
18 val sql_query : tables :: {({Type} * {Type})} | 19 val sql_query : tables :: {({Type} * {Type})} |
19 -> $(fold (fn nm => fn selected_unselected :: ({Type} * {Type}) => fn acc => | 20 -> {From : $(fold (fn nm => fn selected_unselected :: ({Type} * {Type}) => fn acc => |
20 [nm] ~ acc => selected_unselected.1 ~ selected_unselected.2 => | 21 [nm] ~ acc => selected_unselected.1 ~ selected_unselected.2 => |
21 [nm = sql_table (selected_unselected.1 ++ selected_unselected.2)] ++ acc) [] tables) | 22 [nm = sql_table (selected_unselected.1 ++ selected_unselected.2)] ++ acc) [] tables), |
23 Where : sql_exp (fold (fn nm => fn selected_unselected :: ({Type} * {Type}) => fn acc => | |
24 [nm] ~ acc => selected_unselected.1 ~ selected_unselected.2 => | |
25 [nm = selected_unselected.1 ++ selected_unselected.2] ++ acc) [] tables) bool} | |
22 -> sql_query (fold (fn nm => fn selected_unselected :: ({Type} * {Type}) => fn acc => [nm] ~ acc => | 26 -> sql_query (fold (fn nm => fn selected_unselected :: ({Type} * {Type}) => fn acc => [nm] ~ acc => |
23 [nm = selected_unselected.1] ++ acc) [] tables) | 27 [nm = selected_unselected.1] ++ acc) [] tables) |
28 | |
29 con sql_type :: Type -> Type | |
30 val sql_bool : sql_type bool | |
31 val sql_int : sql_type int | |
32 val sql_float : sql_type float | |
33 val sql_string : sql_type string | |
34 | |
35 val sql_inject : tables ::: {{Type}} -> t ::: Type -> t -> sql_type t -> sql_exp tables t | |
24 | 36 |
25 | 37 |
26 (** XML *) | 38 (** XML *) |
27 | 39 |
28 con tag :: {Type} -> {Unit} -> {Unit} -> {Type} -> {Type} -> Type | 40 con tag :: {Type} -> {Unit} -> {Unit} -> {Type} -> {Type} -> Type |