Dialect aware query

fixnig #3 and paving the way for full Oracle support