diff --git a/README.md b/README.md index 738137d..447daa2 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,9 @@ Opens a namespace specified or creates a namespace if it does not exist #### Arguments: namespace (string): A name of a namespace - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -179,7 +181,9 @@ Closes a namespace specified #### Arguments: namespace (string): A name of a namespace - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -198,7 +202,9 @@ Drops a namespace specified #### Arguments: namespace (string): A name of a namespace - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: Exception: Raises with an error message when Reindexer instance is not initialized yet @@ -220,7 +226,9 @@ Gets a list of namespaces available #### Arguments: enum_not_opened (bool, optional): An enumeration mode flag. If it is set then closed namespaces are in result list too. Defaults to False - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`list` of :obj:`dict`): A list of dictionaries which describe each namespace @@ -245,7 +253,9 @@ Adds an index to the namespace specified #### Arguments: namespace (string): A name of a namespace index_def (dict): A dictionary of index definition - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -267,7 +277,9 @@ Updates an index in the namespace specified #### Arguments: namespace (string): A name of a namespace index_def (dict): A dictionary of index definition - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -289,7 +301,9 @@ Drops an index from the namespace specified #### Arguments: namespace (string): A name of a namespace index_name (string): A name of an index - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -314,7 +328,9 @@ Inserts an item with its precepts to the namespace specified namespace (string): A name of a namespace item_def (dict): A dictionary of item definition precepts (:obj:`list` of :obj:`str`): A dictionary of index definition - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -339,7 +355,9 @@ Updates an item with its precepts in the namespace specified namespace (string): A name of a namespace item_def (dict): A dictionary of item definition precepts (:obj:`list` of :obj:`str`): A dictionary of index definition - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -364,7 +382,9 @@ Updates an item with its precepts in the namespace specified. Creates the item i namespace (string): A name of a namespace item_def (dict): A dictionary of item definition precepts (:obj:`list` of :obj:`str`): A dictionary of index definition - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -386,7 +406,9 @@ Deletes an item from the namespace specified #### Arguments: namespace (string): A name of a namespace item_def (dict): A dictionary of item definition - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -410,7 +432,9 @@ Puts metadata to a storage of Reindexer by key namespace (string): A name of a namespace key (string): A key in a storage of Reindexer for metadata keeping value (string): A metadata for storage - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -431,7 +455,9 @@ Gets metadata from a storage of Reindexer by key specified #### Arguments: namespace (string): A name of a namespace key (string): A key in a storage of Reindexer where metadata is kept - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: string: A metadata value @@ -455,7 +481,9 @@ Deletes metadata from a storage of Reindexer by key specified #### Arguments: namespace (string): A name of a namespace key (string): A key in a storage of Reindexer where metadata is kept - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -475,7 +503,9 @@ Gets a list of metadata keys from a storage of Reindexer #### Arguments: namespace (string): A name of a namespace - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`list` of :obj:`str`): A list of all metadata keys @@ -498,7 +528,9 @@ Executes an SQL query and returns query results #### Arguments: query (string): An SQL query - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`QueryResults`): A QueryResults iterator @@ -522,7 +554,9 @@ Starts a new transaction and return the transaction object to processing. #### Arguments: namespace (string): A name of a namespace - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`Transaction`): A new transaction @@ -750,7 +784,9 @@ def commit(timeout: timedelta = timedelta(milliseconds=0)) -> None Applies changes #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: TransactionError: Raises with an error message of API return if Transaction is over @@ -767,7 +803,9 @@ def commit_with_count(timeout: timedelta = timedelta(milliseconds=0)) -> int Applies changes and return the number of count of changed items #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: TransactionError: Raises with an error message of API return if Transaction is over @@ -784,7 +822,9 @@ def rollback(timeout: timedelta = timedelta(milliseconds=0)) -> None Rollbacks changes #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: TransactionError: Raises with an error message of API return if Transaction is over @@ -1391,7 +1431,9 @@ def execute(timeout: timedelta = timedelta(milliseconds=0)) -> QueryResults Executes a select query #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`QueryResults`): A QueryResults iterator @@ -1411,7 +1453,9 @@ def delete(timeout: timedelta = timedelta(milliseconds=0)) -> int Executes a query, and delete items, matches query #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (int): Number of deleted elements @@ -1505,7 +1549,9 @@ def update(timeout: timedelta = timedelta(milliseconds=0)) -> QueryResults Executes update query, and update fields in items, which matches query #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`QueryResults`): A QueryResults iterator @@ -1526,7 +1572,9 @@ def must_execute(timeout: timedelta = timedelta( Executes a query, and update fields in items, which matches query, with status check #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`QueryResults`): A QueryResults iterator @@ -1546,7 +1594,9 @@ def get(timeout: timedelta = timedelta(milliseconds=0)) -> (str, bool) Executes a query, and return 1 JSON item #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:tuple:string,bool): 1st string item and found flag diff --git a/pyreindexer/query.py b/pyreindexer/query.py index 169b70c..515e15f 100644 --- a/pyreindexer/query.py +++ b/pyreindexer/query.py @@ -738,7 +738,9 @@ def execute(self, timeout: timedelta = timedelta(milliseconds=0)) -> QueryResult """Executes a select query #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`QueryResults`): A QueryResults iterator @@ -762,7 +764,9 @@ def delete(self, timeout: timedelta = timedelta(milliseconds=0)) -> int: """Executes a query, and delete items, matches query #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (int): Number of deleted elements @@ -858,7 +862,9 @@ def update(self, timeout: timedelta = timedelta(milliseconds=0)) -> QueryResults """Executes update query, and update fields in items, which matches query #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`QueryResults`): A QueryResults iterator @@ -882,7 +888,9 @@ def must_execute(self, timeout: timedelta = timedelta(milliseconds=0)) -> QueryR """Executes a query, and update fields in items, which matches query, with status check #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`QueryResults`): A QueryResults iterator @@ -901,7 +909,9 @@ def get(self, timeout: timedelta = timedelta(milliseconds=0)) -> (str, bool): """Executes a query, and return 1 JSON item #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:tuple:string,bool): 1st string item and found flag diff --git a/pyreindexer/rx_connector.py b/pyreindexer/rx_connector.py index 620e0a9..de5b19b 100644 --- a/pyreindexer/rx_connector.py +++ b/pyreindexer/rx_connector.py @@ -115,7 +115,9 @@ def namespace_open(self, namespace: str, timeout: timedelta = timedelta(millisec #### Arguments: namespace (string): A name of a namespace - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -132,7 +134,9 @@ def namespace_close(self, namespace: str, timeout: timedelta = timedelta(millise #### Arguments: namespace (string): A name of a namespace - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -149,7 +153,9 @@ def namespace_drop(self, namespace: str, timeout: timedelta = timedelta(millisec #### Arguments: namespace (string): A name of a namespace - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: Exception: Raises with an error message when Reindexer instance is not initialized yet @@ -168,7 +174,9 @@ def namespaces_enum(self, enum_not_opened: bool = False, #### Arguments: enum_not_opened (bool, optional): An enumeration mode flag. If it is set then closed namespaces are in result list too. Defaults to False - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`list` of :obj:`dict`): A list of dictionaries which describe each namespace @@ -190,7 +198,9 @@ def index_add(self, namespace: str, index_def: Dict, timeout: timedelta = timede #### Arguments: namespace (string): A name of a namespace index_def (dict): A dictionary of index definition - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -208,7 +218,9 @@ def index_update(self, namespace: str, index_def: Dict, timeout: timedelta = tim #### Arguments: namespace (string): A name of a namespace index_def (dict): A dictionary of index definition - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -226,7 +238,9 @@ def index_drop(self, namespace: str, index_name: str, timeout: timedelta = timed #### Arguments: namespace (string): A name of a namespace index_name (string): A name of an index - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -246,7 +260,9 @@ def item_insert(self, namespace: str, item_def: Dict, precepts: List[str] = None namespace (string): A name of a namespace item_def (dict): A dictionary of item definition precepts (:obj:`list` of :obj:`str`): A dictionary of index definition - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -267,7 +283,9 @@ def item_update(self, namespace: str, item_def: Dict, precepts: List[str] = None namespace (string): A name of a namespace item_def (dict): A dictionary of item definition precepts (:obj:`list` of :obj:`str`): A dictionary of index definition - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -288,7 +306,9 @@ def item_upsert(self, namespace: str, item_def: Dict, precepts: List[str] = None namespace (string): A name of a namespace item_def (dict): A dictionary of item definition precepts (:obj:`list` of :obj:`str`): A dictionary of index definition - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -307,7 +327,9 @@ def item_delete(self, namespace: str, item_def: Dict, timeout: timedelta = timed #### Arguments: namespace (string): A name of a namespace item_def (dict): A dictionary of item definition - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -326,7 +348,9 @@ def meta_put(self, namespace: str, key: str, value: str, timeout: timedelta = ti namespace (string): A name of a namespace key (string): A key in a storage of Reindexer for metadata keeping value (string): A metadata for storage - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -344,7 +368,9 @@ def meta_get(self, namespace: str, key: str, timeout: timedelta = timedelta(mill #### Arguments: namespace (string): A name of a namespace key (string): A key in a storage of Reindexer where metadata is kept - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: string: A metadata value @@ -366,7 +392,9 @@ def meta_delete(self, namespace: str, key: str, timeout: timedelta = timedelta(m #### Arguments: namespace (string): A name of a namespace key (string): A key in a storage of Reindexer where metadata is kept - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet @@ -383,7 +411,9 @@ def meta_enum(self, namespace: str, timeout: timedelta = timedelta(milliseconds= #### Arguments: namespace (string): A name of a namespace - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`list` of :obj:`str`): A list of all metadata keys @@ -404,7 +434,9 @@ def select(self, query: str, timeout: timedelta = timedelta(milliseconds=0)) -> #### Arguments: query (string): An SQL query - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`QueryResults`): A QueryResults iterator @@ -427,7 +459,9 @@ def new_transaction(self, namespace: str, timeout: timedelta = timedelta(millise #### Arguments: namespace (string): A name of a namespace - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Returns: (:obj:`Transaction`): A new transaction @@ -484,7 +518,9 @@ def _api_connect(self, dsn: str, timeout: timedelta) -> None: #### Arguments: dsn (string): The connection string which contains a protocol - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: ConnectionError: Raises with an error message when Reindexer instance is not initialized yet diff --git a/pyreindexer/transaction.py b/pyreindexer/transaction.py index bfa750a..f83b9cd 100644 --- a/pyreindexer/transaction.py +++ b/pyreindexer/transaction.py @@ -144,7 +144,9 @@ def commit(self, timeout: timedelta = timedelta(milliseconds=0)) -> None: """Applies changes #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: TransactionError: Raises with an error message of API return if Transaction is over @@ -161,7 +163,9 @@ def commit_with_count(self, timeout: timedelta = timedelta(milliseconds=0)) -> i """Applies changes and return the number of count of changed items #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: TransactionError: Raises with an error message of API return if Transaction is over @@ -179,7 +183,9 @@ def rollback(self, timeout: timedelta = timedelta(milliseconds=0)) -> None: """Rollbacks changes #### Arguments: - timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation + timeout (`datetime.timedelta`): Optional timeout for performing a server-side operation. + Minimum 1 millisecond, if set to a value less, it corresponds to disabling the timeout. + A value of 0 disables the timeout (default value) #### Raises: TransactionError: Raises with an error message of API return if Transaction is over