# HG changeset patch # User Adam Chlipala # Date 1431276979 14400 # Node ID f55b0e45422f2fe3dcd64936bb2ca971e4aa43d4 # Parent 4895c41b2ec62cb63c5a029fb9bd39fb496e4d95 Fix .sql generation to honor 'noMangleSql' in column names diff -r 4895c41b2ec6 -r f55b0e45422f src/cjr_print.sml --- a/src/cjr_print.sml Sun May 10 12:13:12 2015 -0400 +++ b/src/cjr_print.sml Sun May 10 12:56:19 2015 -0400 @@ -3665,8 +3665,7 @@ let val t = sql_type_in env t in - box [string "uw_", - string (CharVector.map Char.toLower x), + box [string (Settings.mangleSql (CharVector.map Char.toLower x)), space, string (#p_sql_type (Settings.currentDbms ()) t), case t of diff -r 4895c41b2ec6 -r f55b0e45422f tests/nomangle.ur --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/nomangle.ur Sun May 10 12:56:19 2015 -0400 @@ -0,0 +1,7 @@ +table foo : { Bar : int, Baz : string } + PRIMARY KEY Baz + +fun main () : transaction page = + rs <- queryX1 (SELECT foo.Bar FROM foo WHERE foo.Baz = 'Hi') + (fn r => {[r.Bar]}); + return {rs} diff -r 4895c41b2ec6 -r f55b0e45422f tests/nomangle.urp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/nomangle.urp Sun May 10 12:56:19 2015 -0400 @@ -0,0 +1,5 @@ +database dbname=test +noMangleSql +sql nomangle.sql + +nomangle