Add Query.getTables() method for getting list of tables used in a query