Python OJAI Client API Class Reference

Public Member Functions

def select (self, field_paths)
def where (self, condition)
def order_by (self, field_paths, order=None)
def offset (self, offset)
def limit (self, limit)
def build (self)

Detailed Description

OJAI interface which lets users build an OJAI Query that can be executed
on an OJAI DocumentStore.

Member Function Documentation

◆ build()

def (   self)
Builds this Query object and make it immutable.

◆ limit()

def (   self,
Restricts the maximum number of documents returned from this query
to the specified value. Negative values are not permitted.
:param limit: maximum number of returned documents. Long or int type.
:return self for chained invocation.

◆ offset()

def (   self,
Zero (0) based index which specifies number of Documents to skip before
returning any result. Negative values are not permitted.
Multiple invocation will overwrite the previous value.
:param offset: long or int value.
:return self for chained invocation.

◆ order_by()

def (   self,
  order = None 
Sets the sort ordering of the returned Documents to the ascending order of specified field paths.
:param field_paths: specified field paths. Type may be str or FieldPath.
:param order: order.
:return self for chained invocation.

◆ select()

def (   self,
Adds the list of field paths to the list of projected fields.
If not specified, the entire Document will be returned.
Multiple invocation will append new fields to the list.
:param field_paths: path to the selected fields.
:return self for chained invocation.

◆ where()

def (   self,
Sets the filtering condition for the query.
:param condition: query condition, represent as str or QueryCondition object.
:return self for chained invocation.

The documentation for this class was generated from the following file: