Python OJAI Client API
ojai.store.Connection.Connection Class Reference

Public Member Functions

def create_store (self, store_path)
 
def is_store_exists (self, store_path)
 
def delete_store (self, store_path)
 
def get_store (self, store_path)
 
def new_document (self, json_string=None, dictionary=None)
 
def new_mutation (self)
 
def new_condition (self)
 
def new_query (self, query_json=None)
 
def close (self)
 

Detailed Description

The Connection class defines the APIs to perform actions with storage.
In client you may use static method:
ConnectionFactory.get_connection(connection_str, options=None)

Member Function Documentation

◆ close()

def ojai.store.Connection.Connection.close (   self)
Close connection with server.

◆ create_store()

def ojai.store.Connection.Connection.create_store (   self,
  store_path 
)
Creates a store into database and returns a DocumentStore instance, otherwise raise error
:param store_path: store path
:raises StoreError
:return DocumentStore

◆ delete_store()

def ojai.store.Connection.Connection.delete_store (   self,
  store_path 
)
Delete a store from database and returns boolean, otherwise raise error
:param store_path: store path
:raises StoreError
:return boolean

◆ get_store()

def ojai.store.Connection.Connection.get_store (   self,
  store_path 
)
Returns a handle to an OJAI DocumentStore specified by the given name or path.
:param store_path: name or path of an OJAI data source table.

◆ is_store_exists()

def ojai.store.Connection.Connection.is_store_exists (   self,
  store_path 
)
Check is given store path exists in database.
:param store_path: store path
:raises StoreError
:return boolean

◆ new_condition()

def ojai.store.Connection.Connection.new_condition (   self)
Creates and returns a new QueryCondition object.
:return QueryCondition

◆ new_document()

def ojai.store.Connection.Connection.new_document (   self,
  json_string = None,
  dictionary = None 
)
Creates and returns a new, empty instance of an OJAI Document.
:param json_string: string representation of Document.
:param dictionary: python dict representation of Document.
:return Document

◆ new_mutation()

def ojai.store.Connection.Connection.new_mutation (   self)
Creates and returns a new DocumentMutation object.
:return DocumentMutation

◆ new_query()

def ojai.store.Connection.Connection.new_query (   self,
  query_json = None 
)
Creates and returns empty or decoded from query_json new Query object.
:param query_json: QUERY json, represents as string.
:return: Query

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