original_docstring: Checks if the query can be satisfied given the existing indexes.
  
      Args:
        query: the datastore_pb.Query to check
        trusted: True if the calling app is trusted (like dev_admin_console)
        calling_app: app_id of the current running application
      
docstring: Checks if the query can be satisfied given the existing indexes.
docstring_tokens: Checks if the query can be satisfied given the existing indexes .
code: def _CheckHasIndex(self, query, trusted=False, calling_app=None):
      """Checks if the query can be satisfied given the existing indexes.
  
      Args:
        query: the datastore_pb.Query to check
        trusted: True if the calling app is trusted (like dev_admin_console)
        calling_app: app_id of the current running application
      """
      if query.kind() in self._pseudo_kinds or not self._require_indexes:
        return
  
      minimal_index = datastore_index.MinimalCompositeIndexForQuery(query,
          (datastore_index.ProtoToIndexDefinition(index)
           for index in self.GetIndexes(query.app(), trusted, calling_app)
           if index.state() == entity_pb.CompositeIndex.READ_WRITE))
      if minimal_index is not None:
        msg = ('This query requires a composite index that is not defined. '
            'You must update the index.yaml file in your application root.')
        is_most_efficient, kind, ancestor, properties = minimal_index
        if not is_most_efficient:
  
          yaml = datastore_index.IndexYamlForQuery(kind, ancestor,
              datastore_index.GetRecommendedIndexProperties(properties))
          msg += '\nThe following index is the minimum index required:\n' + yaml
        raise apiproxy_errors.ApplicationError(datastore_pb.Error.NEED_INDEX, msg)
code_tokens: def _CheckHasIndex ( self , query , trusted = False , calling_app = None ) : if query . kind ( ) in self . _pseudo_kinds or not self . _require_indexes : return minimal_index = datastore_index . MinimalCompositeIndexForQuery ( query , ( datastore_index . ProtoToIndexDefinition ( index ) for index in self . GetIndexes ( query . app ( ) , trusted , calling_app ) if index . state ( ) == entity_pb . CompositeIndex . READ_WRITE ) ) if minimal_index is not None : msg = ( 'This query requires a composite index that is not defined. ' 'You must update the index.yaml file in your application root.' ) is_most_efficient , kind , ancestor , properties = minimal_index if not is_most_efficient : yaml = datastore_index . IndexYamlForQuery ( kind , ancestor , datastore_index . GetRecommendedIndexProperties ( properties ) ) msg += '\nThe following index is the minimum index required:\n' + yaml raise apiproxy_errors . ApplicationError ( datastore_pb . Error . NEED_INDEX , msg )
short_docstring: Checks if the query can be satisfied given the existing indexes.
short_docstring_tokens: Checks if the query can be satisfied given the existing indexes .
comment: """Checks if the query can be satisfied given the existing indexes.
  
      Args:
        query: the datastore_pb.Query to check
        trusted: True if the calling app is trusted (like dev_admin_console)
        calling_app: app_id of the current running application
      """