diff src/mono_opt.sml @ 281:7d5860add50f

Change sqlify[int|float|string] to annotate with SQL types
author Adam Chlipala <adamc@hcoop.net>
date Thu, 04 Sep 2008 10:27:21 -0400
parents d1b679dbbc25
children ffe5b01908ae
line wrap: on
line diff
--- a/src/mono_opt.sml	Tue Sep 02 17:31:45 2008 -0400
+++ b/src/mono_opt.sml	Thu Sep 04 10:27:21 2008 -0400
@@ -81,12 +81,12 @@
                                                   "%" ^ 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