summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-07 14:38:14 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-07 14:38:14 -0400
commita783fe7797e3bff493e595e07ed53a43dc4754d2 (patch)
tree48c44ad97ea69969e20c00c13a9ae26ec6cf0ad2
parentdf8eea45a9ba38963b5bcc58b4e6439c055524e4 (diff)
Scratch that change....
-rw-r--r--lib/basis.urs12
-rw-r--r--src/urweb.grm6
-rw-r--r--tests/delete.ur2
-rw-r--r--tests/update.ur2
4 files changed, 9 insertions, 13 deletions
diff --git a/lib/basis.urs b/lib/basis.urs
index 91933254..a095a57e 100644
--- a/lib/basis.urs
+++ b/lib/basis.urs
@@ -206,19 +206,19 @@ val dml : dml -> transaction unit
val insert : fields ::: {Type}
-> sql_table fields
-> $(fold (fn nm (t :: Type) acc => [nm] ~ acc =>
- [nm = sql_exp [] [] [] t] ++ acc) [] fields)
+ [nm = sql_exp [T = fields] [] [] t] ++ acc) [] fields)
-> dml
-val update : changed :: {Type} -> unchanged ::: {Type} -> changed ~ unchanged
- -> sql_table (changed ++ unchanged)
+val update : changed ::: {Type} -> unchanged ::: {Type} -> changed ~ unchanged
-> $(fold (fn nm (t :: Type) acc => [nm] ~ acc =>
- [nm = sql_exp [] [] (changed ++ unchanged) t] ++ acc) [] changed)
- -> sql_exp [] [] (changed ++ unchanged) bool
+ [nm = sql_exp [T = changed ++ unchanged] [] [] t] ++ acc) [] changed)
+ -> sql_table (changed ++ unchanged)
+ -> sql_exp [T = changed ++ unchanged] [] [] bool
-> dml
val delete : fields ::: {Type}
-> sql_table fields
- -> sql_exp [] [] fields bool
+ -> sql_exp [T = fields] [] [] bool
-> dml
diff --git a/src/urweb.grm b/src/urweb.grm
index ef267b37..61e8d179 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -753,12 +753,8 @@ eterm : LPAREN eexp RPAREN (#1 eexp, s (LPARENleft, RPARENright))
val loc = s (LPARENleft, RPARENright)
val e = (EVar (["Basis"], "update"), loc)
- val e = (ECApp (e, (CRecord (map (fn (nm, _) =>
- (nm,
- (CWild (KType, loc), loc)))
- fsets), loc)), loc)
- val e = (EApp (e, texp), loc)
val e = (EApp (e, (ERecord fsets, loc)), loc)
+ val e = (EApp (e, texp), loc)
in
(EApp (e, sqlexp), loc)
end)
diff --git a/tests/delete.ur b/tests/delete.ur
index fee63812..e2109f61 100644
--- a/tests/delete.ur
+++ b/tests/delete.ur
@@ -1,5 +1,5 @@
table t1 : {A : int, B : string, C : float, D : bool}
fun main () : transaction page =
- () <- dml (DELETE FROM t1 WHERE A = 5);
+ () <- dml (DELETE FROM t1 WHERE T.A = 5);
return <html><body>Deleted.</body></html>
diff --git a/tests/update.ur b/tests/update.ur
index 06de35f8..e58c10cb 100644
--- a/tests/update.ur
+++ b/tests/update.ur
@@ -1,5 +1,5 @@
table t1 : {A : int, B : string, C : float, D : bool}
fun main () : transaction page =
- () <- dml (UPDATE t1 SET B = '6', C = 7.0 WHERE A = 5);
+ () <- dml (UPDATE t1 SET B = '6', C = 7.0 WHERE T.A = 5);
return <html><body>Updated.</body></html>