Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jeremyevans/731450644574e622c854578fb2f56391 to your computer and use it in GitHub Desktop.
Save jeremyevans/731450644574e622c854578fb2f56391 to your computer and use it in GitHub Desktop.
DB.extend_datasets do
def literal_append(sql, v)
case v
when Numeric, Date, String
sql << '?'
else
super
end
end
end
DB[:test].where(:a=>1).sql
DB[:test].where(:a=>2).sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment