Skip to content

Instantly share code, notes, and snippets.

@dinedal
Created June 19, 2013 21:26
Show Gist options
  • Save dinedal/5818221 to your computer and use it in GitHub Desktop.
Save dinedal/5818221 to your computer and use it in GitHub Desktop.
> DB[:foo].where(a:1).update_sql(b:2)
=> "UPDATE \"foo\" SET \"b\" = 2 WHERE (\"a\" = 1)"
> DB[:foo].where(a:1).insert_sql(b:2)
=> "INSERT INTO \"foo\" (\"b\") VALUES (2)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment