Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from pyravendb.data.indexes import SortOptions
from pyravendb.custom_exceptions.exceptions import InvalidOperationException
from datetime import datetime, timedelta
from pyravendb.tools.utils import Utils
import inflect
inflect.def_classical["names"] = False
inflector = inflect.engine()
class DocumentConventions(object):
def __init__(self, **kwargs):
self.max_number_of_request_per_session = kwargs.get("max_number_of_request_per_session", 30)
self.max_ids_to_catch = kwargs.get("max_ids_to_catch", 32)
# timeout for wait to server in seconds
self.timeout = kwargs.get("timeout", timedelta(seconds=30))
self.use_optimistic_concurrency = kwargs.get("use_optimistic_concurrency", False)
self.json_default_method = DocumentConventions._json_default
self.max_length_of_query_using_get_url = kwargs.get("max_length_of_query_using_get_url", 1024 + 512)
self.identity_parts_separator = "/"
self.disable_topology_update = kwargs.get("disable_topology_update", False)
# If set to 'true' then it will throw an exception when any query is performed (in session)
# without explicit page size set