# HG changeset patch # User Ziv Scully # Date 1438565142 25200 # Node ID 27899da8780b811c97a810533314b2cc48f3be80 # Parent e4a7e3cd6f11bd5ac77ce3569da9902a750a8893 Sqlcache allows any expression injected into SQL. diff -r e4a7e3cd6f11 -r 27899da8780b src/sql.sml --- a/src/sql.sml Mon Jul 20 23:25:44 2015 -0700 +++ b/src/sql.sml Sun Aug 02 18:25:42 2015 -0700 @@ -305,17 +305,11 @@ | _ => NONE -fun sqlifySqlcache chs = - case chs of - (* Could have variables or constants as well as FFIs. *) - Exp (e as (ERel _, _)) :: chs => SOME (e, chs) - (* If it is an FFI, match the entire expression. *) - | Exp (e as (EFfiApp ("Basis", f, [(_, _)]), _)) :: chs => - if String.isPrefix "sqlify" f then - SOME (e, chs) - else - NONE - | _ => sqlify chs +(* For sqlcache, we only care that we can do string equality on injected Mono + expressions, so accept any expression without modifying it. *) +val sqlifySqlcache = + fn Exp e :: chs => SOME (e, chs) + | _ => None fun constK s = wrap (const s) (fn () => s)