def prepare_query (&block)

      q = TableQuery.new(table_query_class, self)
      block.call(q) if block

      q
    end
def prepare_query (&block)

      q = TableQuery.new(table_query_class, self)
      block.call(q) if block

      q
    end
Prepares a query instance (block is optional)