I'll recommend you look at using the Sequel ORM. It makes it very easy to work with databases like MySQL, PostgreSQL, Oracle, SQLite, MSSQL, etc., using a single code base.
If you want to develop using SQLite, test using MySQL or PostgreSQL and run in production using Oracle, you can do it without changing any code, only your DSN in a single string changes when you make your connection.
It writes very clean SQL, allows you to use custom queries easily if you want. We use it for all our Ruby database connectivity and love it.
You can use a hash exactly like yours to generate queries right out of the box. This is from the documentation:
Filtering Records
An easy way to filter records is to provide a hash of values to match to where:
my_posts = posts.where(:category => 'ruby', :author => 'david')
# WHERE category = 'ruby' AND author = 'david'
See the README for more examples.