aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/mono_opt.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-04 10:27:21 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-04 10:27:21 -0400
commit711796ea5b4bf5d36b644eafa1b198ed3e4e1798 (patch)
tree1d82726bd8dceb4d03b600f40b3f72a8323eec20 /src/mono_opt.sml
parentab29ac3337d2be88ae3288652e999873be1dcf14 (diff)
Change sqlify[int|float|string] to annotate with SQL types
Diffstat (limited to 'src/mono_opt.sml')
-rw-r--r--src/mono_opt.sml6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mono_opt.sml b/src/mono_opt.sml
index 3946684a..8be532aa 100644
--- a/src/mono_opt.sml
+++ b/src/mono_opt.sml
@@ -81,12 +81,12 @@ val urlifyString = String.translate (fn #" " => "+"
"%" ^ hexIt ch)
-val sqlifyInt = attrifyInt
-val sqlifyFloat = attrifyFloat
+fun sqlifyInt n = attrifyInt n ^ "::int8"
+fun sqlifyFloat n = attrifyFloat n ^ "::float8"
fun sqlifyString s = "E'" ^ String.translate (fn #"'" => "\\'"
| ch => str ch)
- (String.toString s) ^ "'"
+ (String.toString s) ^ "'::text"
fun exp e =
case e of