def __call__(self, entity_class, options):
        """
        Creates a query for the given entity class, passing the given
        option map to the constructor, and processes loader options, if
        configured.
        """
        # The "query_class" option is used to inject the optimized
        # counting query class which fetches the total result count and
        # the first result page in one call.
        query_cls = options.pop('query_class', Query)
        q = query_cls([entity_class], self.__session, **options)
        entity_attr_names = self.loader_option_map.get(entity_class)
        if not entity_attr_names is None:
            q = self.__process_loader_options(entity_attr_names,
                                              class_mapper(entity_class),
                                              q)
        return q
def __call__ ( self , entity_class , options ) : query_cls = options . pop ( 'query_class' , Query ) q = query_cls ( [ entity_class ] , self . __session , ** options ) entity_attr_names = self . loader_option_map . get ( entity_class ) if not entity_attr_names is None : q = self . __process_loader_options ( entity_attr_names , class_mapper ( entity_class ) , q ) return q
Creates a query for the given entity class, passing the given
        option map to the constructor, and processes loader options, if
        configured.