Beispiel #1
0
 def session(self,
             database: str,
             session_type: SessionType,
             options=None) -> Session:
     if not options:
         options = GraknOptions.cluster()
     return _RPCSessionCluster(self, database, session_type, options)
Beispiel #2
0
 def transaction(self,
                 transaction_type: TransactionType,
                 options: GraknClusterOptions = None) -> Transaction:
     if not options:
         options = GraknOptions.cluster()
     return self._transaction_secondary_replica(
         transaction_type, options
     ) if options.allow_secondary_replica else self._transaction_primary_replica(
         transaction_type, options)