Skip to content

Instantly share code, notes, and snippets.

@pond
Created October 10, 2013 22:06
Show Gist options
  • Save pond/6926387 to your computer and use it in GitHub Desktop.
Save pond/6926387 to your computer and use it in GitHub Desktop.
Rails database adapter issue: Postgres vs SQLite and BETWEEN
"Foo.where(:date=>(d..d))" in Postgres => finds records spanning the date
"Foo.where(:date=>(d..d))" in SQLite => finds nothing
This is an inclusive/exclusive ambiguity in BETWEEN which Rails doesn't resolve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment