Created
May 18, 2021 22:46
-
-
Save jeremyevans/731450644574e622c854578fb2f56391 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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