Ejemplo n.º 1
0
    def __init__(self,
                 protocol='http',
                 host='127.0.0.1',
                 port=8529,
                 username='******',
                 password='',
                 verify=False,
                 http_client=None,
                 enable_logging=True):

        self._protocol = protocol
        self._host = host
        self._port = port
        self._username = username
        self._password = password
        self._http_client = http_client or DefaultHTTPClient()
        self._logging = enable_logging
        self._conn = Connection(protocol=self._protocol,
                                host=self._host,
                                port=self._port,
                                database='_system',
                                username=self._username,
                                password=self._password,
                                http_client=self._http_client,
                                enable_logging=self._logging)
        self._wal = WriteAheadLog(self._conn)

        if verify:
            self.verify()
Ejemplo n.º 2
0
    def __init__(self,
                 protocol='http',
                 host='127.0.0.1',
                 port=8529,
                 username='******',
                 password='',
                 verify=False,
                 http_client=None,
                 enable_logging=True,
                 check_cert=True,
                 use_session=True,
                 logger=None):

        self._protocol = protocol
        self._host = host
        self._port = port
        self._username = username
        self._password = password
        self._http_client = DefaultHTTPClient(
            use_session=use_session,
            check_cert=check_cert) if http_client is None else http_client
        self._logging_enabled = enable_logging
        self._conn = Connection(protocol=self._protocol,
                                host=self._host,
                                port=self._port,
                                database='_system',
                                username=self._username,
                                password=self._password,
                                http_client=self._http_client,
                                enable_logging=self._logging_enabled,
                                logger=logger)
        self._wal = WriteAheadLog(self._conn)

        if verify:
            self.verify()
Ejemplo n.º 3
0
 def __init__(self, connection):
     self._conn = connection
     self._aql = AQL(self._conn)
     self._wal = WriteAheadLog(self._conn)