comparison src/monoize.sml @ 2224:5709482a2afd

Merge.
author Ziv Scully <ziv@mit.edu>
date Thu, 11 Dec 2014 02:05:41 -0500
parents 9410959d296f 0d48cfb59b29
children e10881cd92da
comparison
equal deleted inserted replaced
2223:9410959d296f 2224:5709482a2afd
2001 (L'.TRecord [("Rows", s), ("OrderBy", s), ("Limit", s), ("Offset", s)], loc), 2001 (L'.TRecord [("Rows", s), ("OrderBy", s), ("Limit", s), ("Offset", s)], loc),
2002 s, 2002 s,
2003 strcat [gf "Rows", 2003 strcat [gf "Rows",
2004 (L'.ECase (gf "OrderBy", 2004 (L'.ECase (gf "OrderBy",
2005 [((L'.PPrim (Prim.String (Prim.Normal, "")), loc), str ""), 2005 [((L'.PPrim (Prim.String (Prim.Normal, "")), loc), str ""),
2006 ((L'.PWild, loc), 2006 ((L'.PVar ("orderby", s), loc),
2007 strcat [str " ORDER BY ", 2007 strcat [str " ORDER BY ",
2008 gf "OrderBy"])], 2008 (L'.ERel 0, loc)])],
2009 {disc = s, result = s}), loc), 2009 {disc = s, result = s}), loc),
2010 gf "Limit", 2010 gf "Limit",
2011 gf "Offset"]), loc), fm) 2011 gf "Offset"]), loc), fm)
2012 end 2012 end
2013 2013
2112 result = s}), loc), 2112 result = s}), loc),
2113 (L'.ECase (gf "Where", 2113 (L'.ECase (gf "Where",
2114 [((L'.PPrim (Prim.String (Prim.Normal, #trueString (Settings.currentDbms ()))), 2114 [((L'.PPrim (Prim.String (Prim.Normal, #trueString (Settings.currentDbms ()))),
2115 loc), 2115 loc),
2116 str ""), 2116 str ""),
2117 ((L'.PWild, loc), 2117 ((L'.PVar ("where", s), loc),
2118 strcat [str " WHERE ", gf "Where"])], 2118 strcat [str " WHERE ", (L'.ERel 0, loc)])],
2119 {disc = s, 2119 {disc = s,
2120 result = s}), loc), 2120 result = s}), loc),
2121 2121
2122 if List.all (fn (x, xts) => 2122 if List.all (fn (x, xts) =>
2123 case List.find (fn (x', _) => x' = x) grouped of 2123 case List.find (fn (x', _) => x' = x) grouped of
2141 2141
2142 (L'.ECase (gf "Having", 2142 (L'.ECase (gf "Having",
2143 [((L'.PPrim (Prim.String 2143 [((L'.PPrim (Prim.String
2144 (Prim.Normal, #trueString (Settings.currentDbms ()))), loc), 2144 (Prim.Normal, #trueString (Settings.currentDbms ()))), loc),
2145 str ""), 2145 str ""),
2146 ((L'.PWild, loc), 2146 ((L'.PVar ("having", s), loc),
2147 strcat [str " HAVING ", gf "Having"])], 2147 strcat [str " HAVING ", (L'.ERel 0, loc)])],
2148 {disc = s, 2148 {disc = s,
2149 result = s}), loc) 2149 result = s}), loc)
2150 ]), loc), 2150 ]), loc),
2151 fm) 2151 fm)
2152 end 2152 end