def QueryItems(self, database_or_Container_link, query, options=None, partition_key=None):
        """Queries documents in a collection.

        :param str database_or_Container_link:
            The link to the database when using partitioning, otherwise link to the document collection.
        :param (str or dict) query:
        :param dict options:
            The request options for the request.
        :param str partition_key:
            Partition key for the query(default value None)

        :return:
            Query Iterable of Documents.
        :rtype:
            query_iterable.QueryIterable

        """
        database_or_Container_link = base.TrimBeginningAndEndingSlashes(database_or_Container_link)

        if options is None:
            options = {}

        if(base.IsDatabaseLink(database_or_Container_link)):
            # Python doesn't have a good way of specifying an overloaded constructor, and this is how it's generally overloaded constructors are specified(by calling a @classmethod) and returning the 'self' instance
            return query_iterable.QueryIterable.PartitioningQueryIterable(self, query, options, database_or_Container_link, partition_key)
        else:    
            path = base.GetPathFromLink(database_or_Container_link, 'docs')
            collection_id = base.GetResourceIdOrFullNameFromLink(database_or_Container_link)
            def fetch_fn(options):
                return self.__QueryFeed(path,
                                        'docs',
                                        collection_id,
                                        lambda r: r['Documents'],
                                        lambda _, b: b,
                                        query,
                                        options), self.last_response_headers
            return query_iterable.QueryIterable(self, query, options, fetch_fn, database_or_Container_link)
def QueryItems ( self , database_or_Container_link , query , options = None , partition_key = None ) : database_or_Container_link = base . TrimBeginningAndEndingSlashes ( database_or_Container_link ) if options is None : options = { } if ( base . IsDatabaseLink ( database_or_Container_link ) ) : return query_iterable . QueryIterable . PartitioningQueryIterable ( self , query , options , database_or_Container_link , partition_key ) else : path = base . GetPathFromLink ( database_or_Container_link , 'docs' ) collection_id = base . GetResourceIdOrFullNameFromLink ( database_or_Container_link ) def fetch_fn ( options ) : return self . __QueryFeed ( path , 'docs' , collection_id , lambda r : r [ 'Documents' ] , lambda _ , b : b , query , options ) , self . last_response_headers return query_iterable . QueryIterable ( self , query , options , fetch_fn , database_or_Container_link )
Queries documents in a collection.

        :param str database_or_Container_link:
            The link to the database when using partitioning, otherwise link to the document collection.
        :param (str or dict) query:
        :param dict options:
            The request options for the request.
        :param str partition_key:
            Partition key for the query(default value None)

        :return:
            Query Iterable of Documents.
        :rtype:
            query_iterable.QueryIterable