Neo4j
Module: implementation.datasources.db
Neo4jClient
Neo4j client
__init__
Arguments:
url (str): Connetcion URL.
user (str): Authentication user.
password (str): Authentication password.
close
Close driver.
session
Arguments:
database (str): Database name.
Returns:
Session: Neo4j session.
Neo4jWriteAction
Subclass of Action. Type of Action[Dict[str, Any], Any]
__init__
Arguments:
database (str): Database name.
transaction_function (Callable[[ManagedTransaction, Any], Any]): Transaction that will be executed. More about transaction_functions:
client (Neo4jClient): Client that will be used.
name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.
execute
Arguments:
input_data (Dict[str, Any]): Expected keys:
"args" (List[Any], optional): Positional arguments for transaction function.
"kwargs" (Dict[str, Any], optional): Keyword arguments for transaction function.
Returns:
Any: Result of the executed transaction
Neo4jReadAction
Subclass of Action. Type of Action[Dict[str, Any], Any]
__init__
Arguments:
database (str): Database name.
transaction_function (Callable[[ManagedTransaction, Any], Any]): Transaction that will be executed. More about transaction_functions:
client (Neo4jClient): Client that will be used.
name (Optional[str], optional): Name for identification. If equals to None, class name will be used. Defaults to None.
execute
Arguments:
input_data (Dict[str, Any]): Expected keys:
"args" (List[Any], optional): Positional arguments for transaction function.
"kwargs" (Dict[str, Any], optional): Keyword arguments for transaction function.
Returns:
Any: Result of the executed transaction
Last updated