allow use Sql objects in query method