Add support for variables in SQL queries (#177)

Fixes #177