diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 660eaba..ef5b20c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,9 +21,10 @@ jobs: make dev - name: Start immudb container run: | - docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v ${{ github.workspace }}/tests/certs/my.key.pem:/key.pem -p 3322:3322 codenotary/immudb:1.3.2 --signingKey=/key.pem - docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v ${{ github.workspace }}/tests/certs/my.key.pem:/key.pem -p 3333:3322 codenotary/immudb:1.2.4 --signingKey=/key.pem - docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v ${{ github.workspace }}/tests/certs/my.key.pem:/key.pem -p 3344:3322 codenotary/immudb:1.1.0 --signingKey=/key.pem + docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v ${{ github.workspace }}/tests/certs/my.key.pem:/key.pem -p 3322:3322 codenotary/immudb:1.4.0 --signingKey=/key.pem + docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v ${{ github.workspace }}/tests/certs/my.key.pem:/key.pem -p 3333:3322 codenotary/immudb:1.3.2 --signingKey=/key.pem + docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v ${{ github.workspace }}/tests/certs/my.key.pem:/key.pem -p 3344:3322 codenotary/immudb:1.2.4 --signingKey=/key.pem + docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v ${{ github.workspace }}/tests/certs/my.key.pem:/key.pem -p 3355:3322 codenotary/immudb:1.1.0 --signingKey=/key.pem - name: Run tests run: | make test diff --git a/immudb/client.py b/immudb/client.py index 134bf71..dfb1a55 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -10,16 +10,23 @@ # See the License for the specific language governing permissions and # limitations under the License. +from io import BytesIO +from typing import Dict, Generator, List, Tuple, Union import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from immudb import grpcutils +from immudb import datatypes +from immudb.exceptions import ErrCorruptedData +from immudb.grpc.schema_pb2 import Chunk, TxHeader, ZAddRequest from immudb.handler import (batchGet, batchSet, changePassword, changePermission, createUser, currentRoot, createDatabase, databaseList, deleteKeys, useDatabase, get, listUsers, sqldescribe, verifiedGet, verifiedSet, setValue, history, scan, reference, verifiedreference, zadd, verifiedzadd, zscan, healthcheck, health, txbyid, verifiedtxbyid, sqlexec, sqlquery, - listtables, execAll, transaction) + listtables, execAll, transaction, verifiedSQLGet) + +from immudb.handler.verifiedtxbyid import verify as verifyTransaction from immudb.rootService import * from immudb.grpc import schema_pb2_grpc import warnings @@ -28,48 +35,102 @@ from immudb.embedded.store import KVMetadata import threading import queue +import immudb.datatypesv2 as datatypesv2 +import immudb.dataconverter as dataconverter import datetime +from immudb.streamsutils import AtTXHeader, KeyHeader, ProvenSinceHeader, ScoreHeader, SetHeader, StreamReader, ValueChunk, ValueChunkHeader, BufferedStreamReader, VerifiedGetStreamReader, ZScanStreamReader + class ImmudbClient: - def __init__(self, immudUrl=None, rs: RootService = None, publicKeyFile: str = None, timeout=None): + def __init__(self, immudUrl=None, rs: RootService = None, publicKeyFile: str = None, timeout=None, max_grpc_message_length=None): + """immudb Client + + Args: + immudbUrl (str, optional): url in format ``host:port`` + (e.g. ``localhost:3322``) of your immudb instance. + Defaults to ``localhost:3322`` when no value is set. + rs (RootService, optional): object that implements RootService, + allowing requests to be verified. Optional. + By default in-memory RootService instance will be created + publicKeyFile (str, optional): path of the public key to use + for authenticating requests. Optional. + timeout (int, optional): global timeout for GRPC requests. Requests + will hang until the server responds if no timeout is set. + max_grpc_message_length (int, optional): maximum size of message the + server should send. The default (4Mb) is used is no value is set. + """ if immudUrl is None: immudUrl = "localhost:3322" self.timeout = timeout - self.channel = grpc.insecure_channel(immudUrl) + options = [] + if max_grpc_message_length: + options = [('grpc.max_receive_message_length', + max_grpc_message_length)] + self.channel = grpc.insecure_channel(immudUrl, options=options) + else: + self.channel = grpc.insecure_channel(immudUrl) self._resetStub() if rs is None: - self.__rs = RootService() + self._rs = RootService() else: - self.__rs = rs - self.__url = immudUrl - self.loadKey(publicKeyFile) - self.__login_response = None - self._session_response = None + self._rs = rs + self._url = immudUrl + self._vk = None + if publicKeyFile: + self.loadKey(publicKeyFile) def loadKey(self, kfile: str): - if kfile is None: - self.__vk = None - else: - with open(kfile) as f: - self.__vk = ecdsa.VerifyingKey.from_pem(f.read()) + """Loads public key from path + + Args: + kfile (str): key file path + """ + with open(kfile) as f: + self._vk = ecdsa.VerifyingKey.from_pem(f.read()) + + def loadKeyFromString(self, key: str): + """Loads public key from parameter + + Args: + key (str): key + """ + self._vk = ecdsa.VerifyingKey.from_pem(key) def shutdown(self): + """Shutdowns client + """ self.channel.close() self.channel = None self.intercept_channel.close self.intercept_channel = None - self.__rs = None + self._rs = None - def set_session_id_interceptor(self, openSessionResponse): + def _set_session_id_interceptor(self, openSessionResponse): + """Helper function to set session id interceptor + + Args: + openSessionResponse (OpenSessionresponse): session response + + Returns: + Stub: Intercepted stub + """ sessionId = openSessionResponse.sessionID self.headersInterceptors = [ grpcutils.header_adder_interceptor('sessionid', sessionId)] - return self.get_intercepted_stub() + return self._get_intercepted_stub() - def set_token_header_interceptor(self, response): + def _set_token_header_interceptor(self, response): + """Helper function that sets token header interceptor + + Args: + response (LoginResponse): login response + + Returns: + Stub: Intercepted stub + """ try: token = response.token except AttributeError: @@ -79,9 +140,14 @@ def set_token_header_interceptor(self, response): 'authorization', "Bearer " + token ) ] - return self.get_intercepted_stub() + return self._get_intercepted_stub() + + def _get_intercepted_stub(self): + """Helper function that returns intercepted stub - def get_intercepted_stub(self): + Returns: + Stub: Intercepted stub + """ allInterceptors = self.headersInterceptors + self.clientInterceptors intercepted, newStub = grpcutils.get_intercepted_stub( self.channel, allInterceptors) @@ -90,50 +156,72 @@ def get_intercepted_stub(self): @property def stub(self): - return self.__stub + return self._stub -# from here on same order as in Golang ImmuClient interface (pkg/client/client.go) - - # Not implemented: disconnect - # Not implemented: isConnected - # Not implemented: waitForHealthCheck def healthCheck(self): - return healthcheck.call(self.__stub, self.__rs) + """Retrieves health response of immudb + + Returns: + HealthResponse: contains status and version + """ + return healthcheck.call(self._stub, self._rs) - # Not implemented: connect def _convertToBytes(self, what): + """Helper function that converts something to bytes with utf-8 encoding + + Args: + what (UTF-8Encodable): Something that could be convert into utf-8 + + Returns: + bytes: Converted object + """ if (type(what) != bytes): return bytes(what, encoding='utf-8') return what def login(self, username, password, database=b"defaultdb"): + """Logins into immudb + + Args: + username (str): username + password (str): password for user + database (bytes, optional): database to switch to. Defaults to b"defaultdb". + + Raises: + Exception: if user tries to login on shut down client + + Returns: + LoginResponse: contains token and warning if any + """ convertedUsername = self._convertToBytes(username) convertedPassword = self._convertToBytes(password) convertedDatabase = self._convertToBytes(database) req = schema_pb2_grpc.schema__pb2.LoginRequest( user=convertedUsername, password=convertedPassword) + login_response = None try: - self.__login_response = schema_pb2_grpc.schema__pb2.LoginResponse = \ - self.__stub.Login( + login_response = schema_pb2_grpc.schema__pb2.LoginResponse = \ + self._stub.Login( req ) except ValueError as e: raise Exception( "Attempted to login on termninated client, channel has been shutdown") from e - self.__stub = self.set_token_header_interceptor(self.__login_response) + self._stub = self._set_token_header_interceptor(login_response) # Select database, modifying stub function accordingly request = schema_pb2_grpc.schema__pb2.Database( databaseName=convertedDatabase) - resp = self.__stub.UseDatabase(request) - self.__stub = self.set_token_header_interceptor(resp) + resp = self._stub.UseDatabase(request) + self._stub = self._set_token_header_interceptor(resp) - self.__rs.init("{}/{}".format(self.__url, database), self.__stub) - return self.__login_response + self._rs.init("{}/{}".format(self._url, database), self._stub) + return login_response def logout(self): - self.__stub.Logout(google_dot_protobuf_dot_empty__pb2.Empty()) - self.__login_response = None + """Logouts all sessions + """ + self._stub.Logout(google_dot_protobuf_dot_empty__pb2.Empty()) self._resetStub() def _resetStub(self): @@ -142,13 +230,41 @@ def _resetStub(self): if (self.timeout != None): self.clientInterceptors.append( grpcutils.timeout_adder_interceptor(self.timeout)) - self.__stub = schema_pb2_grpc.ImmuServiceStub(self.channel) - self.__stub = self.get_intercepted_stub() + self._stub = schema_pb2_grpc.ImmuServiceStub(self.channel) + self._stub = self._get_intercepted_stub() def keepAlive(self): - self.__stub.KeepAlive(google_dot_protobuf_dot_empty__pb2.Empty()) + """Sends keep alive packet + """ + self._stub.KeepAlive(google_dot_protobuf_dot_empty__pb2.Empty()) def openManagedSession(self, username, password, database=b"defaultdb", keepAliveInterval=60): + """Opens a session managed by immudb. + + When a ManagedSession is used, the client will automatically + send keepalive packets to the server. If you are managing + your application's threading yourself and want control over + how keepalive packets are sent, consider the method + :meth:`ImmudbClient.openSession()` instead. + + + Examples: + with client.openManagedSession(username, password) as session: + session.newTx() + + Check handler/transaction.py + + Args: + username (str): username + password (str): password for user + database (bytes, optional): database to establish session with. + Defaults to ``b"defaultdb"``. + keepAliveInterval (int, optional): specifies how often keepalive + packets should be sent, in seconds. Defaults to ``60s``. + + Returns: + ManagedSession: managed Session object + """ class ManagedSession: def __init__(this, keepAliveInterval): this.keepAliveInterval = keepAliveInterval @@ -178,6 +294,24 @@ def __exit__(this, type, value, traceback): return ManagedSession(keepAliveInterval) def openSession(self, username, password, database=b"defaultdb"): + """Opens unmanaged Session object. + + When a Session is unmanaged, it is the user's responsibility + to send keepalive packets. You should use an unmanaged session + when you are also managing your application's threading yourself. + + To have the client manage the session and send keepalive packets + for you, use :meth:`ImmudbClient.openManagedSession()` instead. + + Args: + username (str): username + password (str): password + database (bytes, optional): database to establish session with. + Defaults to ``b"defaultdb"``. + + Returns: + Tx: Tx object (handlers/transaction.py) + """ convertedUsername = self._convertToBytes(username) convertedPassword = self._convertToBytes(password) convertedDatabase = self._convertToBytes(database) @@ -186,178 +320,1277 @@ def openSession(self, username, password, database=b"defaultdb"): password=convertedPassword, databaseName=convertedDatabase ) - self._session_response = self.__stub.OpenSession( + session_response = self._stub.OpenSession( req) - self.__stub = self.set_session_id_interceptor(self._session_response) - return transaction.Tx(self.__stub, self._session_response, self.channel) + self._stub = self._set_session_id_interceptor(session_response) + return transaction.Tx(self._stub, session_response, self.channel) def closeSession(self): - self.__stub.CloseSession(google_dot_protobuf_dot_empty__pb2.Empty()) - self._session_response = None + """Closes unmanaged session + """ + self._stub.CloseSession(google_dot_protobuf_dot_empty__pb2.Empty()) self._resetStub() def createUser(self, user, password, permission, database): + """Creates user specified in parameters + + Args: + user (str): username + password (str): password + permission (int): permissions (constants.PERMISSION_X) + database (str): database name + + """ request = schema_pb2_grpc.schema__pb2.CreateUserRequest( user=bytes(user, encoding='utf-8'), password=bytes(password, encoding='utf-8'), permission=permission, database=database ) - return createUser.call(self.__stub, self.__rs, request) + return createUser.call(self._stub, self._rs, request) def listUsers(self): - return listUsers.call(self.__stub, None) + """Returns all database users. + + Returns: + ListUserResponse: List containing all database users. + + If this method is called by an authenticated Superadmin user, + the ListUserResponse object will contain all known users. + + If this method is called by an authenticated Admin users, + the response will contain the list of users for the + current database. + + """ + return listUsers.call(self._stub) def changePassword(self, user, newPassword, oldPassword): + """Changes password for user + + Args: + user (str): username + newPassword (str): new password + oldPassword (str): old password + + Comment: + SysAdmin can change his own password only by giving old and new password. + SysAdmin user can change password of any other user without old password. + Admin users can change password for user only created by that admin without old password. + + + """ request = schema_pb2_grpc.schema__pb2.ChangePasswordRequest( user=bytes(user, encoding='utf-8'), newPassword=bytes(newPassword, encoding='utf-8'), oldPassword=bytes(oldPassword, encoding='utf-8') ) - return changePassword.call(self.__stub, self.__rs, request) + return changePassword.call(self._stub, self._rs, request) - def changePermission(self, action, user, database, permissions): - return changePermission.call(self.__stub, self.__rs, action, user, database, permissions) + def changePermission(self, action, user, database, permission): + """Changes permission for user - # Not implemented: updateAuthConfig - # Not implemented: updateMTLSConfig - - # Not implemented: with[.*] + Args: + action (int): GRANT or REVOKE - see constants/PERMISSION_GRANT + user (str): username + database (str): database name + permission (int): permission to revoke/ grant - see constants/PERMISSION_GRANT - # Not implemented: getServiceClient - # Not implemented: getOptions - # Not implemented: setupDialOptions + Returns: + _type_: _description_ + """ + return changePermission.call(self._stub, self._rs, action, user, database, permission) def databaseList(self): - dbs = databaseList.call(self.__stub, self.__rs, None) - return [x.databaseName for x in dbs.dblist.databases] + """Returns database list - # Not implemented: databaseListV2 + Returns: + list[str]: database names + """ + dbs = databaseList.call(self._stub, self._rs, None) + return [x.databaseName for x in dbs.dblist.databases] def createDatabase(self, dbName: bytes): + """Creates database + + Args: + dbName (bytes): name of database + + """ request = schema_pb2_grpc.schema__pb2.Database(databaseName=dbName) - return createDatabase.call(self.__stub, self.__rs, request) + return createDatabase.call(self._stub, self._rs, request) + + def createDatabaseV2(self, name: str, settings: datatypesv2.DatabaseSettingsV2, ifNotExists: bool) -> datatypesv2.CreateDatabaseResponseV2: + """Creates database with settings + + Args: + name (str): Name of database + settings (datatypesv2.DatabaseSettingsV2): Settings of database + ifNotExists (bool): only create a database if it does not exist yet. + + Returns: + datatypesv2.CreateDatabaseResponseV2: Response contains information about new database + """ + request = datatypesv2.CreateDatabaseRequest( + name=name, settings=settings, ifNotExists=ifNotExists) + resp = self._stub.CreateDatabaseV2(request._getGRPC()) + return dataconverter.convertResponse(resp) + + def databaseListV2(self) -> datatypesv2.DatabaseListResponseV2: + """Lists databases + + Returns: + datatypesv2.DatabaseListResponseV2: List of databases + """ + req = datatypesv2.DatabaseListRequestV2() + resp = self._stub.DatabaseListV2(req._getGRPC()) + return dataconverter.convertResponse(resp) - # Not implemented: createDatabaseV2 - # Not implemented: loadDatabase - # Not implemented: unloadDatabase - # Not implemented: deleteDatabase + def loadDatabase(self, database: str) -> datatypesv2.LoadDatabaseResponse: + """Loads database provided with argument + + Args: + database (str): Name of database + + Returns: + datatypesv2.LoadDatabaseResponse: Contains name of just loaded database + """ + req = datatypesv2.LoadDatabaseRequest(database) + resp = self._stub.LoadDatabase(req._getGRPC()) + return dataconverter.convertResponse(resp) + + def unloadDatabase(self, database: str) -> datatypesv2.UnloadDatabaseResponse: + """Unloads provided database + + Args: + database (str): Name of database + + Returns: + datatypesv2.UnloadDatabaseResponse: Contains name of just unloaded database + """ + req = datatypesv2.UnloadDatabaseRequest(database) + resp = self._stub.UnloadDatabase(req._getGRPC()) + return dataconverter.convertResponse(resp) + + def deleteDatabase(self, database: str) -> datatypesv2.DeleteDatabaseResponse: + """Deletes database provided with argument. Database needs to be unloaded first + + Args: + database (str): Name of database + + Returns: + datatypesv2.DeleteDatabaseResponse: Contains name of just deleted database + """ + req = datatypesv2.DeleteDatabaseResponse(database) + resp = self._stub.DeleteDatabase(req._getGRPC()) + return dataconverter.convertResponse(resp) + + def updateDatabaseV2(self, database: str, settings: datatypesv2.DatabaseSettingsV2) -> datatypesv2.UpdateDatabaseResponseV2: + """Updates database with provided argument + + Args: + database (str): Name of database + settings (datatypesv2.DatabaseSettingsV2): Settings of database + + Returns: + datatypesv2.UpdateDatabaseResponseV2: Contains name and settings of this database + """ + request = datatypesv2.UpdateDatabaseRequest(database, settings) + resp = self._stub.UpdateDatabaseV2(request._getGRPC()) + return dataconverter.convertResponse(resp) def useDatabase(self, dbName: bytes): + """Switches database + + Args: + dbName (bytes): database name + + """ request = schema_pb2_grpc.schema__pb2.Database(databaseName=dbName) - resp = useDatabase.call(self.__stub, self.__rs, request) - # modify header token accordingly - self.__stub = self.set_token_header_interceptor(resp) - self.__rs.init(dbName, self.__stub) + resp = useDatabase.call(self._stub, self._rs, request) + # modifies header token accordingly + self._stub = self._set_token_header_interceptor(resp) + self._rs.init(dbName, self._stub) return resp - # Not implemented: updateDatabase - # Not implemented: updateDatabaseV2 - # Not implemented: getDatabaseSettings - # Not implemented: getDatabaseSettingsV2 + def getDatabaseSettingsV2(self) -> datatypesv2.DatabaseSettingsResponseV2: + """Returns current database settings - # Not implemented: setActiveUser + Returns: + datatypesv2.DatabaseSettingsResponseV2: Contains current database name and settings + """ + req = datatypesv2.DatabaseSettingsRequest() + resp = self._stub.GetDatabaseSettingsV2(req._getGRPC()) + return dataconverter.convertResponse(resp) - # Not implemented: flushIndex + def setActiveUser(self, active: bool, username: str) -> bool: + """Sets user as active or not active + + Args: + active (bool): Should user be active + username (str): Username of user + + Returns: + bool: True if action was success + """ + req = datatypesv2.SetActiveUserRequest(active, username) + resp = self._stub.SetActiveUser(req._getGRPC()) + return resp == google_dot_protobuf_dot_empty__pb2.Empty() + + def flushIndex(self, cleanupPercentage: float, synced: bool) -> datatypesv2.FlushIndexResponse: + """Request a flush of the internal to disk, with the option to cleanup the index. + + This routine requests that the internal B-tree index be flushed from + memory to disk, optionally followed by a cleanup of intermediate index data. + + Args: + cleanupPercentage (float): Indicates the percentage of the + storage space that will be scanned for unreference data. Although + this operation blocks transaction processing, choosing a small + value (e.g. ``0.1``) may not significantly hinder normal operations, + and will reduce used storage space. + synced (bool): If `True`, ``fsync`` will be called after writing data + to avoid index regeneration in the event of an unexpected crash. + + Returns: + datatypesv2.FlushIndexResponse: Contains database name + """ + req = datatypesv2.FlushIndexRequest(cleanupPercentage, synced) + resp = self._stub.FlushIndex(req._getGRPC()) + return dataconverter.convertResponse(resp) def compactIndex(self): - self.__stub.CompactIndex(google_dot_protobuf_dot_empty__pb2.Empty()) + """Start full async index compaction. + + This creates a fresh index representing the current state of + the database, removing the intermediate index data generated over + time that is no longer needed to represent the current state. + + The :meth:`ImmudbClient.flushIndex()` method (with a `cleanupPercentage`) + argument specified) should be preferred over this method for compacting + the index. You should only call this method if there's little to no activity + on the database, or the performance of the database may be degraded + significantly while the compaction is in progress. + """ + resp = self._stub.CompactIndex( + google_dot_protobuf_dot_empty__pb2.Empty()) + return resp == google_dot_protobuf_dot_empty__pb2.Empty() def health(self): - return health.call(self.__stub, self.__rs) + """Retrieves health response of immudb + + Returns: + HealthResponse: contains status and version + """ + return health.call(self._stub, self._rs) + + def currentState(self) -> State: + """Return current state (proof) of current database. + + Returns: + State: State of current database, proving integrity of its data. + """ + return currentRoot.call(self._stub, self._rs, None) - def currentState(self): - return currentRoot.call(self.__stub, self.__rs, None) + def set(self, key: bytes, value: bytes) -> datatypes.SetResponse: + """Sets key into value in database - def set(self, key: bytes, value: bytes): - return setValue.call(self.__stub, self.__rs, key, value) + Args: + key (bytes): key + value (bytes): value + + Returns: + SetResponse: response of request + """ + return setValue.call(self._stub, self._rs, key, value) - def verifiedSet(self, key: bytes, value: bytes): - return verifiedSet.call(self.__stub, self.__rs, key, value, self.__vk) + def verifiedSet(self, key: bytes, value: bytes) -> datatypes.SetResponse: + """Sets key into value in database, and additionally checks it with state saved before - def expireableSet(self, key: bytes, value: bytes, expiresAt: datetime.datetime): + Args: + key (bytes): key + value (bytes): value + + Returns: + SetResponse: response of request + """ + return verifiedSet.call(self._stub, self._rs, key, value, self._vk) + + def expireableSet(self, key: bytes, value: bytes, expiresAt: datetime.datetime) -> datatypes.SetResponse: + """Sets key into value in database with additional expiration + + Args: + key (bytes): key + value (bytes): value + expiresAt (datetime.datetime): Expiration time + + Returns: + SetResponse: response of request + """ metadata = KVMetadata() metadata.ExpiresAt(expiresAt) - return setValue.call(self.__stub, self.__rs, key, value, metadata) + return setValue.call(self._stub, self._rs, key, value, metadata) + + def get(self, key: bytes, atRevision: int = None) -> datatypes.GetResponse: + """Get value for key. + + Args: + key (bytes): Key of value to retrieve. + atRevision (int, optional): + Specify the revision from which the value should be retrieved. + A negative integer value (e.g. ``-2``) specifies a revision relative + to the current revision. A positive integer value (e.g. ``32``) should + be used to represent a fixed revision number. If not specified, the + most recent value will be returned. + + Returns: + GetResponse: Contains `tx`, `value`, `key` and `revision` information. + """ + return get.call(self._stub, self._rs, key, atRevision=atRevision) + + def verifiedGet(self, key: bytes, atRevision: int = None) -> datatypes.SafeGetResponse: + """Get value for key and verify it against saved state. + + Args: + key (bytes): Key of value to retrieve. + atRevision (int, optional): + Specify the revision from which the value should be retrieved. + A negative integer value (e.g. ``-2``) specifies a revision relative + to the current revision. A positive integer value (e.g. ``32``) should + be used to represent a fixed revision number. If not specified, the + most recent value will be returned. + + Returns: + SafeGetResponse: Contains information about the transaction + and the verified state. + """ + return verifiedGet.call(self._stub, self._rs, key, verifying_key=self._vk, atRevision=atRevision) - def get(self, key: bytes, atRevision: int = None): - return get.call(self.__stub, self.__rs, key, atRevision=atRevision) + def verifiedGetSince(self, key: bytes, sinceTx: int) -> datatypes.SafeGetResponse: + """Get value for key since a given transaction (and wait if that transaction is not yet indexed). - # Not implemented: getSince - # Not implemented: getAt + This method retrieves the value for a given key, as of a given transaction + number in the database. If the transaction specified by ``sinceTx`` has not + yet been indexed by immudb, this method will block until it has been indexed. - def verifiedGet(self, key: bytes, atRevision: int = None): - return verifiedGet.call(self.__stub, self.__rs, key, verifying_key=self.__vk, atRevision=atRevision) + Args: + key (bytes): Key of value to retrieve. + sinceTx (int): Identifier of the earliest transaction from which the + key's value should be retrieved. If the specified transaction has + not been indexed by immudb, this method will block until it has. - def verifiedGetSince(self, key: bytes, sinceTx: int): - return verifiedGet.call(self.__stub, self.__rs, key, sinceTx=sinceTx, verifying_key=self.__vk) + Returns: + datatypes.SafeGetResponse: object that contains informations about transaction and verified state + """ + return verifiedGet.call(self._stub, self._rs, key, sinceTx=sinceTx, verifying_key=self._vk) - def verifiedGetAt(self, key: bytes, atTx: int): - return verifiedGet.call(self.__stub, self.__rs, key, atTx, self.__vk) + def verifiedGetAt(self, key: bytes, atTx: int) -> datatypes.SafeGetResponse: + """Get value for key at a given transaction point. - def history(self, key: bytes, offset: int, limit: int, sortorder: bool): - return history.call(self.__stub, self.__rs, key, offset, limit, sortorder) + Args: + key (bytes): Key of value to retrieve. + atTx (int): Identifier of the transaction at which point the key's + value should be retrieved. - def zAdd(self, zset: bytes, score: float, key: bytes, atTx: int = 0): - return zadd.call(self.__stub, self.__rs, zset, score, key, atTx) + Returns: + datatypes.SafeGetResponse: object that contains informations about transaction and verified state + """ + return verifiedGet.call(self._stub, self._rs, key, atTx, self._vk) + + def history(self, key: bytes, offset: int, limit: int, sortorder: bool) -> List[datatypes.historyResponseItem]: + """Returns history of values for a given key. + + Args: + key (bytes): Key of value to retrieve. + offset (int): Offset of history + limit (int): Limit of history entries + sortorder (bool, optional, deprecated): A boolean value that specifies if the history + should be returned in descending order. + + If ``True``, the history will be returned in descending order, + with the most recent value in the history being the first item in the list. + + If ``False``, the list will be sorted in ascending order, + with the most recent value in the history being the last item in the list. + + Returns: + List[datatypes.historyResponseItem]: List of history response items + """ + return history.call(self._stub, self._rs, key, offset, limit, sortorder) + + def zAdd(self, zset: bytes, score: float, key: bytes, atTx: int = 0) -> datatypes.SetResponse: + """Adds score (secondary index) for a specified key and collection. + + Args: + zset (bytes): collection name + score (float): score + key (bytes): key name + atTx (int, optional): Transaction id to bound score to. Defaults to 0, + indicating the most recent version should be used. + + Returns: + datatypes.SetResponse: Set response contains transaction id + """ + return zadd.call(self._stub, self._rs, zset, score, key, atTx) def verifiedZAdd(self, zset: bytes, score: float, key: bytes, atTx: int = 0): - return verifiedzadd.call(self.__stub, self.__rs, zset, score, key, atTx, self.__vk) + """Adds score (secondary index) for a specified key and collection. + Additionaly checks immudb state + + Args: + zset (bytes): collection name + score (float): score + key (bytes): key name + atTx (int, optional): transaction id to bound score to. Defaults to 0, + indicating the most recent version should be used. + + Returns: + datatypes.SetResponse: Set response contains transaction id + """ + return verifiedzadd.call(self._stub, self._rs, zset, score, key, atTx, self._vk) - # Not implemented: zAddAt - # Not implemented: verifiedZAddAt + def scan(self, key: bytes, prefix: bytes, desc: bool, limit: int, sinceTx: int = None) -> Dict[bytes, bytes]: + """Scans for provided parameters. Limit for scan is fixed - 1000. You need to introduce pagination. - def scan(self, key: bytes, prefix: bytes, desc: bool, limit: int, sinceTx: int = None): - return scan.call(self.__stub, self.__rs, key, prefix, desc, limit, sinceTx) + Args: + key (bytes): Seek key to find + prefix (bytes): Prefix of key + desc (bool): Descending or ascending order + limit (int): Limit of entries to get + sinceTx (int, optional): immudb will wait for transaction provided by sinceTx. Defaults to None. - def zScan(self, zset: bytes, seekKey: bytes, seekScore: float, - seekAtTx: int, inclusive: bool, limit: int, desc: bool, minscore: float, - maxscore: float, sinceTx=None, nowait=False): - return zscan.call(self.__stub, self.__rs, zset, seekKey, seekScore, + Returns: + Dict[bytes, bytes]: Dictionary of key and values + """ + return scan.call(self._stub, self._rs, key, prefix, desc, limit, sinceTx) + + def zScan(self, zset: bytes, seekKey: bytes = None, seekScore: float = None, + seekAtTx: int = None, inclusive: bool = None, limit: int = None, desc: bool = None, minscore: float = None, + maxscore: float = None, sinceTx=None, nowait=False) -> schema_pb2.ZEntries: + """Scan for provided parameters for secondary index. Limit for scan is fixed - 1000. You need to introduce pagination. + + Args: + zset (bytes): Set name + seekKey (bytes): Seek key to find + seekScore (float): Seek score - min or max score for entry (depending on desc value) + seekAtTx (int): Tx id for the first entry + inclusive (bool): Element resulting from seek key would be part of resulting set + limit (int): Maximum number of returned items + desc (bool): Descending or ascending order + minscore (float): Min score + maxscore (float): Max score + sinceTx (_type_, optional): immudb will wait for transaction provided by sinceTx. Defaults to None. + nowait (bool, optional): when true - scan doesn't wait for transaction at seekAtTx to be procesessed. Defaults to False. + + Returns: + schema_pb2.ZEntries: Entries of this scan + """ + return zscan.call(self._stub, self._rs, zset, seekKey, seekScore, seekAtTx, inclusive, limit, desc, minscore, maxscore, sinceTx, nowait) - def txById(self, tx: int): - return txbyid.call(self.__stub, self.__rs, tx) + def txById(self, tx: int) -> schema_pb2.Tx: + """Returns keys list modified in transaction by transaction id + + Args: + tx (int): transaction id + + Returns: + List[bytes]: Keys list modified in queried transaction + """ + return txbyid.call(self._stub, self._rs, tx) def verifiedTxById(self, tx: int): - return verifiedtxbyid.call(self.__stub, self.__rs, tx, self.__vk) + """Returns and verifies keys list modified in transaction by transaction id - # Not implemented: txByIDWithSpec + Args: + tx (int): transaction id - # Not implemented: txScan + Returns: + List[bytes]: Keys list modified in queried transaction + """ + return verifiedtxbyid.call(self._stub, self._rs, tx, self._vk) + + def txScan(self, initialTx: int, limit: int = 999, desc: bool = False, entriesSpec: datatypesv2.EntriesSpec = None, sinceTx: int = 0, noWait: bool = False) -> datatypesv2.TxList: + """Scans for transactions with specified parameters - # Not implemented: count - # Not implemented: countAll + Args: + initialTx (int): initial transaction id + limit (int, optional): Limit resulsts. Defaults to 999. + desc (bool, optional): If `True`, use descending scan order. + Defaults to `False`, which uses ascending scan order. + entriesSpec (datatypesv2.EntriesSpec, optional): Specified what should be contained in scan. Defaults to None. + sinceTx (int, optional): immudb will wait for transaction provided by sinceTx. Defaults to None. + noWait (bool, optional): Doesn't wait for the index to be fully generated. Defaults to None. - def setAll(self, kv: dict): - return batchSet.call(self.__stub, self.__rs, kv) + Returns: + datatypesv2.TxList: Transaction list + """ + req = datatypesv2.TxScanRequest( + initialTx, limit, desc, entriesSpec, sinceTx, noWait) + resp = self._stub.TxScan(req._getGRPC()) + return dataconverter.convertResponse(resp) + + def serverInfo(self) -> datatypesv2.ServerInfoResponse: + """Returns server info containing version + + Returns: + datatypesv2.ServerInfoResponse: Contains version of running server + """ + req = datatypesv2.ServerInfoRequest() + resp = self._stub.ServerInfo(req._getGRPC()) + return dataconverter.convertResponse(resp) - def getAll(self, keys: list): - resp = batchGet.call(self.__stub, self.__rs, keys) + def databaseHealth(self) -> datatypesv2.DatabaseHealthResponse: + """Returns information about database health (pending requests, last request completion timestamp) + + Returns: + datatypesv2.DatabaseHealthResponse: Contains informations about database (pending requests, last request completion timestamp) + """ + req = google_dot_protobuf_dot_empty__pb2.Empty() + resp = self._stub.DatabaseHealth(req) + return dataconverter.convertResponse(resp) + + def setAll(self, kv: Dict[bytes, bytes]) -> datatypes.SetResponse: + """Sets all values for corresponding keys from dictionary + + Args: + kv (Dict[bytes, bytes]): dictionary of keys and values + + Returns: + datatypes.SetResponse: Set response contains transaction id + """ + return batchSet.call(self._stub, self._rs, kv) + + def getAll(self, keys: List[bytes]) -> Dict[bytes, bytes]: + """Returns values for specified keys + + Args: + keys (List[bytes]): Keys list + + Returns: + Dict[bytes, bytes]: Dictionary of key : value pairs + """ + resp = batchGet.call(self._stub, self._rs, keys) return {key: value.value for key, value in resp.items()} - def delete(self, req: DeleteKeysRequest): - return deleteKeys.call(self.__stub, req) + def delete(self, req: DeleteKeysRequest) -> TxHeader: + """Deletes key + + Args: + req (DeleteKeysRequest): Request contains key to delete - def execAll(self, ops: list, noWait=False): - return execAll.call(self.__stub, self.__rs, ops, noWait) + Returns: + TxHeader: Transaction header + """ + return deleteKeys.call(self._stub, req) - def setReference(self, referredkey: bytes, newkey: bytes): - return reference.call(self.__stub, self.__rs, referredkey, newkey) + def execAll(self, ops: List[Union[datatypes.KeyValue, datatypes.ZAddRequest, datatypes.ReferenceRequest]], noWait=False) -> TxHeader: + """Exectues all operations from list (KeyValue, ZAddRequest, ReferenceRequest) - def verifiedSetReference(self, referredkey: bytes, newkey: bytes): - return verifiedreference.call(self.__stub, self.__rs, referredkey, newkey, verifying_key=self.__vk) + Args: + ops (List[Union[datatypes.KeyValue, datatypes.ZAddRequest, datatypes.ReferenceRequest]]): List of operations + noWait (bool, optional): Doesn't wait for the index to be fully generated. Defaults to None. Defaults to False. - # Not implemented: setReferenceAt - # Not implemented: verifiedSetReferenceAt + Returns: + TxHeader: Transaction header + """ + return execAll.call(self._stub, self._rs, ops, noWait) - # Not implemented: dump + def setReference(self, referredkey: bytes, newkey: bytes) -> TxHeader: + """References key specified by referredkey as newkey - # Not implemented: stream[.*] + Args: + referredkey (bytes): Reffered key + newkey (bytes): New key - # Not implemented: exportTx - # Not implemented: replicateTx + Returns: + TxHeader: Transaction header + """ + return reference.call(self._stub, self._rs, referredkey, newkey) + + def verifiedSetReference(self, referredkey: bytes, newkey: bytes) -> TxHeader: + """References key specified by referredkey as newkey and verifies state of immudb + + Args: + referredkey (bytes): Reffered key + newkey (bytes): New key + + Returns: + TxHeader: Transaction header + """ + return verifiedreference.call(self._stub, self._rs, referredkey, newkey, verifying_key=self._vk) + + def _rawStreamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> Generator[Union[KeyHeader, ValueChunk], None, None]: + """Helper function that creates generator of chunks from raw GRPC stream + + Yields: + Generator[Union[KeyHeader, ValueChunk], None, None]: First chunk is KeyHeader, rest are ValueChunks + """ + req = datatypesv2.KeyRequest( + key=key, atTx=atTx, sinceTx=sinceTx, noWait=noWait, atRevision=atRevision) + resp = self._stub.streamGet(req._getGRPC()) + reader = StreamReader(resp) + for it in reader.chunks(): + yield it + + def streamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> Tuple[bytes, BufferedStreamReader]: + """Streaming method to get buffered value. + You can read from this value by read() method + read() will read everything + read(256) will read 256 bytes + + Args: + key (bytes): Key to get + atTx (int, optional): Get key at transaction id. Defaults to None. + sinceTx (int, optional): immudb will wait for transaction provided by sinceTx. Defaults to None. + noWait (bool, optional): Doesn't wait for the index to be fully generated. Defaults to None. + atRevision (int, optional): Returns value of key at specified revision. -1 to get relative revision. Defaults to None. + + Returns: + Tuple[bytes, BufferedStreamReader]: First value is key, second is reader. + """ + req = datatypesv2.KeyRequest( + key=key, atTx=atTx, sinceTx=sinceTx, noWait=noWait, atRevision=atRevision) + resp = self._stub.streamGet(req._getGRPC()) + reader = StreamReader(resp) + chunks = reader.chunks() + keyHeader = next(chunks, None) + if keyHeader != None: + valueHeader = next(chunks) + return keyHeader.key, BufferedStreamReader(chunks, valueHeader, resp) + + def streamGetFull(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> datatypesv2.KeyValue: + """Streaming method to get full value + + Args: + key (bytes): Key to get + atTx (int, optional): Get key at transaction id. Defaults to None. + sinceTx (int, optional): immudb will wait for transaction provided by sinceTx. Defaults to None. + noWait (bool, optional): Doesn't wait for the index to be fully generated. Defaults to None. + atRevision (int, optional): Returns value of key at specified revision. -1 to get relative revision. Defaults to None. + + Returns: + datatypesv2.KeyValue: Key value from immudb + """ + req = datatypesv2.KeyRequest( + key=key, atTx=atTx, sinceTx=sinceTx, noWait=noWait, atRevision=atRevision) + resp = self._stub.streamGet(req._getGRPC()) + reader = StreamReader(resp) + key = None + value = b'' + chunks = reader.chunks() + chunk = next(chunks, None) + if chunk != None: + key = chunk.key + for it in chunks: + value += it.chunk + return datatypesv2.KeyValue(key, value) + + def streamVerifiedGet(self, key: bytes = None, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> datatypes.SafeGetResponse: + """Gets a value of a key with streaming method, and verifies transaction. + + Args: + key (bytes): Key to get + atTx (int, optional): Get key at transaction id. Defaults to None. + sinceTx (int, optional): immudb will wait for transaction provided by sinceTx. Defaults to None. + noWait (bool, optional): Doesn't wait for the index to be fully generated. Defaults to None. + atRevision (int, optional): Returns value of key at specified revision. -1 to get relative revision. Defaults to None. + + Raises: + ErrCorruptedData: When data is corrupted or unverifiable + + Returns: + datatypes.SafeGetResponse: Response contains informations about verification + """ + state = self._rs.get() + proveSinceTx = state.txId + req = datatypesv2.VerifiableGetRequest(keyRequest=datatypesv2.KeyRequest( + key=key, atTx=atTx, sinceTx=sinceTx, noWait=noWait, atRevision=atRevision), proveSinceTx=proveSinceTx) + resp = self._stub.streamVerifiableGet(req._getGRPC()) + reader = VerifiedGetStreamReader(resp) + chunks = reader.chunks() + key = next(chunks, None) + value = b'' + if key != None: + verifiableTx = next(chunks) + inclusionProof = next(chunks) + for chunk in chunks: + value += chunk.chunk + verified = verifyTransaction( + verifiableTx, state, self._vk, self._rs) + if (len(verified) == 0): + raise ErrCorruptedData + return datatypes.SafeGetResponse( + id=verifiableTx.tx.header.id, + key=key.key, + value=value, + timestamp=verifiableTx.tx.header.ts, + verified=True, + refkey=key.refKey, + revision=atRevision + ) + + def streamVerifiedGetBuffered(self, key: bytes = None, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> Tuple[datatypes.SafeGetResponse, BufferedStreamReader]: + """Gets a value of a key with streaming method, and verifies transaction. Value is represented as BufferedStreamReader + + Args: + key (bytes): Key to get + atTx (int, optional): Get key at transaction id. Defaults to None. + sinceTx (int, optional): immudb will wait for transaction provided by sinceTx. Defaults to None. + noWait (bool, optional): Doesn't wait for the index to be fully generated. Defaults to None. + atRevision (int, optional): Returns value of key at specified revision. -1 to get relative revision. Defaults to None. + + Raises: + ErrCorruptedData: When data is corrupted or unverifiable + + Returns: + Tuple[datatypes.SafeGetResponse, BufferedStreamReader]: First element is safe get response without value, second is a buffer that you can read from + """ + state = self._rs.get() + proveSinceTx = state.txId + req = datatypesv2.VerifiableGetRequest(keyRequest=datatypesv2.KeyRequest( + key=key, atTx=atTx, sinceTx=sinceTx, noWait=noWait, atRevision=atRevision), proveSinceTx=proveSinceTx) + resp = self._stub.streamVerifiableGet(req._getGRPC()) + reader = VerifiedGetStreamReader(resp) + chunks = reader.chunks() + key = next(chunks, None) + if key != None: + verifiableTx = next(chunks) + inclusionProof = next(chunks) + verified = verifyTransaction( + verifiableTx, state, self._vk, self._rs) + if (len(verified) == 0): + raise ErrCorruptedData + toRet = datatypes.SafeGetResponse( + id=verifiableTx.tx.header.id, + key=key.key, + value=None, + timestamp=verifiableTx.tx.header.ts, + verified=True, + refkey=key.refKey, + revision=atRevision + ) + valueHeader = next(chunks) + return toRet, BufferedStreamReader(chunks, valueHeader, resp) + + def streamHistory(self, key: bytes, offset: int = None, sinceTx: int = None, limit: int = None, desc: bool = None) -> Generator[datatypesv2.KeyValue, None, None]: + """Streams history of key + + Args: + key (bytes): Key to find + offset (int, optional): Offset to apply + sinceTx (int, optional): immudb will wait for transaction provided by sinceTx. Defaults to None. + noWait (bool, optional): Doesn't wait for the index to be fully generated. Defaults to None. + desc (bool, optional): Descending or ascending order. Defaults to None. + + Yields: + Generator[datatypesv2.KeyValue, None, None]: Generator of KeyValues + """ + request = datatypesv2.HistoryRequest( + key=key, offset=offset, limit=limit, desc=desc, sinceTx=sinceTx) + resp = self._stub.streamHistory(request._getGRPC()) + key = None + value = None + for chunk in StreamReader(resp).chunks(): + if isinstance(chunk, KeyHeader): + if key != None: + yield datatypesv2.KeyValue(key=key, value=value, metadata=None) + key = chunk.key + value = b'' + else: + value += chunk.chunk + + if key != None and value != None: # situation when generator consumes all at first run, so it didn't yield first value + yield datatypesv2.KeyValue(key=key, value=value, metadata=None) + + def streamHistoryBuffered(self, key: bytes, offset: int = None, sinceTx: int = None, limit: int = None, desc: bool = None) -> Generator[Tuple[datatypesv2.KeyValue, BufferedStreamReader], None, None]: + """Streams history of key + + Args: + key (bytes): Key to find + offset (int, optional): Offset to apply + sinceTx (int, optional): immudb will wait for transaction provided by sinceTx. Defaults to None. + noWait (bool, optional): Doesn't wait for the index to be fully generated. Defaults to None. + desc (bool, optional): Descending or ascending order. Defaults to None. + + Yields: + Generator[Tuple[datatypesv2.KeyValue, BufferedStreamReader], None, None]: Generator of Tuples of KeyValue and BufferedStreamReader. You can read from BufferedStreamReader with read() method + """ + request = datatypesv2.HistoryRequest( + key=key, offset=offset, limit=limit, desc=desc, sinceTx=sinceTx) + resp = self._stub.streamHistory(request._getGRPC()) + key = None + valueHeader = None + + streamReader = StreamReader(resp) + chunks = streamReader.chunks() + chunk = next(chunks, None) + while chunk != None: + if isinstance(chunk, KeyHeader): + key = chunk.key + valueHeader = next(chunks) + yield key, BufferedStreamReader(chunks, valueHeader, resp) + chunk = next(chunks, None) + + def _make_set_stream(self, buffer, key: bytes, length: int, chunkSize: int = 65536): + """Helper function that creates generator from buffer + + Args: + buffer (io.BytesIO): Any buffer that implements read(length: int) method + key (bytes): Key to set + length (int): Length of buffer + chunkSize (int, optional): Chunk size to set while streaming. Defaults to 65536. + + Yields: + Generator[Chunk, None, None]: Chunk that is cmpatible with proto + """ + yield Chunk(content=KeyHeader(key=key, length=len(key)).getInBytes()) + firstChunk = buffer.read(chunkSize) + firstChunk = ValueChunkHeader( + chunk=firstChunk, length=length).getInBytes() + yield Chunk(content=firstChunk) + chunk = buffer.read(chunkSize) + while chunk: + yield Chunk(content=chunk) + chunk = buffer.read(chunkSize) + + def _make_verifiable_set_stream(self, buffer, key: bytes, length: int, provenSinceTx: int = None, chunkSize: int = 65536): + """Helper function to create stream from provided buffer + + Args: + buffer (io.BytesIO): Any buffer + key (bytes): Key to set + length (int): Length of buffer + provenSinceTx (int): Prove since this transaction id + chunkSize (int, optional): Chunk size. Defaults to 65536. + + Yields: + Generator[Chunk, None, None]: Yields GRPC chunks + """ + header = ProvenSinceHeader(provenSinceTx) + yield Chunk(content=header.getInBytes()) + yield Chunk(content=KeyHeader(key=key, length=len(key)).getInBytes()) + firstChunk = buffer.read(chunkSize) + firstChunk = ValueChunkHeader( + chunk=firstChunk, length=length).getInBytes() + yield Chunk(content=firstChunk) + chunk = buffer.read(chunkSize) + while chunk: + yield Chunk(content=chunk) + chunk = buffer.read(chunkSize) + + def streamZScanBuffered(self, set: bytes = None, seekKey: bytes = None, + seekScore: float = None, seekAtTx: int = None, inclusiveSeek: bool = None, limit: int = None, + desc: bool = None, minScore: float = None, maxScore: float = None, sinceTx: int = None, noWait: bool = None, offset: int = None) -> Generator[Tuple[datatypesv2.ZScanEntry, BufferedStreamReader], None, None]: + """Scan for provided parameters for secondary index. Limit for scan is fixed - 1000. You need to introduce pagination. + This method returns buffered ZEntry values - you need to read from value yourself by read(int) method. + + Args: + set (bytes, optional): Set name. Defaults to None. + seekKey (bytes, optional): Seek key to find. Defaults to None. + seekScore (float, optional): Seek score to find. Defaults to None. + seekAtTx (int, optional): TX id for the first entry. Defaults to None. + inclusiveSeek (bool, optional): Element specified in seek should be included. Defaults to None. + limit (int, optional): Maximum number of returned items. Defaults to None. + desc (bool, optional): Descending or ascending order. Defaults to None. + minScore (float, optional): Minimum score to find. Defaults to None. + maxScore (float, optional): Maximum score to find. Defaults to None. + sinceTx (int, optional): immudb will wait for transaction provided by sinceTx. Defaults to None. + noWait (bool, optional): when true - scan doesn't wait for transaction at seekAtTx to be procesessed. Defaults to False. + offset (int, optional): Offsets current scan. Defaults to None. + + Yields: + Generator[Tuple[datatypesv2.ZScanEntry, BufferedStreamReader]]: Returns generator of Tuple of ZScanEntry and BufferedStreamReader. You can read from BufferedStreamReader with read(int) method + """ + minScoreObject = None + maxScoreObject = None + if minScore != None: + minScoreObject = datatypesv2.Score(minScore) + if maxScore != None: + maxScoreObject = datatypesv2.Score(maxScore) + req = datatypesv2.ZScanRequest(set=set, seekKey=seekKey, seekScore=seekScore, seekAtTx=seekAtTx, inclusiveSeek=inclusiveSeek, + limit=limit, desc=desc, minScore=minScoreObject, maxScore=maxScoreObject, sinceTx=sinceTx, noWait=noWait, offset=offset) + resp = self._stub.streamZScan(req._getGRPC()) + + set = None + key = None + score = None + atTx = None + + chunks = ZScanStreamReader(resp).chunks() + chunk = next(chunks, None) + while chunk != None: + if isinstance(chunk, SetHeader): + set = chunk.set + atTx = None + score = None + key = None + + elif isinstance(chunk, KeyHeader): + key = chunk.key + + elif isinstance(chunk, ScoreHeader): + score = chunk.score + + elif isinstance(chunk, AtTXHeader): + atTx = chunk.seenAtTx + + else: + yield datatypesv2.ZScanEntry(set=set, key=key, score=score, atTx=atTx), BufferedStreamReader(chunks, chunk, resp) + + chunk = next(chunks, None) + + def streamZScan(self, set: bytes = None, seekKey: bytes = None, + seekScore: float = None, seekAtTx: int = None, inclusiveSeek: bool = None, limit: int = None, + desc: bool = None, minScore: float = None, maxScore: float = None, sinceTx: int = None, noWait: bool = False, offset: int = None) -> Generator[datatypesv2.ZScanEntry, None, None]: + """Scan for provided parameters for secondary index. Limit for scan is fixed - 1000. You need to introduce pagination. + + Args: + set (bytes, optional): Set name. Defaults to None. + seekKey (bytes, optional): Seek key to find. Defaults to None. + seekScore (float, optional): Seek score to find. Defaults to None. + seekAtTx (int, optional): TX id for the first entry. Defaults to None. + inclusiveSeek (bool, optional): Element specified in seek should be included. Defaults to None. + limit (int, optional): Maximum number of returned items. Defaults to None. + desc (bool, optional): Descending or ascending order. Defaults to None. + minScore (float, optional): Minimum score to find. Defaults to None. + maxScore (float, optional): Maximum score to find. Defaults to None. + sinceTx (int, optional): immudb will wait for transaction provided by sinceTx. Defaults to None. + noWait (bool, optional): when true - scan doesn't wait for transaction at seekAtTx to be procesessed. Defaults to False. + offset (int, optional): Offsets current scan. Defaults to None. + + Yields: + Generator[datatypesv2.ZScanEntry, None, None]: Returns generator of ZScanEntry + """ + minScoreObject = None + maxScoreObject = None + if minScore != None: + minScoreObject = datatypesv2.Score(minScore) + if maxScore != None: + maxScoreObject = datatypesv2.Score(maxScore) + req = datatypesv2.ZScanRequest(set=set, seekKey=seekKey, seekScore=seekScore, seekAtTx=seekAtTx, inclusiveSeek=inclusiveSeek, + limit=limit, desc=desc, minScore=minScoreObject, maxScore=maxScoreObject, sinceTx=sinceTx, noWait=noWait, offset=offset) + resp = self._stub.streamZScan(req._getGRPC()) + + set = None + key = None + score = None + atTx = None + value = None + for chunk in ZScanStreamReader(resp).chunks(): + if isinstance(chunk, SetHeader): + if set != None: + yield datatypesv2.ZScanEntry(set=set, key=key, value=value, score=score, atTx=atTx) + set = chunk.set + value = b'' + atTx = None + score = None + key = None + + elif isinstance(chunk, KeyHeader): + key = chunk.key + + elif isinstance(chunk, ScoreHeader): + score = chunk.score + + elif isinstance(chunk, AtTXHeader): + atTx = chunk.seenAtTx + + else: + value += chunk.chunk + + if key != None and value != None: # situation when generator consumes all at first run, so it didn't yield first value + yield datatypesv2.ZScanEntry(set=set, key=key, value=value, score=score, atTx=atTx) + + def streamScan(self, seekKey: bytes = None, endKey: bytes = None, prefix: bytes = None, desc: bool = None, limit: int = None, sinceTx: int = None, noWait: bool = None, inclusiveSeek: bool = None, inclusiveEnd: bool = None, offset: int = None) -> Generator[datatypesv2.KeyValue, None, None]: + """Scan method in streaming maneer + + Args: + seekKey (bytes, optional): Key to seek. Defaults to None. + endKey (bytes, optional): Key to end scan with. Defaults to None. + prefix (bytes, optional): Key prefix. Defaults to None. + desc (bool, optional): Sorting order - true to descending. Defaults to None. + limit (int, optional): Limit of scan items. Defaults to None. + sinceTx (int, optional): immudb will wait that the transaction specified by sinceTx is processed. Defaults to None. + noWait (bool, optional): When true - scan doesn't wait for the index to be fully generated. Defaults to None. + inclusiveSeek (bool, optional): Includes seek key value. Defaults to None. + inclusiveEnd (bool, optional): Includes end key value also. Defaults to None. + offset (int, optional): Offsets current scan. Defaults to None. + + Yields: + Generator[datatypesv2.KeyValue, None, None]: Returns generator of KeyValue + """ + req = datatypesv2.ScanRequest(seekKey=seekKey, endKey=endKey, prefix=prefix, desc=desc, limit=limit, + sinceTx=sinceTx, noWait=noWait, inclusiveSeek=None, inclusiveEnd=None, offset=None) + resp = self._stub.streamScan(req._getGRPC()) + key = None + value = None + for chunk in StreamReader(resp).chunks(): + if isinstance(chunk, KeyHeader): + if key != None: + yield datatypesv2.KeyValue(key=key, value=value, metadata=None) + key = chunk.key + value = b'' + else: + value += chunk.chunk + + if key != None and value != None: # situation when generator consumes all at first run, so it didn't yield first value + yield datatypesv2.KeyValue(key=key, value=value, metadata=None) + + def streamScanBuffered(self, seekKey: bytes = None, endKey: bytes = None, prefix: bytes = None, desc: bool = None, limit: int = None, sinceTx: int = None, noWait: bool = None, inclusiveSeek: bool = None, inclusiveEnd: bool = None, offset: int = None) -> Generator[Tuple[bytes, BufferedStreamReader], None, None]: + """Scan method in streaming maneer. Differs from streamScan with method to read from buffer also. + Useful in case of big values. + + Important - you can't skip reading from any buffer. You always need to consume it + + Args: + seekKey (bytes, optional): Key to seek. Defaults to None. + endKey (bytes, optional): Key to end scan with. Defaults to None. + prefix (bytes, optional): Key prefix. Defaults to None. + desc (bool, optional): Sorting order - true to descending. Defaults to None. + limit (int, optional): Limit of scan items. Defaults to None. + sinceTx (int, optional): immudb will wait that the transaction specified by sinceTx is processed. Defaults to None. + noWait (bool, optional): When true - scan doesn't wait for the index to be fully generated. Defaults to None. + inclusiveSeek (bool, optional): Includes seek key value. Defaults to None. + inclusiveEnd (bool, optional): Includes end key value also. Defaults to None. + offset (int, optional): Offsets current scan. Defaults to None. + + Yields: + Generator[Tuple[bytes, BufferedStreamReader], None, None]: First value is Key, second is buffer that you can read from + """ + + req = datatypesv2.ScanRequest(seekKey=seekKey, endKey=endKey, prefix=prefix, desc=desc, limit=limit, + sinceTx=sinceTx, noWait=noWait, inclusiveSeek=inclusiveSeek, inclusiveEnd=inclusiveEnd, offset=offset) + resp = self._stub.streamScan(req._getGRPC()) + key = None + valueHeader = None + + streamReader = StreamReader(resp) + chunks = streamReader.chunks() + chunk = next(chunks, None) + while chunk != None: + if isinstance(chunk, KeyHeader): + key = chunk.key + valueHeader = next(chunks) + yield key, BufferedStreamReader(chunks, valueHeader, resp) + chunk = next(chunks, None) + + def _rawStreamSet(self, generator: Generator[Chunk, None, None]) -> datatypesv2.TxHeader: + """Helper function that grabs generator of chunks and set into opened stream + + Args: + generator (Generator[Chunk, None, None]): Generator + + Returns: + datatypesv2.TxHeader: Transaction header + """ + resp = self._stub.streamSet(generator) + return dataconverter.convertResponse(resp) + + def _raw_verifiable_stream_set(self, generator: Generator[Chunk, None, None]): + """Helper function that grabs generator of chunks and set into opened stream + + Args: + generator (Generator[Chunk, None, None]): Generator of chunks + + Returns: + schema_pb2.VerifiableTx: Raw VerifiableTX object + """ + resp = self._stub.streamVerifiableSet(generator) + return resp + + def _make_stream_exec_all_stream(self, ops: List[Union[datatypes.KeyValue, datatypes.StreamingKeyValue, datatypes.ZAddRequest, datatypes.ReferenceRequest]], noWait=False, chunkSize=65536) -> Generator[Chunk, None, None]: + """Helper function that converts provided list into generator of Chunks + + Args: + ops (List[Union[datatypes.KeyValue, datatypes.StreamingKeyValue, datatypes.ZAddRequest, datatypes.ReferenceRequest]]): List of actions to execute + noWait (bool, optional): When true - scan doesn't wait for the index to be fully generated. Defaults to False. + chunkSize (int, optional): Chunk size to set while streaming. Defaults to 65536. + + Yields: + Generator[Chunk, None, None]: Generator of chunks + """ + kv = 1 + zadd = 2 + for op in ops: + if type(op) == datatypes.KeyValue: + concated = int.to_bytes(1, 8, 'big') + concated += int.to_bytes(kv, 1, 'big') + yield Chunk(content=concated + KeyHeader(key=op.key, length=len(op.key)).getInBytes()) + buffer = BytesIO(op.value) + firstChunk = buffer.read(chunkSize) + firstChunk = ValueChunkHeader( + chunk=firstChunk, length=len(op.value)).getInBytes() + yield Chunk(content=firstChunk) + chunk = buffer.read(chunkSize) + while chunk: + yield Chunk(content=chunk) + chunk = buffer.read(chunkSize) + elif type(op) == datatypes.StreamingKeyValue: + concated = int.to_bytes(1, 8, 'big') + concated += int.to_bytes(kv, 1, 'big') + yield Chunk(content=concated + KeyHeader(key=op.key, length=len(op.key)).getInBytes()) + buffer = op.value + firstChunk = buffer.read(chunkSize) + firstChunk = ValueChunkHeader( + chunk=firstChunk, length=op.length).getInBytes() + yield Chunk(content=firstChunk) + chunk = buffer.read(chunkSize) + while chunk: + yield Chunk(content=chunk) + chunk = buffer.read(chunkSize) + elif type(op) == datatypes.ZAddRequest: + concated = int.to_bytes(1, 8, 'big') + concated += int.to_bytes(zadd, 1, 'big') + zAdd = schema_pb2.ZAddRequest( + set=op.set, + score=op.score, + key=op.key, + atTx=op.atTx, + boundRef=op.boundRef, + noWait=op.noWait + ) + serialized = zAdd.SerializeToString() + lengthOf = len(serialized) + lengthBytes = int.to_bytes(lengthOf, 8, 'big') + yield Chunk(content=concated + lengthBytes + serialized) + + def _raw_stream_exec_all(self, generator: Generator[Chunk, None, None]) -> datatypesv2.TxHeader: + """Read everything from generator and yields into opened stream + + Args: + generator (Generator[Chunk, None, None]): Chunk generator + + Returns: + datatypesv2.TxHeader: TxHeader of just executed transaction + """ + + resp = dataconverter.convertResponse( + self._stub.streamExecAll(generator)) + return resp + + def streamExecAll(self, ops: List[Union[datatypes.KeyValue, datatypes.StreamingKeyValue, datatypes.ZAddRequest, datatypes.ReferenceRequest]], noWait=False) -> datatypesv2.TxHeader: + """Executes everything provided in ops List + + Args: + ops (List[Union[datatypes.KeyValue, datatypes.StreamingKeyValue, datatypes.ZAddRequest, datatypes.ReferenceRequest]]): List of actions to execute + noWait (bool, optional): When true - scan doesn't wait for the index to be fully generated. Defaults to False. + + Returns: + TxHeader: TxHeader of just executed transaction + """ + return self._raw_stream_exec_all(self._make_stream_exec_all_stream(ops, noWait)) + + def streamVerifiedSet(self, key: bytes, buffer: BytesIO, bufferLength: int, chunkSize: int = 65536) -> datatypes.SetResponse: + """Sets key into value with streaming method and verifies with current state + + Args: + key (bytes): Key + buffer (io.BytesIO): Any buffer that implements read(length: int) method + bufferLength (int): Buffer length (protocol needs to know it at first) + chunkSize (int, optional): Specifies chunk size while sending. Defaults to 65536. + + Returns: + datatypes.SetResponse: Response contains id of transaction and verification status. + Raises exception if corrupted data. + """ + state = self._rs.get() + resp = self._raw_verifiable_stream_set(self._make_verifiable_set_stream( + buffer, key, bufferLength, state.txId, chunkSize)) + verified = verifyTransaction(resp, state, self._vk, self._rs) + + return datatypes.SetResponse( + id=resp.tx.header.id, + verified=verified[0] == key, + ) + + def streamVerifiedSetFullValue(self, key: bytes, value: bytes, chunkSize: int = 65536) -> datatypes.SetResponse: + """Sets key into value with streaming method and verifies with current state. + + Args: + key (bytes): Key to set + value (bytes): Value to set + chunkSize (int, optional): Specifies chunk size while sending. Defaults to 65536. + + Returns: + datatypes.SetResponse: Response contains id of transaction and verification status. + Raises exception if corrupted data. + """ + state = self._rs.get() + resp = self._raw_verifiable_stream_set(self._make_verifiable_set_stream( + BytesIO(value), key, len(value), state.txId, chunkSize)) + verified = verifyTransaction(resp, state, self._vk, self._rs) + + return datatypes.SetResponse( + id=resp.tx.header.id, + verified=verified[0] == key, + ) + + def streamSet(self, key: bytes, buffer, bufferLength: int, chunkSize: int = 65536) -> datatypesv2.TxHeader: + """Sets key into value with streaming method. + + Args: + key (bytes): Key + buffer (io.BytesIO): Any buffer that implements read(length: int) method + bufferLength (int): Buffer length (protocol needs to know it at first) + chunkSize (int, optional): Specifies chunk size while sending. Defaults to 65536. + + Returns: + datatypesv2.TxHeader: Transaction header of just set transaction + """ + resp = self._rawStreamSet(self._make_set_stream( + buffer, key, bufferLength, chunkSize)) + return resp + + def streamSetFullValue(self, key: bytes, value: bytes, chunkSize: int = 65536) -> datatypesv2.TxHeader: + """Sets key into value with streaming maneer. Differs from streamSet because user can set full value + + Args: + key (bytes): Key to set + value (bytes): Value to set + chunkSize (int, optional): Specifies chunk size while sending. Defaults to 65536. + + Returns: + datatypesv2.TxHeader: Transaction header + """ + resp = self._rawStreamSet(self._make_set_stream( + BytesIO(value), key, len(value), chunkSize)) + return resp + + def exportTx(self, tx: int): + """Opens stream to export transaction from immudb (you can combine it with replicateTx) + + Args: + tx (int): transaction id + + Returns: + Generator[Chunk, None, None]: Iterable of chunk + """ + return self._stub.exportTx(datatypesv2.ExportTxRequest(tx)._getGRPC()) + + def _create_generator(self, chunkStream): + """Helper function that creates generator from any iterable + + Args: + chunkStream (Iterable[Chunk]): Iterable of Chunk + + Yields: + Chunk: Chunk (from immudb schema_pb2) + """ + for chunk in chunkStream: + yield chunk + + def replicateTx(self, chunkStream) -> datatypesv2.TxHeader: + """Replicates transaction provided by stream + + Args: + chunkStream (Iterable[Chunk]): fixed list of chunk, or stream from exportTx method + + Returns: + datatypesv2.TxHeader: tx header of just synchronized transaction + """ + return dataconverter.convertResponse(self._stub.replicateTx(self._create_generator(chunkStream))) def sqlExec(self, stmt, params={}, noWait=False): """Executes an SQL statement @@ -374,7 +1607,7 @@ def sqlExec(self, stmt, params={}, noWait=False): (id), timestamp (ts), and number of entries (nentries). """ - return sqlexec.call(self.__stub, self.__rs, stmt, params, noWait) + return sqlexec.call(self._stub, self._rs, stmt, params, noWait) def sqlQuery(self, query, params={}, columnNameMode=constants.COLUMN_NAME_MODE_NONE): """Queries the database using SQL @@ -387,7 +1620,7 @@ def sqlQuery(self, query, params={}, columnNameMode=constants.COLUMN_NAME_MODE_N ['table1', 'table2'] """ - return sqlquery.call(self.__stub, self.__rs, query, params, columnNameMode) + return sqlquery.call(self._stub, self._rs, query, params, columnNameMode) def listTables(self): """List all tables in the current database @@ -397,14 +1630,19 @@ def listTables(self): ['table1', 'table2'] """ - return listtables.call(self.__stub, self.__rs) + return listtables.call(self._stub, self._rs) - def describeTable(self, table): - return sqldescribe.call(self.__stub, self.__rs, table) + def describeTable(self, table) -> List[datatypes.ColumnDescription]: + """Describes table provided by argument - # Not implemented: verifyRow + Args: + table (str): Table to describe + + Returns: + List[datatypes.ColumnDescription]: Column descriptions + """ + return sqldescribe.call(self._stub, self._rs, table) -# deprecated def databaseCreate(self, dbName: bytes): warnings.warn("Call to deprecated databaseCreate. Use createDatabase instead", category=DeprecationWarning, @@ -417,7 +1655,7 @@ def safeGet(self, key: bytes): # deprecated category=DeprecationWarning, stacklevel=2 ) - return verifiedGet.call(self.__stub, self.__rs, key, verifying_key=self.__vk) + return verifiedGet.call(self._stub, self._rs, key, verifying_key=self._vk) def databaseUse(self, dbName: bytes): # deprecated warnings.warn("Call to deprecated databaseUse. Use useDatabase instead", @@ -431,18 +1669,40 @@ def safeSet(self, key: bytes, value: bytes): # deprecated category=DeprecationWarning, stacklevel=2 ) - return verifiedSet.call(self.__stub, self.__rs, key, value) + return verifiedSet.call(self._stub, self._rs, key, value) + + def verifiableSQLGet(self, table: str, primaryKeys: List[datatypesv2.PrimaryKey], atTx=None, sinceTx=None) -> datatypesv2.VerifiableSQLEntry: + """Verifies SQL row against current state + + Example: + client.verifiableSQLGet( + tabname, [datatypesv2.PrimaryKeyIntValue(1), datatypesv2.PrimaryKeyIntValue(3)] + ) + + Args: + table (str): Table Name + primaryKeys (List[datatypesv2.PrimaryKey]): List of PrimaryKeys to check + atTx (int): Identifier of the transaction at which point the key's + value should be retrieved. + sinceTx (int): Identifier of the earliest transaction from which the + key's value should be retrieved. If the specified transaction has + not been indexed by immudb, this method will block until it has. + + Returns: + datatypesv2.VerifiableSQLEntry: Contains all informations about just verified SQL Entry + """ + return verifiedSQLGet.call(self._stub, self._rs, table, primaryKeys, atTx, sinceTx, verifying_key=self._vk) # immudb-py only def getAllValues(self, keys: list): # immudb-py only - resp = batchGet.call(self.__stub, self.__rs, keys) + resp = batchGet.call(self._stub, self._rs, keys) return resp def getValue(self, key: bytes): # immudb-py only - ret = get.call(self.__stub, self.__rs, key) + ret = get.call(self._stub, self._rs, key) if ret is None: return None return ret.value diff --git a/immudb/constants.py b/immudb/constants.py index ca01cf8..43dacaf 100644 --- a/immudb/constants.py +++ b/immudb/constants.py @@ -20,6 +20,9 @@ PERMISSION_R = 1 PERMISSION_RW = 2 +PERMISSION_GRANT = 0 +PERMISSION_REVOKE = 1 + SET_KEY_PREFIX = b'\x00' SORTED_KEY_PREFIX = b'\x01' diff --git a/immudb/dataconverter.py b/immudb/dataconverter.py new file mode 100644 index 0000000..afa426e --- /dev/null +++ b/immudb/dataconverter.py @@ -0,0 +1,42 @@ +# Copyright 2022 CodeNotary, Inc. All rights reserved. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import immudb.datatypesv2 as datatypesv2 + + +def convertResponse(fromResponse, toHumanDataClass=True): + """Converts response from GRPC to python dataclass + + Args: + fromResponse (GRPCResponse): GRPC response from immudb + toHumanDataClass (bool, optional): decides if final product should be converted to 'human' dataclass (final product have to override _getHumanDataClass method). Defaults to True. + + Returns: + DataClass: corresponding dataclass type + """ + if fromResponse.__class__.__name__ == "RepeatedCompositeContainer": + all = [] + for item in fromResponse: + all.append(convertResponse(item)) + return all + schemaFrom = datatypesv2.__dict__.get( + fromResponse.__class__.__name__, None) + if schemaFrom: + construct = dict() + for field in fromResponse.ListFields(): + construct[field[0].name] = convertResponse(field[1], False) + if toHumanDataClass: + return schemaFrom(**construct)._getHumanDataClass() + else: + return schemaFrom(**construct) + else: + return fromResponse diff --git a/immudb/datatypes.py b/immudb/datatypes.py index 5a5edfd..4098ef0 100644 --- a/immudb/datatypes.py +++ b/immudb/datatypes.py @@ -12,6 +12,7 @@ from dataclasses import dataclass from enum import IntEnum +from io import BytesIO from immudb.grpc.schema_pb2 import ReadOnly, WriteOnly, ReadWrite @@ -59,6 +60,13 @@ class KeyValue(): value: bytes +@dataclass +class StreamingKeyValue(): + key: bytes + value: BytesIO + length: int + + @dataclass class ZAddRequest(): set: bytes diff --git a/immudb/datatypesv2.py b/immudb/datatypesv2.py new file mode 100644 index 0000000..c09064f --- /dev/null +++ b/immudb/datatypesv2.py @@ -0,0 +1,1216 @@ +# Copyright 2021 CodeNotary, Inc. All rights reserved. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +from __future__ import annotations +from dataclasses import dataclass +from enum import Enum +from typing import Any, Dict, List, Optional, Union +from google.protobuf.struct_pb2 import NullValue +import immudb.grpc.schema_pb2 as schema + + +def grpcHumanizator(objectFrom, classTo): + finalKWArgs = dict() + for key in objectFrom.__dict__.keys(): + if (objectFrom.__dict__[key] != None and isinstance(objectFrom.__dict__[key], GRPCTransformable)): + finalKWArgs[key] = objectFrom.__dict__[key]._getHumanDataClass() + elif (objectFrom.__dict__[key] != None): + finalKWArgs[key] = objectFrom.__dict__[key] + else: + finalKWArgs[key] = None + return classTo(**finalKWArgs) + + +class GRPCTransformable: + def _getGRPC(self): + transformed = self._transformDict(self.__dict__) + schemaFrom = schema.__dict__.get(self.__class__.__name__, None) + if (schemaFrom): + return schemaFrom(**transformed) + else: # Special case. Message could be nested inside Precondition schema + schemaFrom = schema.__dict__["Precondition"].__dict__.get( + self.__class__.__name__, None) + if schemaFrom: + return schemaFrom(**transformed) + else: + raise Exception("Cannot get schema for", + self.__class__.__name__) + + def _transformDict(self, dictToTransform: Dict[str, Any]): + for key in dictToTransform: + currentValue = dictToTransform[key] + if (isinstance(currentValue, GRPCTransformable)): + dictToTransform[key] = currentValue._getGRPC() + elif (isinstance(currentValue, list)): + for index in range(0, len(currentValue)): + if (isinstance(currentValue[index], GRPCTransformable)): + currentValue[index] = currentValue[index]._getGRPC() + elif (isinstance(currentValue, Enum)): + dictToTransform[key] = currentValue.value + return dictToTransform + + def _getHumanDataClass(self): + return self + + +@dataclass +class Key(GRPCTransformable): + key: bytes = None + + +@dataclass +class Permission(GRPCTransformable): + database: str = None + permission: int = None + + +@dataclass +class User(GRPCTransformable): + user: bytes = None + permissions: List[Permission] = None + createdby: str = None + createdat: str = None + active: bool = None + + +@dataclass +class UserList(GRPCTransformable): + users: List[User] = None + + +@dataclass +class CreateUserRequest(GRPCTransformable): + user: bytes = None + password: bytes = None + permission: int = None + database: str = None + + +@dataclass +class UserRequest(GRPCTransformable): + user: bytes = None + + +@dataclass +class ChangePasswordRequest(GRPCTransformable): + user: bytes = None + oldPassword: bytes = None + newPassword: bytes = None + + +@dataclass +class LoginRequest(GRPCTransformable): + user: bytes = None + password: bytes = None + + +@dataclass +class LoginResponse(GRPCTransformable): + token: str = None + warning: bytes = None + + +@dataclass +class AuthConfig(GRPCTransformable): + kind: int = None + + +@dataclass +class MTLSConfig(GRPCTransformable): + enabled: bool = None + + +@dataclass +class OpenSessionRequest(GRPCTransformable): + username: bytes = None + password: bytes = None + databaseName: str = None + + +@dataclass +class OpenSessionResponse(GRPCTransformable): + sessionID: str = None + serverUUID: str = None + +# ONE OF + + +@dataclass +class Precondition(GRPCTransformable): + keyMustExist: Optional[KeyMustExistPrecondition] = None + keyMustNotExist: Optional[KeyMustNotExistPrecondition] = None + keyNotModifiedAfterTX: Optional[KeyNotModifiedAfterTXPrecondition] = None + + +@dataclass +class KeyMustExistPrecondition(GRPCTransformable): + key: bytes = None + + +@dataclass +class KeyMustNotExistPrecondition(GRPCTransformable): + key: bytes = None + + +class KeyNotModifiedAfterTXPrecondition(GRPCTransformable): + key: bytes = None + txID: int = None + + +@dataclass +class KeyValue(GRPCTransformable): + key: bytes = None + value: bytes = None + metadata: KVMetadata = None + + +@dataclass +class Entry(GRPCTransformable): + tx: int = None + key: bytes = None + value: bytes = None + referencedBy: Reference = None + metadata: KVMetadata = None + expired: bool = None + revision: int = None + + +@dataclass +class Reference(GRPCTransformable): + tx: int = None + key: bytes = None + atTx: int = None + metadata: KVMetadata = None + revision: int = None + +# ONE OF + + +@dataclass +class Op(GRPCTransformable): + kv: Optional[KeyValue] = None + zAdd: Optional[ZAddRequest] = None + ref: Optional[ReferenceRequest] = None + + +@dataclass +class ExecAllRequest(GRPCTransformable): + Operations: List[Op] = None + noWait: bool = None + preconditions: List[Precondition] = None + + +@dataclass +class Entries(GRPCTransformable): + entries: List[Entry] = None + + +@dataclass +class ZEntry(GRPCTransformable): + set: bytes = None + key: bytes = None + entry: Entry = None + score: float = None + atTx: int = None + + +@dataclass +class ZScanEntry(): + set: bytes = None + key: bytes = None + value: bytes = None + score: float = None + atTx: int = None + + +@dataclass +class ZEntries(GRPCTransformable): + entries: ZEntry = None + + +@dataclass +class ScanRequest(GRPCTransformable): + seekKey: bytes + endKey: bytes = None + prefix: bytes = None + desc: bool = None + limit: int = None + sinceTx: int = None + noWait: bool = None + inclusiveSeek: bool = None + inclusiveEnd: bool = None + offset: int = None + + +@dataclass +class KeyPrefix(GRPCTransformable): + prefix: bytes = None + + +@dataclass +class EntryCount(GRPCTransformable): + count: int = None + + +@dataclass +class Signature(GRPCTransformable): + publicKey: bytes = None + signature: bytes = None + + +@dataclass +class TxHeader(GRPCTransformable): + id: int = None + prevAlh: bytes = None + ts: int = None + nentries: int = None + eH: bytes = None + blTxId: int = None + blRoot: bytes = None + version: int = None + metadata: TxMetadata = None + + +@dataclass +class TxMetadata(GRPCTransformable): + pass + + +@dataclass +class LinearProof(GRPCTransformable): + sourceTxId: int = None + TargetTxId: int = None + terms: List[bytes] = None + + +@dataclass +class DualProof(GRPCTransformable): + sourceTxHeader: TxHeader = None + targetTxHeader: TxHeader = None + inclusionProof: List[bytes] = None + consistencyProof: List[bytes] = None + targetBlTxAlh: bytes = None + lastInclusionProof: List[bytes] = None + linearProof: LinearProof = None + + +@dataclass +class Tx(GRPCTransformable): + header: TxHeader = None + entries: List[TxEntry] = None + kvEntries: List[Entry] = None + zEntries: List[ZEntry] = None + + +@dataclass +class TxEntry(GRPCTransformable): + key: bytes = None + hValue: bytes = None + vLen: int = None + metadata: KVMetadata = None + value: bytes = None + + +@dataclass +class KVMetadata(GRPCTransformable): + deleted: bool = None + expiration: Expiration = None + nonIndexable: bool = None + + +@dataclass +class Expiration(GRPCTransformable): + expiresAt: int = None + + +@dataclass +class VerifiableTx(GRPCTransformable): + tx: Tx = None + dualProof: DualProof = None + signature: Signature = None + + +@dataclass +class VerifiableEntry(GRPCTransformable): + entry: Entry = None + verifiableTx: VerifiableTx = None + inclusionProof: InclusionProof = None + + +@dataclass +class InclusionProof(GRPCTransformable): + leaf: int = None + width: int = None + terms: List[bytes] = None + + +@dataclass +class SetRequest(GRPCTransformable): + KVs: List[KeyValue] = None + noWait: bool = None + preconditions: List[Precondition] = None + + +@dataclass +class KeyRequest(GRPCTransformable): + key: bytes = None + atTx: int = None + sinceTx: int = None + noWait: bool = None + atRevision: int = None + + +@dataclass +class KeyListRequest(GRPCTransformable): + keys: List[bytes] = None + sinceTx: int = None + + +@dataclass +class DeleteKeysRequest(GRPCTransformable): + keys: List[bytes] = None + sinceTx: int = None + noWait: bool = None + + +@dataclass +class VerifiableSetRequest(GRPCTransformable): + setRequest: SetRequest = None + proveSinceTx: int = None + + +@dataclass +class VerifiableGetRequest(GRPCTransformable): + keyRequest: KeyRequest = None + proveSinceTx: int = None + + +@dataclass +class ServerInfoRequest(GRPCTransformable): + pass + + +@dataclass +class ServerInfoResponse(GRPCTransformable): + version: str = None + + +@dataclass +class HealthResponse(GRPCTransformable): + status: bool = None + version: str = None + + +@dataclass +class DatabaseHealthResponse(GRPCTransformable): + pendingRequests: int = None + lastRequestCompletedAt: int = None + + +@dataclass +class ImmutableState(GRPCTransformable): + db: str = None + txId: int = None + txHash: bytes = None + signature: Signature = None + + +@dataclass +class ReferenceRequest(GRPCTransformable): + key: bytes = None + referencedKey: bytes = None + atTx: int = None + boundRef: bool = None + noWait: bool = None + preconditions: List[Precondition] = None + + +@dataclass +class VerifiableReferenceRequest(GRPCTransformable): + referenceRequest: ReferenceRequest = None + proveSinceTx: int = None + + +@dataclass +class ZAddRequest(GRPCTransformable): + set: bytes = None + score: float = None + key: bytes = None + atTx: int = None + boundRef: bool = None + noWait: bool = None + + +@dataclass +class Score(GRPCTransformable): + score: float = None + + +@dataclass +class ZScanRequest(GRPCTransformable): + set: bytes = None + seekKey: bytes = None + seekScore: float = None + seekAtTx: int = None + inclusiveSeek: bool = None + limit: int = None + desc: bool = None + minScore: Score = None + maxScore: Score = None + sinceTx: int = None + noWait: bool = None + offset: int = None + + +@dataclass +class HistoryRequest(GRPCTransformable): + key: bytes = None + offset: int = None + limit: int = None + desc: bool = None + sinceTx: int = None + + +@dataclass +class VerifiableZAddRequest(GRPCTransformable): + zAddRequest: ZAddRequest = None + proveSinceTx: int = None + + +@dataclass +class TxRequest(GRPCTransformable): + tx: int = None + entriesSpec: EntriesSpec = None + sinceTx: int = None + noWait: bool = None + keepReferencesUnresolved: bool = None + + +@dataclass +class EntriesSpec(GRPCTransformable): + kvEntriesSpec: EntryTypeSpec = None + zEntriesSpec: EntryTypeSpec = None + sqlEntriesSpec: EntryTypeSpec = None + + +@dataclass +class EntryTypeSpec(GRPCTransformable): + action: EntryTypeAction = None + + +class EntryTypeAction(Enum): + EXCLUDE = 0 + ONLY_DIGEST = 1 + RAW_VALUE = 2 + RESOLVE = 3 + + +@dataclass +class VerifiableTxRequest(GRPCTransformable): + tx: int = None + proveSinceTx: int = None + entriesSpec: EntriesSpec = None + sinceTx: int = None + noWait: bool = None + keepReferencesUnresolved: bool = None + + +@dataclass +class TxScanRequest(GRPCTransformable): + initialTx: int = None + limit: int = None + desc: bool = None + entriesSpec: EntriesSpec = None + sinceTx: int = None + noWait: bool = None + + +@dataclass +class TxList(GRPCTransformable): + txs: List[Tx] = None + + +@dataclass +class ExportTxRequest(GRPCTransformable): + tx: int = None + + +@dataclass +class Database(GRPCTransformable): + databaseName: str = None + + +@dataclass +class DatabaseSettings(GRPCTransformable): + databaseName: str = None + replica: bool = None + masterDatabase: str = None + masterAddress: str = None + masterPort: int = None + followerUsername: str = None + followerPassword: str = None + fileSize: int = None + maxKeyLen: int = None + maxValueLen: int = None + maxTxEntries: int = None + excludeCommitTime: bool = None + + +@dataclass +class CreateDatabaseRequest(GRPCTransformable): + name: str = None + settings: Union[DatabaseNullableSettings, DatabaseSettingsV2] = None + ifNotExists: bool = None + + +@dataclass +class CreateDatabaseResponse(GRPCTransformable): + name: str = None + settings: DatabaseNullableSettings = None + alreadyExisted: bool = None + + def _getHumanDataClass(self): + return grpcHumanizator(self, CreateDatabaseResponseV2) + + +@dataclass +class CreateDatabaseResponseV2(GRPCTransformable): + name: str = None + settings: DatabaseSettingsV2 = None + alreadyExisted: bool = None + + +@dataclass +class UpdateDatabaseRequest(GRPCTransformable): + database: str = None + settings: Union[DatabaseNullableSettings, DatabaseSettingsV2] = None + + +@dataclass +class UpdateDatabaseResponse(GRPCTransformable): + database: str = None + settings: DatabaseNullableSettings = None + + def _getHumanDataClass(self): + return grpcHumanizator(self, UpdateDatabaseResponseV2) + + +@dataclass +class UpdateDatabaseResponseV2(GRPCTransformable): + database: str = None + settings: DatabaseSettingsV2 = None + + +@dataclass +class DatabaseSettingsRequest(GRPCTransformable): + pass + + +@dataclass +class DatabaseSettingsResponse(GRPCTransformable): + database: str = None + settings: DatabaseNullableSettings = None + + def _getHumanDataClass(self): + return grpcHumanizator(self, DatabaseSettingsResponseV2) + + +@dataclass +class DatabaseSettingsResponseV2(GRPCTransformable): + database: str = None + settings: DatabaseSettingsV2 = None + + +@dataclass +class NullableUint32(GRPCTransformable): + value: int = None + + def _getGRPC(self): + if self.value == None: + return None + else: + return schema.NullableUint32(value=self.value) + + def _getHumanDataClass(self): + return self.value + + +@dataclass +class NullableUint64(GRPCTransformable): + value: int = None + + def _getGRPC(self): + if self.value == None: + return None + else: + return schema.NullableUint64(value=self.value) + + def _getHumanDataClass(self): + return self.value + + +@dataclass +class NullableFloat(GRPCTransformable): + value: float = None + + def _getGRPC(self): + if self.value == None: + return None + else: + return schema.NullableFloat(value=self.value) + + def _getHumanDataClass(self): + return self.value + + +@dataclass +class NullableBool(GRPCTransformable): + value: bool = None + + def _getGRPC(self): + + if self.value == None: + return None + else: + return schema.NullableBool(value=self.value) + + def _getHumanDataClass(self): + if self.value == None: + return False + return self.value + + +@dataclass +class NullableString(GRPCTransformable): + value: str = None + + def _getGRPC(self): + if self.value == None: + return None + else: + return schema.NullableString(value=self.value) + + def _getHumanDataClass(self): + return self.value + + +@dataclass +class NullableMilliseconds(GRPCTransformable): + value: int = None + + def _getGRPC(self): + if self.value == None: + return None + else: + return schema.NullableMilliseconds(value=self.value) + + def _getHumanDataClass(self): + return self.value + + +@dataclass +class DatabaseNullableSettings(GRPCTransformable): + replicationSettings: ReplicationNullableSettings = None + fileSize: NullableUint32 = None + maxKeyLen: NullableUint32 = None + maxValueLen: NullableUint32 = None + maxTxEntries: NullableUint32 = None + excludeCommitTime: NullableBool = None + maxConcurrency: NullableUint32 = None + maxIOConcurrency: NullableUint32 = None + txLogCacheSize: NullableUint32 = None + vLogMaxOpenedFiles: NullableUint32 = None + txLogMaxOpenedFiles: NullableUint32 = None + commitLogMaxOpenedFiles: NullableUint32 = None + indexSettings: IndexNullableSettings = None + writeTxHeaderVersion: NullableUint32 = None + autoload: NullableBool = None + readTxPoolSize: NullableUint32 = None + syncFrequency: NullableMilliseconds = None + writeBufferSize: NullableUint32 = None + ahtSettings: AHTNullableSettings = None + + def _getHumanDataClass(self): + return grpcHumanizator(self, DatabaseSettingsV2) + + +@dataclass +class ReplicationSettings(GRPCTransformable): + replica: Optional[bool] = None + masterDatabase: Optional[str] = None + masterAddress: Optional[str] = None + masterPort: Optional[int] = None + followerUsername: Optional[str] = None + followerPassword: Optional[str] = None + + def _getGRPC(self): + return schema.ReplicationNullableSettings( + replica=NullableBool(self.replica)._getGRPC(), + masterDatabase=NullableString(self.masterDatabase)._getGRPC(), + masterAddress=NullableString(self.masterAddress)._getGRPC(), + masterPort=NullableUint32(self.masterPort)._getGRPC(), + followerUsername=NullableString(self.followerUsername)._getGRPC(), + followerPassword=NullableString(self.followerPassword)._getGRPC() + ) + + +@dataclass +class IndexSettings(GRPCTransformable): + flushThreshold: Optional[int] = None + syncThreshold: Optional[int] = None + cacheSize: Optional[int] = None + maxNodeSize: Optional[int] = None + maxActiveSnapshots: Optional[int] = None + renewSnapRootAfter: Optional[int] = None + compactionThld: Optional[int] = None + delayDuringCompaction: Optional[int] = None + nodesLogMaxOpenedFiles: Optional[int] = None + historyLogMaxOpenedFiles: Optional[int] = None + commitLogMaxOpenedFiles: Optional[int] = None + flushBufferSize: Optional[int] = None + cleanupPercentage: Optional[float] = None + + def _getGRPC(self): + return schema.IndexNullableSettings( + flushThreshold=NullableUint32(self.flushThreshold)._getGRPC(), + syncThreshold=NullableUint32(self.syncThreshold)._getGRPC(), + cacheSize=NullableUint32(self.cacheSize)._getGRPC(), + maxNodeSize=NullableUint32(self.maxNodeSize)._getGRPC(), + maxActiveSnapshots=NullableUint32( + self.maxActiveSnapshots)._getGRPC(), + renewSnapRootAfter=NullableUint64( + self.renewSnapRootAfter)._getGRPC(), + compactionThld=NullableUint32(self.compactionThld)._getGRPC(), + delayDuringCompaction=NullableUint32( + self.delayDuringCompaction)._getGRPC(), + nodesLogMaxOpenedFiles=NullableUint32( + self.nodesLogMaxOpenedFiles)._getGRPC(), + historyLogMaxOpenedFiles=NullableUint32( + self.historyLogMaxOpenedFiles)._getGRPC(), + commitLogMaxOpenedFiles=NullableUint32( + self.commitLogMaxOpenedFiles)._getGRPC(), + flushBufferSize=NullableUint32(self.flushBufferSize)._getGRPC(), + cleanupPercentage=NullableFloat(self.cleanupPercentage)._getGRPC() + ) + + +@dataclass +class AHTSettings(GRPCTransformable): + syncThreshold: Optional[int] = None + writeBufferSize: Optional[int] = None + + def _getGRPC(self): + return schema.AHTNullableSettings( + syncThreshold=NullableUint32(self.syncThreshold)._getGRPC(), + writeBufferSize=NullableUint32(self.writeBufferSize)._getGRPC() + ) + + +@dataclass +class DatabaseSettingsV2(GRPCTransformable): + replicationSettings: ReplicationSettings = None + fileSize: Optional[int] = None + maxKeyLen: Optional[int] = None + maxValueLen: Optional[int] = None + maxTxEntries: Optional[int] = None + excludeCommitTime: Optional[bool] = None + maxConcurrency: Optional[int] = None + maxIOConcurrency: Optional[int] = None + txLogCacheSize: Optional[int] = None + vLogMaxOpenedFiles: Optional[int] = None + txLogMaxOpenedFiles: Optional[int] = None + commitLogMaxOpenedFiles: Optional[int] = None + indexSettings: IndexSettings = None + writeTxHeaderVersion: Optional[int] = None + autoload: Optional[bool] = None + readTxPoolSize: Optional[int] = None + syncFrequency: NullableMilliseconds = None + writeBufferSize: Optional[int] = None + ahtSettings: AHTSettings = None + + def _getGRPC(self): + indexSettings = None + if self.indexSettings != None: + indexSettings = self.indexSettings._getGRPC() + replicationSettings = None + if self.replicationSettings != None: + replicationSettings = self.replicationSettings._getGRPC() + ahtSettings = None + if self.ahtSettings != None: + ahtSettings = self.ahtSettings._getGRPC() + + return schema.DatabaseNullableSettings( + replicationSettings=replicationSettings, + fileSize=NullableUint32(self.fileSize)._getGRPC(), + maxKeyLen=NullableUint32(self.maxKeyLen)._getGRPC(), + maxValueLen=NullableUint32(self.maxValueLen)._getGRPC(), + maxTxEntries=NullableUint32(self.maxTxEntries)._getGRPC(), + excludeCommitTime=NullableBool(self.excludeCommitTime)._getGRPC(), + maxConcurrency=NullableUint32(self.maxConcurrency)._getGRPC(), + maxIOConcurrency=NullableUint32(self.maxIOConcurrency)._getGRPC(), + txLogCacheSize=NullableUint32(self.txLogCacheSize)._getGRPC(), + vLogMaxOpenedFiles=NullableUint32( + self.vLogMaxOpenedFiles)._getGRPC(), + txLogMaxOpenedFiles=NullableUint32( + self.txLogMaxOpenedFiles)._getGRPC(), + commitLogMaxOpenedFiles=NullableUint32( + self.commitLogMaxOpenedFiles)._getGRPC(), + indexSettings=indexSettings, + writeTxHeaderVersion=NullableUint32( + self.writeTxHeaderVersion)._getGRPC(), + autoload=NullableBool(self.autoload)._getGRPC(), + readTxPoolSize=NullableUint32(self.readTxPoolSize)._getGRPC(), + syncFrequency=NullableMilliseconds(self.syncFrequency)._getGRPC(), + writeBufferSize=NullableUint32(self.writeBufferSize)._getGRPC(), + ahtSettings=ahtSettings + ) + + +@dataclass +class ReplicationNullableSettings(GRPCTransformable): + replica: NullableBool = None + masterDatabase: NullableString = None + masterAddress: NullableString = None + masterPort: NullableUint32 = None + followerUsername: NullableString = None + followerPassword: NullableString = None + + def _getHumanDataClass(self): + return grpcHumanizator(self, ReplicationSettings) + + +@dataclass +class IndexNullableSettings(GRPCTransformable): + flushThreshold: NullableUint32 = None + syncThreshold: NullableUint32 = None + cacheSize: NullableUint32 = None + maxNodeSize: NullableUint32 = None + maxActiveSnapshots: NullableUint32 = None + renewSnapRootAfter: NullableUint64 = None + compactionThld: NullableUint32 = None + delayDuringCompaction: NullableUint32 = None + nodesLogMaxOpenedFiles: NullableUint32 = None + historyLogMaxOpenedFiles: NullableUint32 = None + commitLogMaxOpenedFiles: NullableUint32 = None + flushBufferSize: NullableUint32 = None + cleanupPercentage: NullableFloat = None + + def _getHumanDataClass(self): + return grpcHumanizator(self, IndexSettings) + + +@dataclass +class AHTNullableSettings(GRPCTransformable): + syncThreshold: NullableUint32 = None + writeBufferSize: NullableUint32 = None + + def _getHumanDataClass(self): + return grpcHumanizator(self, AHTSettings) + + +@dataclass +class LoadDatabaseRequest(GRPCTransformable): + database: str = None + + +@dataclass +class LoadDatabaseResponse(GRPCTransformable): + database: str = None + + +@dataclass +class UnloadDatabaseRequest(GRPCTransformable): + database: str = None + + +@dataclass +class UnloadDatabaseResponse(GRPCTransformable): + database: str = None + + +@dataclass +class DeleteDatabaseRequest(GRPCTransformable): + database: str = None + + +@dataclass +class DeleteDatabaseResponse(GRPCTransformable): + database: str = None + + +@dataclass +class FlushIndexRequest(GRPCTransformable): + cleanupPercentage: float = None + synced: bool = None + + +@dataclass +class FlushIndexResponse(GRPCTransformable): + database: str = None + + +@dataclass +class Table(GRPCTransformable): + tableName: str = None + + +@dataclass +class SQLGetRequest(GRPCTransformable): + table: str = None + pkValues: List[SQLValue] = None + atTx: int = None + sinceTx: int = None + + +@dataclass +class VerifiableSQLGetRequest(GRPCTransformable): + sqlGetRequest: SQLGetRequest = None + proveSinceTx: int = None + + +@dataclass +class SQLEntry(GRPCTransformable): + tx: int = None + key: bytes = None + value: bytes = None + metadata: KVMetadata = None + + +@dataclass +class VerifiableSQLEntry(GRPCTransformable): + sqlEntry: SQLEntry = None + verifiableTx: VerifiableTx = None + inclusionProof: InclusionProof = None + DatabaseId: int = None + TableId: int = None + PKIDs: List[int] = None + ColNamesById: Dict[int, str] = None + ColIdsByName: Dict[str, int] = None + ColTypesById: Dict[int, str] = None + ColLenById: Dict[int, int] = None + verified: bool = False + + +@dataclass +class UseDatabaseReply(GRPCTransformable): + token: str = None + + +class PermissionAction(Enum): + GRANT = 0 + REVOK = 1 + + +@dataclass +class ChangePermissionRequest(GRPCTransformable): + action: PermissionAction = None + username: str = None + database: str = None + permission: int = None + + +@dataclass +class SetActiveUserRequest(GRPCTransformable): + active: bool = None + username: str = None + + +@dataclass +class DatabaseListResponse(GRPCTransformable): + databases: List[Database] = None + + +@dataclass +class DatabaseListRequestV2(GRPCTransformable): + pass + + +@dataclass +class DatabaseListResponseV2(GRPCTransformable): + databases: List[Union[DatabaseWithSettings, DatabaseWithSettingsV2]] = None + + def _getHumanDataClass(self): + return DatabaseListResponseV2(databases=[toConvert._getHumanDataClass() for toConvert in self.databases]) + + +@dataclass +class DatabaseWithSettings(GRPCTransformable): + name: str = None + settings: DatabaseNullableSettings = None + loaded: bool = None + + def _getHumanDataClass(self): + return grpcHumanizator(self, DatabaseWithSettingsV2) + + +@dataclass +class DatabaseWithSettingsV2(GRPCTransformable): + name: str = None + settings: DatabaseSettingsV2 = None + loaded: bool = None + + +@dataclass +class Chunk(GRPCTransformable): + content: bytes = None + + +@dataclass +class UseSnapshotRequest(GRPCTransformable): + sinceTx: int = None + asBeforeTx: int = None + + +@dataclass +class SQLExecRequest(GRPCTransformable): + sql: str = None + params: List[NamedParam] = None + noWait: bool = None + + +@dataclass +class SQLQueryRequest(GRPCTransformable): + sql: str = None + params: List[NamedParam] = None + reuseSnapshot: int = None + + +@dataclass +class NamedParam(GRPCTransformable): + name: str = None + value: SQLValue = None + + +@dataclass +class SQLExecResult(GRPCTransformable): + txs: List[CommittedSQLTx] = None + ongoingTx: bool = None + + +@dataclass +class CommittedSQLTx(GRPCTransformable): + header: TxHeader = None + updatedRows: int = None + lastInsertedPKs: Dict[str, SQLValue] = None + firstInsertedPKs: Dict[str, SQLValue] = None + + +@dataclass +class SQLQueryResult(GRPCTransformable): + columns: List[Column] = None + rows: List[Row] = None + + +@dataclass +class Column(GRPCTransformable): + name: str = None + type: str = None + + +@dataclass +class Row(GRPCTransformable): + columns: List[str] = None + values: List[SQLValue] = None + +# ONE OF + + +@dataclass +class SQLValue(GRPCTransformable): + null: Optional[NullValue] = None + n: Optional[int] = None + s: Optional[str] = None + b: Optional[bool] = None + bs: Optional[bytes] = None + ts: Optional[int] = None + + +@dataclass +class PrimaryKey: + pass + + +@dataclass +class PrimaryKeyNullValue(GRPCTransformable, PrimaryKey): + def _getGRPC(self): + return schema.SQLValue(null=None) + + +@dataclass +class PrimaryKeyIntValue(GRPCTransformable, PrimaryKey): + value: int + + def _getGRPC(self): + return schema.SQLValue(n=self.value) + + +@dataclass +class PrimaryKeyVarCharValue(GRPCTransformable, PrimaryKey): + value: str + + def _getGRPC(self): + return schema.SQLValue(s=self.value) + + +@dataclass +class PrimaryKeyBoolValue(GRPCTransformable, PrimaryKey): + value: bool + + def _getGRPC(self): + return schema.SQLValue(b=self.value) + + +@dataclass +class PrimaryKeyBlobValue(GRPCTransformable, PrimaryKey): + value: bytes + + def _getGRPC(self): + return schema.SQLValue(bs=self.value) + + +@dataclass +class PrimaryKeyTsValue(GRPCTransformable, PrimaryKey): + value: int + + def _getGRPC(self): + return schema.SQLValue(ts=self.value) + + +class TxMode(Enum): + ReadOnly = 0 + WriteOnly = 1 + ReadWrite = 2 + + +@dataclass +class NewTxRequest(GRPCTransformable): + mode: TxMode = None + + +@dataclass +class NewTxResponse(GRPCTransformable): + transactionID: str = None + + +@dataclass +class ErrorInfo(GRPCTransformable): + code: str = None + cause: str = None + + +@dataclass +class DebugInfo(GRPCTransformable): + stack: str = None + + +@dataclass +class RetryInfo(GRPCTransformable): + retry_delay: int = None diff --git a/immudb/embedded/store/verification.py b/immudb/embedded/store/verification.py index fb42e91..a66141d 100644 --- a/immudb/embedded/store/verification.py +++ b/immudb/embedded/store/verification.py @@ -10,11 +10,15 @@ # See the License for the specific language governing permissions and # limitations under the License. +from operator import xor +from typing import List +from immudb import datatypesv2 from immudb.embedded import store, ahtree from immudb.constants import * -from immudb.exceptions import ErrUnsupportedTxVersion +from immudb.exceptions import ErrCorruptedData, ErrUnsupportedTxVersion, ErrMaxKeyLengthExceeded, ErrInvalidValue, ErrMaxLengthExceeded import hashlib import struct +import datetime def VerifyInclusion(proof, digest: bytes, root) -> bool: @@ -135,3 +139,104 @@ def EntrySpecDigest_v1(kv: store.EntrySpec) -> bytes: def leafFor(d: bytes) -> bytes: b = LEAF_PREFIX+d return hashlib.sha256(b).digest() + + +def sqlMapKey(prefix: bytes, mappingPrefix: str, encValues: List[bytes]): + + mkey = b'' + + off = 0 + + mkey += prefix + off += len(prefix) + + mkey += mappingPrefix.encode("utf-8") + + off += len(mappingPrefix) + + for ev in encValues: + mkey += ev + off += len(ev) + + return mkey + + +def encodeID(id: int): + encId = b'' + encId += int.to_bytes(id, 4, "big") + return encId + + +def encodeAsKey(val, colType, maxLen): + maxKeyLen = 256 # pkg/client/sql.go + KeyValPrefixNotNull = b'\x80' + + if maxLen <= 0: + raise ErrInvalidValue() + + if maxLen > maxKeyLen: + raise ErrMaxKeyLengthExceeded() + + if val == None: + return KeyValPrefixNotNull + + if isinstance(colType, datatypesv2.PrimaryKeyNullValue): + strVal = str(val) + if len(strVal) > maxLen: + raise ErrMaxLengthExceeded() + + encv = b'' + encv[0] = KeyValPrefixNotNull + encv += strVal.encode("utf-8") + encv += int.to_bytes(len(strVal), 4, "big") + + return encv + elif isinstance(colType, datatypesv2.PrimaryKeyIntValue): + if maxLen != 8: + raise ErrCorruptedData() + + intVal = int(val) + + encv = bytearray() + encv += KeyValPrefixNotNull + encv += int.to_bytes(intVal, 8, "big") + encv[1] = ord(encv[1:2]) ^ ord(b'\x80') + return bytes(encv) + elif isinstance(colType, datatypesv2.PrimaryKeyVarCharValue): + + encv = bytearray() + encv += KeyValPrefixNotNull + encv += str(val).encode("utf-8") + encv += b'\x00' * (maxLen - len(val)) + encv += int.to_bytes(len(val), 4, "big") + return bytes(encv) + elif isinstance(colType, datatypesv2.PrimaryKeyBoolValue): + + encv = bytearray() + encv += KeyValPrefixNotNull + if (val == True): + encv += b'\x01' + else: + encv += b'\x00' + return bytes(encv) + elif isinstance(colType, datatypesv2.PrimaryKeyBlobValue): + + encv = bytearray() + encv += KeyValPrefixNotNull + encv += val + encv += b'\x00' * (maxLen - len(val)) + encv += int.to_bytes(len(val), 4, "big") + return bytes(encv) + elif isinstance(colType, datatypesv2.PrimaryKeyTsValue): + if maxLen != 8: + raise ErrCorruptedData() + + parsed = datetime.datetime.fromtimestamp(val / 1e6) + # UnixNano from GO not compatible with python, need to round last int + intVal = round(int(parsed.timestamp() * 1e9), -3) + + encv = bytearray() + encv += KeyValPrefixNotNull + encv += int.to_bytes(intVal, 8, "big") + encv[1] = ord(encv[1:2]) ^ ord(b'\x80') + return bytes(encv) diff --git a/immudb/exceptions.py b/immudb/exceptions.py index cfb0b5d..cbf7627 100644 --- a/immudb/exceptions.py +++ b/immudb/exceptions.py @@ -49,3 +49,15 @@ class ErrMetadataUnsupported(Exception): class ErrPySDKInvalidColumnMode(Exception): pass + + +class ErrInvalidValue(Exception): + pass + + +class ErrMaxKeyLengthExceeded(Exception): + pass + + +class ErrMaxLengthExceeded(Exception): + pass diff --git a/immudb/grpc/Makefile b/immudb/grpc/Makefile index 25c5768..45e0f91 100644 --- a/immudb/grpc/Makefile +++ b/immudb/grpc/Makefile @@ -1,14 +1,26 @@ PROTO_DIR := proto -PROTO_FILE := ${PROTO_DIR}/schema.proto +# grpc-gateway https://github.com/grpc-ecosystem/grpc-gateway/tree/v1.16.0 +# immudb https://github.com/codenotary/immudb/tree/master/pkg/api/schema + + +GRPC_GATEWAY := grpcgatewayrepo +PROTO_FILE := ${PROTO_DIR}/*.proto +PROTOC_INCLUDE_PATH_GOOGLE := -I${GRPC_GATEWAY} -I ${GRPC_GATEWAY}/third_party/googleapis -I ${GRPC_GATEWAY} PROTOC_INCLUDE_PATH := -I${PROTO_DIR} .PHONY: ${PROTO_DIR} ${PROTO_DIR}: + rm -rf ${GRPC_GATEWAY} + git clone https://github.com/grpc-ecosystem/grpc-gateway.git -b v1.16.0 --depth=1 ${GRPC_GATEWAY} + # Currently we can't synchronize proto from immudb because of proto-gen-swagger dependency, manual intervention required + # curl https://raw.githubusercontent.com/codenotary/immudb/master/pkg/api/schema/schema.proto -o ${PROTO_DIR}/schema.proto python3 -m grpc_tools.protoc \ ${PROTO_FILE} \ - --proto_path=./proto \ + --proto_path=./${PROTO_DIR} \ ${PROTOC_INCLUDE_PATH} \ + ${PROTOC_INCLUDE_PATH_GOOGLE} \ --python_out=. \ --grpc_python_out=. - ./fixup.sh - + touch __init__.py + rm -rf ${GRPC_GATEWAY} + ./fixup.sh \ No newline at end of file diff --git a/immudb/grpc/proto/schema.proto b/immudb/grpc/proto/schema.proto index 34923cf..6da6a9e 100644 --- a/immudb/grpc/proto/schema.proto +++ b/immudb/grpc/proto/schema.proto @@ -1,5 +1,5 @@ /* -Copyright 2021 CodeNotary, Inc. All rights reserved. +Copyright 2022 Codenotary Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,6 +16,7 @@ limitations under the License. syntax = "proto3"; +import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/struct.proto"; @@ -97,11 +98,11 @@ message Precondition { message KeyMustExistPrecondition { bytes key = 1; } - + message KeyMustNotExistPrecondition { bytes key = 1; } - + message KeyNotModifiedAfterTXPrecondition { bytes key = 1; uint64 txID = 2; @@ -170,11 +171,15 @@ message ZEntries { message ScanRequest { bytes seekKey = 1; + bytes endKey = 7; bytes prefix = 2; bool desc = 3; uint64 limit = 4; uint64 sinceTx = 5; bool noWait = 6; + bool inclusiveSeek = 8; // If set to true, results will include seekKey + bool inclusiveEnd = 9; // If set to true, results will include endKey if needed + uint64 offset = 10; // Specify the initial entry to be returned by excluding the initial set of entries } message KeyPrefix { @@ -279,10 +284,19 @@ message SetRequest { message KeyRequest { bytes key = 1; - uint64 atTx = 2; + uint64 atTx = 2; // if > 0, query for the value exactly at given transaction + + + // if 0 (and nowait=false), wait for the index to be up=to-date uint64 sinceTx = 3; + + // if set to true - do not wait for any indexing update considering only the currently indexed state bool noWait = 4; + + // if > 0, get the nth version of the value, 1 being the first version, 2 being the second and so on + // if < 0, get the historical nth value of the key, -1 being the previous version, -2 being the one before and so on int64 atRevision = 5; + } message KeyListRequest { @@ -306,6 +320,15 @@ message VerifiableGetRequest { uint64 proveSinceTx = 2; } +// ServerInfoRequest exists to provide extensibility for rpc ServerInfo. +message ServerInfoRequest {} + +// ServerInfoResponse contains information about the server instance. +message ServerInfoResponse { + // The version of the server instance. + string version = 1; +} + message HealthResponse { bool status = 1; string version = 2; @@ -362,11 +385,12 @@ message ZScanRequest { Score maxScore = 9; uint64 sinceTx = 10; bool noWait = 11; + uint64 offset = 12; // Specify the initial entry to be returned by excluding the initial set of entries } message HistoryRequest { bytes key = 1; - uint64 offset = 2; + uint64 offset = 2; // Specify the initial entry to be returned by excluding the initial set of entries int32 limit = 3; bool desc = 4; uint64 sinceTx = 5; @@ -378,10 +402,11 @@ message VerifiableZAddRequest { } message TxRequest { - uint64 tx = 1; - EntriesSpec entriesSpec = 2; - uint64 sinceTx = 3; - bool noWait = 4; + uint64 tx = 1; + EntriesSpec entriesSpec = 2; + uint64 sinceTx = 3; + bool noWait = 4; + bool keepReferencesUnresolved = 5; } message EntriesSpec { @@ -407,6 +432,7 @@ message VerifiableTxRequest { EntriesSpec entriesSpec = 3; uint64 sinceTx = 4; bool noWait = 5; + bool keepReferencesUnresolved = 6; } message TxScanRequest { @@ -451,11 +477,13 @@ message DatabaseSettings { message CreateDatabaseRequest { string name = 1; DatabaseNullableSettings settings = 2; + bool ifNotExists = 3; } message CreateDatabaseResponse { string name = 1; DatabaseNullableSettings settings = 2; + bool alreadyExisted = 3; } message UpdateDatabaseRequest { @@ -497,6 +525,10 @@ message NullableString { string value = 1; } +message NullableMilliseconds { + int64 value = 1; +} + message DatabaseNullableSettings { ReplicationNullableSettings replicationSettings = 2; @@ -518,8 +550,16 @@ message DatabaseNullableSettings { IndexNullableSettings indexSettings = 19; NullableUint32 writeTxHeaderVersion = 20; - + NullableBool autoload = 21; + + NullableUint32 readTxPoolSize = 22; + + NullableMilliseconds syncFrequency = 23; + + NullableUint32 writeBufferSize = 24; + + AHTNullableSettings ahtSettings = 25; } message ReplicationNullableSettings { @@ -547,6 +587,11 @@ message IndexNullableSettings { NullableFloat cleanupPercentage = 13; } +message AHTNullableSettings { + NullableUint32 syncThreshold = 1; + NullableUint32 writeBufferSize = 2; +} + message LoadDatabaseRequest { string database = 1; // may add createIfNotExist @@ -736,6 +781,7 @@ message NewTxResponse { } + message ErrorInfo { string code = 1; string cause = 2; @@ -751,13 +797,46 @@ message RetryInfo { // immudb gRPC & REST service service ImmuService { - rpc ListUsers (google.protobuf.Empty) returns (UserList); - rpc CreateUser (CreateUserRequest) returns (google.protobuf.Empty); - rpc ChangePassword (ChangePasswordRequest) returns (google.protobuf.Empty); - rpc ChangePermission(ChangePermissionRequest) returns (google.protobuf.Empty); - rpc SetActiveUser (SetActiveUserRequest) returns (google.protobuf.Empty); - rpc UpdateAuthConfig (AuthConfig) returns (google.protobuf.Empty); // DEPRECATED - rpc UpdateMTLSConfig (MTLSConfig) returns (google.protobuf.Empty); // DEPRECATED + rpc ListUsers (google.protobuf.Empty) returns (UserList){ + option (google.api.http) = { + get: "/user/list" + }; + }; + + rpc CreateUser (CreateUserRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/user" + body: "*" + }; + }; + + rpc ChangePassword (ChangePasswordRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/user/password/change" + body: "*" + }; + }; + + rpc ChangePermission(ChangePermissionRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/user/changepermission" + body: "*" + }; + } + + rpc SetActiveUser (SetActiveUserRequest) returns (google.protobuf.Empty){ + option (google.api.http) = { + post: "/user/setactiveUser" + body: "*" + }; + }; + + rpc UpdateAuthConfig (AuthConfig) returns (google.protobuf.Empty){ + option deprecated = true; + } // DEPRECATED + rpc UpdateMTLSConfig (MTLSConfig) returns (google.protobuf.Empty){ + option deprecated = true; + } // DEPRECATED rpc OpenSession (OpenSessionRequest) returns (OpenSessionResponse){}; rpc CloseSession (google.protobuf.Empty) returns (google.protobuf.Empty){}; @@ -770,51 +849,290 @@ service ImmuService { rpc TxSQLExec(SQLExecRequest) returns (google.protobuf.Empty) {}; rpc TxSQLQuery(SQLQueryRequest) returns (SQLQueryResult) {}; - rpc Login (LoginRequest) returns (LoginResponse); - rpc Logout (google.protobuf.Empty) returns (google.protobuf.Empty); - rpc Set (SetRequest) returns (TxHeader); - rpc VerifiableSet (VerifiableSetRequest) returns (VerifiableTx); - rpc Get (KeyRequest) returns (Entry); - rpc VerifiableGet (VerifiableGetRequest) returns (VerifiableEntry); - rpc Delete(DeleteKeysRequest) returns (TxHeader); - rpc GetAll (KeyListRequest) returns (Entries); - rpc ExecAll (ExecAllRequest) returns (TxHeader); - rpc Scan(ScanRequest) returns (Entries); + rpc Login (LoginRequest) returns (LoginResponse){ + option deprecated = true; + option (google.api.http) = { + post: "/login" + body: "*" + }; + }; + + rpc Logout (google.protobuf.Empty) returns (google.protobuf.Empty){ + option deprecated = true; + option (google.api.http) = { + post: "/logout" + body: "*" + }; + }; + + rpc Set (SetRequest) returns (TxHeader){ + option (google.api.http) = { + post: "/db/set" + body: "*" + }; + }; + + rpc VerifiableSet (VerifiableSetRequest) returns (VerifiableTx){ + option (google.api.http) = { + post: "/db/verifiable/set" + body: "*" + }; + }; + + rpc Get (KeyRequest) returns (Entry){ + option (google.api.http) = { + get: "/db/get/{key}" + }; + }; + + rpc VerifiableGet (VerifiableGetRequest) returns (VerifiableEntry){ + option (google.api.http) = { + post: "/db/verifiable/get" + body: "*" + }; + }; + + rpc Delete(DeleteKeysRequest) returns (TxHeader) { + option (google.api.http) = { + post: "/db/delete" + body: "*" + }; + } + + rpc GetAll (KeyListRequest) returns (Entries){ + option (google.api.http) = { + post: "/db/getall" + body: "*" + }; + }; + + rpc ExecAll (ExecAllRequest) returns (TxHeader) { + option (google.api.http) = { + post: "/db/execall" + body: "*" + }; + }; + + rpc Scan(ScanRequest) returns (Entries){ + option (google.api.http) = { + post: "/db/scan" + body: "*" + }; + }; // NOT YET SUPPORTED - rpc Count(KeyPrefix) returns (EntryCount); + rpc Count(KeyPrefix) returns (EntryCount){ + option (google.api.http) = { + get: "/db/count/{prefix}" + }; + }; // NOT YET SUPPORTED - rpc CountAll(google.protobuf.Empty) returns (EntryCount); - rpc TxById(TxRequest) returns (Tx); - rpc VerifiableTxById(VerifiableTxRequest) returns (VerifiableTx); - rpc TxScan(TxScanRequest) returns (TxList); - rpc History(HistoryRequest) returns (Entries); - rpc Health (google.protobuf.Empty) returns (HealthResponse); - rpc DatabaseHealth (google.protobuf.Empty) returns (DatabaseHealthResponse); - rpc CurrentState (google.protobuf.Empty) returns (ImmutableState); - rpc SetReference (ReferenceRequest) returns (TxHeader); - rpc VerifiableSetReference (VerifiableReferenceRequest) returns (VerifiableTx); - rpc ZAdd (ZAddRequest) returns (TxHeader); - rpc VerifiableZAdd (VerifiableZAddRequest) returns (VerifiableTx); - rpc ZScan (ZScanRequest) returns (ZEntries); - - // DEPRECATED: kept for backward compatibility - rpc CreateDatabase(Database) returns (google.protobuf.Empty); - rpc CreateDatabaseWith(DatabaseSettings) returns (google.protobuf.Empty); - rpc CreateDatabaseV2(CreateDatabaseRequest) returns (CreateDatabaseResponse); - rpc LoadDatabase(LoadDatabaseRequest) returns (LoadDatabaseResponse); - rpc UnloadDatabase(UnloadDatabaseRequest) returns (UnloadDatabaseResponse); - rpc DeleteDatabase(DeleteDatabaseRequest) returns (DeleteDatabaseResponse); - rpc DatabaseList (google.protobuf.Empty) returns (DatabaseListResponse); - rpc DatabaseListV2 (DatabaseListRequestV2) returns (DatabaseListResponseV2); - rpc UseDatabase(Database) returns (UseDatabaseReply); - rpc UpdateDatabase(DatabaseSettings) returns (google.protobuf.Empty); - rpc UpdateDatabaseV2(UpdateDatabaseRequest) returns (UpdateDatabaseResponse); - rpc GetDatabaseSettings(google.protobuf.Empty) returns (DatabaseSettings); - rpc GetDatabaseSettingsV2(DatabaseSettingsRequest) returns (DatabaseSettingsResponse); - rpc FlushIndex(FlushIndexRequest) returns (FlushIndexResponse); - rpc CompactIndex(google.protobuf.Empty) returns (google.protobuf.Empty); + rpc CountAll(google.protobuf.Empty) returns (EntryCount){ + option (google.api.http) = { + get: "/db/countall" + }; + }; + + rpc TxById(TxRequest) returns (Tx){ + option (google.api.http) = { + get: "/db/tx/{tx}" + }; + }; + + rpc VerifiableTxById(VerifiableTxRequest) returns (VerifiableTx){ + option (google.api.http) = { + get: "/db/verifiable/tx/{tx}" + }; + }; + + rpc TxScan(TxScanRequest) returns (TxList) { + option (google.api.http) = { + post: "/db/tx" + body: "*" + }; + } + + rpc History(HistoryRequest) returns (Entries){ + option (google.api.http) = { + post: "/db/history" + body: "*" + }; + }; + + // ServerInfo returns information about the server instance. + // ServerInfoRequest is defined for future extensions. + rpc ServerInfo (ServerInfoRequest) returns (ServerInfoResponse){ + option (google.api.http) = { + get: "/serverinfo" + }; + }; + + // DEPRECATED: Use ServerInfo + rpc Health (google.protobuf.Empty) returns (HealthResponse){ + option (google.api.http) = { + get: "/health" + }; + }; + + rpc DatabaseHealth (google.protobuf.Empty) returns (DatabaseHealthResponse){ + option (google.api.http) = { + get: "/db/health" + }; + }; + + rpc CurrentState (google.protobuf.Empty) returns (ImmutableState){ + option (google.api.http) = { + get: "/db/state" + }; + }; + + rpc SetReference (ReferenceRequest) returns (TxHeader){ + option (google.api.http) = { + post: "/db/setreference" + body: "*" + }; + }; + + rpc VerifiableSetReference (VerifiableReferenceRequest) returns (VerifiableTx){ + option (google.api.http) = { + post: "/db/verifiable/setreference" + body: "*" + }; + }; + + rpc ZAdd (ZAddRequest) returns (TxHeader){ + option (google.api.http) = { + post: "/db/zadd" + body: "*" + }; + }; + + rpc VerifiableZAdd (VerifiableZAddRequest) returns (VerifiableTx){ + option (google.api.http) = { + post: "/db/verifiable/zadd" + body: "*" + }; + }; + + rpc ZScan (ZScanRequest) returns (ZEntries){ + option (google.api.http) = { + post: "/db/zscan" + body: "*" + }; + }; + + // DEPRECATED: Use CreateDatabaseV2 + rpc CreateDatabase(Database) returns (google.protobuf.Empty) { + option deprecated = true; + option (google.api.http) = { + post: "/db/create" + body: "*" + }; + } + + // DEPRECATED: Use CreateDatabaseV2 + rpc CreateDatabaseWith(DatabaseSettings) returns (google.protobuf.Empty) { + option deprecated = true; + option (google.api.http) = { + post: "/db/createwith" + body: "*" + }; + } + + rpc CreateDatabaseV2(CreateDatabaseRequest) returns (CreateDatabaseResponse) { + option (google.api.http) = { + post: "/db/create/v2" + body: "*" + }; + } + + rpc LoadDatabase(LoadDatabaseRequest) returns (LoadDatabaseResponse) { + option (google.api.http) = { + post: "/db/load" + body: "*" + }; + } + + rpc UnloadDatabase(UnloadDatabaseRequest) returns (UnloadDatabaseResponse) { + option (google.api.http) = { + post: "/db/unload" + body: "*" + }; + } + + rpc DeleteDatabase(DeleteDatabaseRequest) returns (DeleteDatabaseResponse) { + option (google.api.http) = { + post: "/db/delete" + body: "*" + }; + } + + // DEPRECATED: Use DatabaseListV2 + rpc DatabaseList (google.protobuf.Empty) returns (DatabaseListResponse){ + option deprecated = true; + option (google.api.http) = { + post: "/db/list" + body: "*" + }; + }; + + rpc DatabaseListV2 (DatabaseListRequestV2) returns (DatabaseListResponseV2){ + option (google.api.http) = { + post: "/db/list/v2" + body: "*" + }; + }; + + rpc UseDatabase(Database) returns (UseDatabaseReply) { + option (google.api.http) = { + get: "/db/use/{databaseName}" + }; + } + + // DEPRECATED: Use UpdateDatabaseV2 + rpc UpdateDatabase(DatabaseSettings) returns (google.protobuf.Empty) { + option deprecated = true; + option (google.api.http) = { + post: "/db/update" + body: "*" + }; + } + + rpc UpdateDatabaseV2(UpdateDatabaseRequest) returns (UpdateDatabaseResponse) { + option (google.api.http) = { + post: "/db/update/v2" + body: "*" + }; + } + + // DEPRECATED: Use GetDatabaseSettingsV2 + rpc GetDatabaseSettings(google.protobuf.Empty) returns (DatabaseSettings) { + option deprecated = true; + option (google.api.http) = { + post: "/db/settings" + body: "*" + }; + } + + rpc GetDatabaseSettingsV2(DatabaseSettingsRequest) returns (DatabaseSettingsResponse) { + option (google.api.http) = { + post: "/db/settings/v2" + body: "*" + }; + } + + rpc FlushIndex(FlushIndexRequest) returns (FlushIndexResponse) { + option (google.api.http) = { + get: "/db/flushindex" + }; + } + + rpc CompactIndex(google.protobuf.Empty) returns (google.protobuf.Empty) { + option (google.api.http) = { + get: "/db/compactindex" + }; + } // Streams rpc streamGet(KeyRequest) returns (stream Chunk) {}; @@ -830,9 +1148,37 @@ service ImmuService { rpc exportTx(ExportTxRequest) returns (stream Chunk) {}; rpc replicateTx(stream Chunk) returns (TxHeader) {}; - rpc SQLExec(SQLExecRequest) returns (SQLExecResult); - rpc SQLQuery(SQLQueryRequest) returns (SQLQueryResult); - rpc ListTables(google.protobuf.Empty) returns (SQLQueryResult); - rpc DescribeTable(Table) returns (SQLQueryResult); - rpc VerifiableSQLGet (VerifiableSQLGetRequest) returns (VerifiableSQLEntry); + rpc SQLExec(SQLExecRequest) returns (SQLExecResult) { + option (google.api.http) = { + post: "/db/sqlexec" + body: "*" + }; + }; + + rpc SQLQuery(SQLQueryRequest) returns (SQLQueryResult) { + option (google.api.http) = { + post: "/db/sqlquery" + body: "*" + }; + }; + + rpc ListTables(google.protobuf.Empty) returns (SQLQueryResult) { + option (google.api.http) = { + get: "/db/table/list" + }; + }; + + rpc DescribeTable(Table) returns (SQLQueryResult) { + option (google.api.http) = { + post: "/db/tables" + body: "*" + }; + }; + + rpc VerifiableSQLGet (VerifiableSQLGetRequest) returns (VerifiableSQLEntry){ + option (google.api.http) = { + post: "/db/verifiable/sqlget" + body: "*" + }; + }; } diff --git a/immudb/grpc/schema_pb2.py b/immudb/grpc/schema_pb2.py index 66b6218..5c6247d 100644 --- a/immudb/grpc/schema_pb2.py +++ b/immudb/grpc/schema_pb2.py @@ -1,11 +1,10 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: schema.proto - -import sys -_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) +"""Generated protocol buffer code.""" from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database @@ -14,99 +13,18 @@ _sym_db = _symbol_database.Default() +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -DESCRIPTOR = _descriptor.FileDescriptor( - name='schema.proto', - package='immudb.schema', - syntax='proto3', - serialized_options=_b('Z+github.com/codenotary/immudb/pkg/api/schema'), - serialized_pb=_b('\n\x0cschema.proto\x12\rimmudb.schema\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x12\n\x03Key\x12\x0b\n\x03key\x18\x01 \x01(\x0c\"2\n\nPermission\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x12\n\npermission\x18\x02 \x01(\r\"z\n\x04User\x12\x0c\n\x04user\x18\x01 \x01(\x0c\x12.\n\x0bpermissions\x18\x03 \x03(\x0b\x32\x19.immudb.schema.Permission\x12\x11\n\tcreatedby\x18\x04 \x01(\t\x12\x11\n\tcreatedat\x18\x05 \x01(\t\x12\x0e\n\x06\x61\x63tive\x18\x06 \x01(\x08\".\n\x08UserList\x12\"\n\x05users\x18\x01 \x03(\x0b\x32\x13.immudb.schema.User\"Y\n\x11\x43reateUserRequest\x12\x0c\n\x04user\x18\x01 \x01(\x0c\x12\x10\n\x08password\x18\x02 \x01(\x0c\x12\x12\n\npermission\x18\x03 \x01(\r\x12\x10\n\x08\x64\x61tabase\x18\x04 \x01(\t\"\x1b\n\x0bUserRequest\x12\x0c\n\x04user\x18\x01 \x01(\x0c\"O\n\x15\x43hangePasswordRequest\x12\x0c\n\x04user\x18\x01 \x01(\x0c\x12\x13\n\x0boldPassword\x18\x02 \x01(\x0c\x12\x13\n\x0bnewPassword\x18\x03 \x01(\x0c\".\n\x0cLoginRequest\x12\x0c\n\x04user\x18\x01 \x01(\x0c\x12\x10\n\x08password\x18\x02 \x01(\x0c\"/\n\rLoginResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x0f\n\x07warning\x18\x02 \x01(\x0c\"\x1a\n\nAuthConfig\x12\x0c\n\x04kind\x18\x01 \x01(\r\"\x1d\n\nMTLSConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"N\n\x12OpenSessionRequest\x12\x10\n\x08username\x18\x01 \x01(\x0c\x12\x10\n\x08password\x18\x02 \x01(\x0c\x12\x14\n\x0c\x64\x61tabaseName\x18\x03 \x01(\t\"<\n\x13OpenSessionResponse\x12\x11\n\tsessionID\x18\x01 \x01(\t\x12\x12\n\nserverUUID\x18\x02 \x01(\t\"\xb5\x03\n\x0cPrecondition\x12L\n\x0ckeyMustExist\x18\x01 \x01(\x0b\x32\x34.immudb.schema.Precondition.KeyMustExistPreconditionH\x00\x12R\n\x0fkeyMustNotExist\x18\x02 \x01(\x0b\x32\x37.immudb.schema.Precondition.KeyMustNotExistPreconditionH\x00\x12^\n\x15keyNotModifiedAfterTX\x18\x03 \x01(\x0b\x32=.immudb.schema.Precondition.KeyNotModifiedAfterTXPreconditionH\x00\x1a\'\n\x18KeyMustExistPrecondition\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x1a*\n\x1bKeyMustNotExistPrecondition\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x1a>\n!KeyNotModifiedAfterTXPrecondition\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x0c\n\x04txID\x18\x02 \x01(\x04\x42\x0e\n\x0cprecondition\"S\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05value\x18\x02 \x01(\x0c\x12+\n\x08metadata\x18\x03 \x01(\x0b\x32\x19.immudb.schema.KVMetadata\"\xaf\x01\n\x05\x45ntry\x12\n\n\x02tx\x18\x01 \x01(\x04\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\r\n\x05value\x18\x03 \x01(\x0c\x12.\n\x0creferencedBy\x18\x04 \x01(\x0b\x32\x18.immudb.schema.Reference\x12+\n\x08metadata\x18\x05 \x01(\x0b\x32\x19.immudb.schema.KVMetadata\x12\x0f\n\x07\x65xpired\x18\x06 \x01(\x08\x12\x10\n\x08revision\x18\x07 \x01(\x04\"q\n\tReference\x12\n\n\x02tx\x18\x01 \x01(\x04\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\x0c\n\x04\x61tTx\x18\x03 \x01(\x04\x12+\n\x08metadata\x18\x04 \x01(\x0b\x32\x19.immudb.schema.KVMetadata\x12\x10\n\x08revision\x18\x05 \x01(\x04\"\x94\x01\n\x02Op\x12%\n\x02kv\x18\x01 \x01(\x0b\x32\x17.immudb.schema.KeyValueH\x00\x12*\n\x04zAdd\x18\x02 \x01(\x0b\x32\x1a.immudb.schema.ZAddRequestH\x00\x12.\n\x03ref\x18\x03 \x01(\x0b\x32\x1f.immudb.schema.ReferenceRequestH\x00\x42\x0b\n\toperation\"{\n\x0e\x45xecAllRequest\x12%\n\nOperations\x18\x01 \x03(\x0b\x32\x11.immudb.schema.Op\x12\x0e\n\x06noWait\x18\x02 \x01(\x08\x12\x32\n\rpreconditions\x18\x03 \x03(\x0b\x32\x1b.immudb.schema.Precondition\"0\n\x07\x45ntries\x12%\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x14.immudb.schema.Entry\"d\n\x06ZEntry\x12\x0b\n\x03set\x18\x01 \x01(\x0c\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12#\n\x05\x65ntry\x18\x03 \x01(\x0b\x32\x14.immudb.schema.Entry\x12\r\n\x05score\x18\x04 \x01(\x01\x12\x0c\n\x04\x61tTx\x18\x05 \x01(\x04\"2\n\x08ZEntries\x12&\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x15.immudb.schema.ZEntry\"l\n\x0bScanRequest\x12\x0f\n\x07seekKey\x18\x01 \x01(\x0c\x12\x0e\n\x06prefix\x18\x02 \x01(\x0c\x12\x0c\n\x04\x64\x65sc\x18\x03 \x01(\x08\x12\r\n\x05limit\x18\x04 \x01(\x04\x12\x0f\n\x07sinceTx\x18\x05 \x01(\x04\x12\x0e\n\x06noWait\x18\x06 \x01(\x08\"\x1b\n\tKeyPrefix\x12\x0e\n\x06prefix\x18\x01 \x01(\x0c\"\x1b\n\nEntryCount\x12\r\n\x05\x63ount\x18\x01 \x01(\x04\"1\n\tSignature\x12\x11\n\tpublicKey\x18\x01 \x01(\x0c\x12\x11\n\tsignature\x18\x02 \x01(\x0c\"\xaf\x01\n\x08TxHeader\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x0f\n\x07prevAlh\x18\x02 \x01(\x0c\x12\n\n\x02ts\x18\x03 \x01(\x03\x12\x10\n\x08nentries\x18\x04 \x01(\x05\x12\n\n\x02\x65H\x18\x05 \x01(\x0c\x12\x0e\n\x06\x62lTxId\x18\x06 \x01(\x04\x12\x0e\n\x06\x62lRoot\x18\x07 \x01(\x0c\x12\x0f\n\x07version\x18\x08 \x01(\x05\x12+\n\x08metadata\x18\t \x01(\x0b\x32\x19.immudb.schema.TxMetadata\"\x0c\n\nTxMetadata\"D\n\x0bLinearProof\x12\x12\n\nsourceTxId\x18\x01 \x01(\x04\x12\x12\n\nTargetTxId\x18\x02 \x01(\x04\x12\r\n\x05terms\x18\x03 \x03(\x0c\"\x83\x02\n\tDualProof\x12/\n\x0esourceTxHeader\x18\x01 \x01(\x0b\x32\x17.immudb.schema.TxHeader\x12/\n\x0etargetTxHeader\x18\x02 \x01(\x0b\x32\x17.immudb.schema.TxHeader\x12\x16\n\x0einclusionProof\x18\x03 \x03(\x0c\x12\x18\n\x10\x63onsistencyProof\x18\x04 \x03(\x0c\x12\x15\n\rtargetBlTxAlh\x18\x05 \x01(\x0c\x12\x1a\n\x12lastInclusionProof\x18\x06 \x03(\x0c\x12/\n\x0blinearProof\x18\x07 \x01(\x0b\x32\x1a.immudb.schema.LinearProof\"\xa8\x01\n\x02Tx\x12\'\n\x06header\x18\x01 \x01(\x0b\x32\x17.immudb.schema.TxHeader\x12\'\n\x07\x65ntries\x18\x02 \x03(\x0b\x32\x16.immudb.schema.TxEntry\x12\'\n\tkvEntries\x18\x03 \x03(\x0b\x32\x14.immudb.schema.Entry\x12\'\n\x08zEntries\x18\x04 \x03(\x0b\x32\x15.immudb.schema.ZEntry\"p\n\x07TxEntry\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x0e\n\x06hValue\x18\x02 \x01(\x0c\x12\x0c\n\x04vLen\x18\x03 \x01(\x05\x12+\n\x08metadata\x18\x04 \x01(\x0b\x32\x19.immudb.schema.KVMetadata\x12\r\n\x05value\x18\x05 \x01(\x0c\"b\n\nKVMetadata\x12\x0f\n\x07\x64\x65leted\x18\x01 \x01(\x08\x12-\n\nexpiration\x18\x02 \x01(\x0b\x32\x19.immudb.schema.Expiration\x12\x14\n\x0cnonIndexable\x18\x03 \x01(\x08\"\x1f\n\nExpiration\x12\x11\n\texpiresAt\x18\x01 \x01(\x03\"\x87\x01\n\x0cVerifiableTx\x12\x1d\n\x02tx\x18\x01 \x01(\x0b\x32\x11.immudb.schema.Tx\x12+\n\tdualProof\x18\x02 \x01(\x0b\x32\x18.immudb.schema.DualProof\x12+\n\tsignature\x18\x03 \x01(\x0b\x32\x18.immudb.schema.Signature\"\xa0\x01\n\x0fVerifiableEntry\x12#\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x14.immudb.schema.Entry\x12\x31\n\x0cverifiableTx\x18\x02 \x01(\x0b\x32\x1b.immudb.schema.VerifiableTx\x12\x35\n\x0einclusionProof\x18\x03 \x01(\x0b\x32\x1d.immudb.schema.InclusionProof\"<\n\x0eInclusionProof\x12\x0c\n\x04leaf\x18\x01 \x01(\x05\x12\r\n\x05width\x18\x02 \x01(\x05\x12\r\n\x05terms\x18\x03 \x03(\x0c\"v\n\nSetRequest\x12$\n\x03KVs\x18\x01 \x03(\x0b\x32\x17.immudb.schema.KeyValue\x12\x0e\n\x06noWait\x18\x02 \x01(\x08\x12\x32\n\rpreconditions\x18\x03 \x03(\x0b\x32\x1b.immudb.schema.Precondition\"\\\n\nKeyRequest\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x0c\n\x04\x61tTx\x18\x02 \x01(\x04\x12\x0f\n\x07sinceTx\x18\x03 \x01(\x04\x12\x0e\n\x06noWait\x18\x04 \x01(\x08\x12\x12\n\natRevision\x18\x05 \x01(\x03\"/\n\x0eKeyListRequest\x12\x0c\n\x04keys\x18\x01 \x03(\x0c\x12\x0f\n\x07sinceTx\x18\x02 \x01(\x04\"B\n\x11\x44\x65leteKeysRequest\x12\x0c\n\x04keys\x18\x01 \x03(\x0c\x12\x0f\n\x07sinceTx\x18\x02 \x01(\x04\x12\x0e\n\x06noWait\x18\x03 \x01(\x08\"[\n\x14VerifiableSetRequest\x12-\n\nsetRequest\x18\x01 \x01(\x0b\x32\x19.immudb.schema.SetRequest\x12\x14\n\x0cproveSinceTx\x18\x02 \x01(\x04\"[\n\x14VerifiableGetRequest\x12-\n\nkeyRequest\x18\x01 \x01(\x0b\x32\x19.immudb.schema.KeyRequest\x12\x14\n\x0cproveSinceTx\x18\x02 \x01(\x04\"1\n\x0eHealthResponse\x12\x0e\n\x06status\x18\x01 \x01(\x08\x12\x0f\n\x07version\x18\x02 \x01(\t\"Q\n\x16\x44\x61tabaseHealthResponse\x12\x17\n\x0fpendingRequests\x18\x01 \x01(\r\x12\x1e\n\x16lastRequestCompletedAt\x18\x02 \x01(\x03\"g\n\x0eImmutableState\x12\n\n\x02\x64\x62\x18\x01 \x01(\t\x12\x0c\n\x04txId\x18\x02 \x01(\x04\x12\x0e\n\x06txHash\x18\x03 \x01(\x0c\x12+\n\tsignature\x18\x04 \x01(\x0b\x32\x18.immudb.schema.Signature\"\x9a\x01\n\x10ReferenceRequest\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x15\n\rreferencedKey\x18\x02 \x01(\x0c\x12\x0c\n\x04\x61tTx\x18\x03 \x01(\x04\x12\x10\n\x08\x62oundRef\x18\x04 \x01(\x08\x12\x0e\n\x06noWait\x18\x05 \x01(\x08\x12\x32\n\rpreconditions\x18\x06 \x03(\x0b\x32\x1b.immudb.schema.Precondition\"m\n\x1aVerifiableReferenceRequest\x12\x39\n\x10referenceRequest\x18\x01 \x01(\x0b\x32\x1f.immudb.schema.ReferenceRequest\x12\x14\n\x0cproveSinceTx\x18\x02 \x01(\x04\"f\n\x0bZAddRequest\x12\x0b\n\x03set\x18\x01 \x01(\x0c\x12\r\n\x05score\x18\x02 \x01(\x01\x12\x0b\n\x03key\x18\x03 \x01(\x0c\x12\x0c\n\x04\x61tTx\x18\x04 \x01(\x04\x12\x10\n\x08\x62oundRef\x18\x05 \x01(\x08\x12\x0e\n\x06noWait\x18\x06 \x01(\x08\"\x16\n\x05Score\x12\r\n\x05score\x18\x01 \x01(\x01\"\xf6\x01\n\x0cZScanRequest\x12\x0b\n\x03set\x18\x01 \x01(\x0c\x12\x0f\n\x07seekKey\x18\x02 \x01(\x0c\x12\x11\n\tseekScore\x18\x03 \x01(\x01\x12\x10\n\x08seekAtTx\x18\x04 \x01(\x04\x12\x15\n\rinclusiveSeek\x18\x05 \x01(\x08\x12\r\n\x05limit\x18\x06 \x01(\x04\x12\x0c\n\x04\x64\x65sc\x18\x07 \x01(\x08\x12&\n\x08minScore\x18\x08 \x01(\x0b\x32\x14.immudb.schema.Score\x12&\n\x08maxScore\x18\t \x01(\x0b\x32\x14.immudb.schema.Score\x12\x0f\n\x07sinceTx\x18\n \x01(\x04\x12\x0e\n\x06noWait\x18\x0b \x01(\x08\"[\n\x0eHistoryRequest\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x0e\n\x06offset\x18\x02 \x01(\x04\x12\r\n\x05limit\x18\x03 \x01(\x05\x12\x0c\n\x04\x64\x65sc\x18\x04 \x01(\x08\x12\x0f\n\x07sinceTx\x18\x05 \x01(\x04\"^\n\x15VerifiableZAddRequest\x12/\n\x0bzAddRequest\x18\x01 \x01(\x0b\x32\x1a.immudb.schema.ZAddRequest\x12\x14\n\x0cproveSinceTx\x18\x02 \x01(\x04\"i\n\tTxRequest\x12\n\n\x02tx\x18\x01 \x01(\x04\x12/\n\x0b\x65ntriesSpec\x18\x02 \x01(\x0b\x32\x1a.immudb.schema.EntriesSpec\x12\x0f\n\x07sinceTx\x18\x03 \x01(\x04\x12\x0e\n\x06noWait\x18\x04 \x01(\x08\"\xac\x01\n\x0b\x45ntriesSpec\x12\x33\n\rkvEntriesSpec\x18\x01 \x01(\x0b\x32\x1c.immudb.schema.EntryTypeSpec\x12\x32\n\x0czEntriesSpec\x18\x02 \x01(\x0b\x32\x1c.immudb.schema.EntryTypeSpec\x12\x34\n\x0esqlEntriesSpec\x18\x03 \x01(\x0b\x32\x1c.immudb.schema.EntryTypeSpec\"?\n\rEntryTypeSpec\x12.\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x1e.immudb.schema.EntryTypeAction\"\x89\x01\n\x13VerifiableTxRequest\x12\n\n\x02tx\x18\x01 \x01(\x04\x12\x14\n\x0cproveSinceTx\x18\x02 \x01(\x04\x12/\n\x0b\x65ntriesSpec\x18\x03 \x01(\x0b\x32\x1a.immudb.schema.EntriesSpec\x12\x0f\n\x07sinceTx\x18\x04 \x01(\x04\x12\x0e\n\x06noWait\x18\x05 \x01(\x08\"\x91\x01\n\rTxScanRequest\x12\x11\n\tinitialTx\x18\x01 \x01(\x04\x12\r\n\x05limit\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x65sc\x18\x03 \x01(\x08\x12/\n\x0b\x65ntriesSpec\x18\x04 \x01(\x0b\x32\x1a.immudb.schema.EntriesSpec\x12\x0f\n\x07sinceTx\x18\x05 \x01(\x04\x12\x0e\n\x06noWait\x18\x06 \x01(\x08\"(\n\x06TxList\x12\x1e\n\x03txs\x18\x01 \x03(\x0b\x32\x11.immudb.schema.Tx\"\x1d\n\x0f\x45xportTxRequest\x12\n\n\x02tx\x18\x01 \x01(\x04\" \n\x08\x44\x61tabase\x12\x14\n\x0c\x64\x61tabaseName\x18\x01 \x01(\t\"\x9b\x02\n\x10\x44\x61tabaseSettings\x12\x14\n\x0c\x64\x61tabaseName\x18\x01 \x01(\t\x12\x0f\n\x07replica\x18\x02 \x01(\x08\x12\x16\n\x0emasterDatabase\x18\x03 \x01(\t\x12\x15\n\rmasterAddress\x18\x04 \x01(\t\x12\x12\n\nmasterPort\x18\x05 \x01(\r\x12\x18\n\x10\x66ollowerUsername\x18\x06 \x01(\t\x12\x18\n\x10\x66ollowerPassword\x18\x07 \x01(\t\x12\x10\n\x08\x66ileSize\x18\x08 \x01(\r\x12\x11\n\tmaxKeyLen\x18\t \x01(\r\x12\x13\n\x0bmaxValueLen\x18\n \x01(\r\x12\x14\n\x0cmaxTxEntries\x18\x0b \x01(\r\x12\x19\n\x11\x65xcludeCommitTime\x18\x0c \x01(\x08\"`\n\x15\x43reateDatabaseRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x08settings\x18\x02 \x01(\x0b\x32\'.immudb.schema.DatabaseNullableSettings\"a\n\x16\x43reateDatabaseResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x08settings\x18\x02 \x01(\x0b\x32\'.immudb.schema.DatabaseNullableSettings\"d\n\x15UpdateDatabaseRequest\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x39\n\x08settings\x18\x02 \x01(\x0b\x32\'.immudb.schema.DatabaseNullableSettings\"e\n\x16UpdateDatabaseResponse\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x39\n\x08settings\x18\x02 \x01(\x0b\x32\'.immudb.schema.DatabaseNullableSettings\"\x19\n\x17\x44\x61tabaseSettingsRequest\"g\n\x18\x44\x61tabaseSettingsResponse\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x39\n\x08settings\x18\x02 \x01(\x0b\x32\'.immudb.schema.DatabaseNullableSettings\"\x1f\n\x0eNullableUint32\x12\r\n\x05value\x18\x01 \x01(\r\"\x1f\n\x0eNullableUint64\x12\r\n\x05value\x18\x01 \x01(\x04\"\x1e\n\rNullableFloat\x12\r\n\x05value\x18\x01 \x01(\x02\"\x1d\n\x0cNullableBool\x12\r\n\x05value\x18\x01 \x01(\x08\"\x1f\n\x0eNullableString\x12\r\n\x05value\x18\x01 \x01(\t\"\xee\x06\n\x18\x44\x61tabaseNullableSettings\x12G\n\x13replicationSettings\x18\x02 \x01(\x0b\x32*.immudb.schema.ReplicationNullableSettings\x12/\n\x08\x66ileSize\x18\x08 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x30\n\tmaxKeyLen\x18\t \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x32\n\x0bmaxValueLen\x18\n \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x33\n\x0cmaxTxEntries\x18\x0b \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x36\n\x11\x65xcludeCommitTime\x18\x0c \x01(\x0b\x32\x1b.immudb.schema.NullableBool\x12\x35\n\x0emaxConcurrency\x18\r \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x37\n\x10maxIOConcurrency\x18\x0e \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x35\n\x0etxLogCacheSize\x18\x0f \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x39\n\x12vLogMaxOpenedFiles\x18\x10 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12:\n\x13txLogMaxOpenedFiles\x18\x11 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12>\n\x17\x63ommitLogMaxOpenedFiles\x18\x12 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12;\n\rindexSettings\x18\x13 \x01(\x0b\x32$.immudb.schema.IndexNullableSettings\x12;\n\x14writeTxHeaderVersion\x18\x14 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12-\n\x08\x61utoload\x18\x15 \x01(\x0b\x32\x1b.immudb.schema.NullableBool\"\xdd\x02\n\x1bReplicationNullableSettings\x12,\n\x07replica\x18\x01 \x01(\x0b\x32\x1b.immudb.schema.NullableBool\x12\x35\n\x0emasterDatabase\x18\x02 \x01(\x0b\x32\x1d.immudb.schema.NullableString\x12\x34\n\rmasterAddress\x18\x03 \x01(\x0b\x32\x1d.immudb.schema.NullableString\x12\x31\n\nmasterPort\x18\x04 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x37\n\x10\x66ollowerUsername\x18\x05 \x01(\x0b\x32\x1d.immudb.schema.NullableString\x12\x37\n\x10\x66ollowerPassword\x18\x06 \x01(\x0b\x32\x1d.immudb.schema.NullableString\"\x86\x06\n\x15IndexNullableSettings\x12\x35\n\x0e\x66lushThreshold\x18\x01 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x34\n\rsyncThreshold\x18\x02 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x30\n\tcacheSize\x18\x03 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x32\n\x0bmaxNodeSize\x18\x04 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x39\n\x12maxActiveSnapshots\x18\x05 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x39\n\x12renewSnapRootAfter\x18\x06 \x01(\x0b\x32\x1d.immudb.schema.NullableUint64\x12\x35\n\x0e\x63ompactionThld\x18\x07 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12<\n\x15\x64\x65layDuringCompaction\x18\x08 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12=\n\x16nodesLogMaxOpenedFiles\x18\t \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12?\n\x18historyLogMaxOpenedFiles\x18\n \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12>\n\x17\x63ommitLogMaxOpenedFiles\x18\x0b \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x36\n\x0f\x66lushBufferSize\x18\x0c \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x37\n\x11\x63leanupPercentage\x18\r \x01(\x0b\x32\x1c.immudb.schema.NullableFloat\"\'\n\x13LoadDatabaseRequest\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\"(\n\x14LoadDatabaseResponse\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\")\n\x15UnloadDatabaseRequest\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\"*\n\x16UnloadDatabaseResponse\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\")\n\x15\x44\x65leteDatabaseRequest\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\"*\n\x16\x44\x65leteDatabaseResponse\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\">\n\x11\x46lushIndexRequest\x12\x19\n\x11\x63leanupPercentage\x18\x01 \x01(\x02\x12\x0e\n\x06synced\x18\x02 \x01(\x08\"&\n\x12\x46lushIndexResponse\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\"\x1a\n\x05Table\x12\x11\n\ttableName\x18\x01 \x01(\t\"h\n\rSQLGetRequest\x12\r\n\x05table\x18\x01 \x01(\t\x12)\n\x08pkValues\x18\x02 \x03(\x0b\x32\x17.immudb.schema.SQLValue\x12\x0c\n\x04\x61tTx\x18\x03 \x01(\x04\x12\x0f\n\x07sinceTx\x18\x04 \x01(\x04\"d\n\x17VerifiableSQLGetRequest\x12\x33\n\rsqlGetRequest\x18\x01 \x01(\x0b\x32\x1c.immudb.schema.SQLGetRequest\x12\x14\n\x0cproveSinceTx\x18\x02 \x01(\x04\"_\n\x08SQLEntry\x12\n\n\x02tx\x18\x01 \x01(\x04\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\r\n\x05value\x18\x03 \x01(\x0c\x12+\n\x08metadata\x18\x04 \x01(\x0b\x32\x19.immudb.schema.KVMetadata\"\xdd\x05\n\x12VerifiableSQLEntry\x12)\n\x08sqlEntry\x18\x01 \x01(\x0b\x32\x17.immudb.schema.SQLEntry\x12\x31\n\x0cverifiableTx\x18\x02 \x01(\x0b\x32\x1b.immudb.schema.VerifiableTx\x12\x35\n\x0einclusionProof\x18\x03 \x01(\x0b\x32\x1d.immudb.schema.InclusionProof\x12\x12\n\nDatabaseId\x18\x04 \x01(\r\x12\x0f\n\x07TableId\x18\x05 \x01(\r\x12\r\n\x05PKIDs\x18\x10 \x03(\r\x12I\n\x0c\x43olNamesById\x18\x08 \x03(\x0b\x32\x33.immudb.schema.VerifiableSQLEntry.ColNamesByIdEntry\x12I\n\x0c\x43olIdsByName\x18\t \x03(\x0b\x32\x33.immudb.schema.VerifiableSQLEntry.ColIdsByNameEntry\x12I\n\x0c\x43olTypesById\x18\n \x03(\x0b\x32\x33.immudb.schema.VerifiableSQLEntry.ColTypesByIdEntry\x12\x45\n\nColLenById\x18\x0b \x03(\x0b\x32\x31.immudb.schema.VerifiableSQLEntry.ColLenByIdEntry\x1a\x33\n\x11\x43olNamesByIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x33\n\x11\x43olIdsByNameEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\x1a\x33\n\x11\x43olTypesByIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0f\x43olLenByIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01J\x04\x08\x06\x10\x07\"!\n\x10UseDatabaseReply\x12\r\n\x05token\x18\x01 \x01(\t\"\x82\x01\n\x17\x43hangePermissionRequest\x12/\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x1f.immudb.schema.PermissionAction\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x03 \x01(\t\x12\x12\n\npermission\x18\x04 \x01(\r\"8\n\x14SetActiveUserRequest\x12\x0e\n\x06\x61\x63tive\x18\x01 \x01(\x08\x12\x10\n\x08username\x18\x02 \x01(\t\"B\n\x14\x44\x61tabaseListResponse\x12*\n\tdatabases\x18\x01 \x03(\x0b\x32\x17.immudb.schema.Database\"\x17\n\x15\x44\x61tabaseListRequestV2\"P\n\x16\x44\x61tabaseListResponseV2\x12\x36\n\tdatabases\x18\x01 \x03(\x0b\x32#.immudb.schema.DatabaseWithSettings\"o\n\x14\x44\x61tabaseWithSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x08settings\x18\x02 \x01(\x0b\x32\'.immudb.schema.DatabaseNullableSettings\x12\x0e\n\x06loaded\x18\x03 \x01(\x08\"\x18\n\x05\x43hunk\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\"9\n\x12UseSnapshotRequest\x12\x0f\n\x07sinceTx\x18\x01 \x01(\x04\x12\x12\n\nasBeforeTx\x18\x02 \x01(\x04\"X\n\x0eSQLExecRequest\x12\x0b\n\x03sql\x18\x01 \x01(\t\x12)\n\x06params\x18\x02 \x03(\x0b\x32\x19.immudb.schema.NamedParam\x12\x0e\n\x06noWait\x18\x03 \x01(\x08\"`\n\x0fSQLQueryRequest\x12\x0b\n\x03sql\x18\x01 \x01(\t\x12)\n\x06params\x18\x02 \x03(\x0b\x32\x19.immudb.schema.NamedParam\x12\x15\n\rreuseSnapshot\x18\x03 \x01(\x08\"B\n\nNamedParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.immudb.schema.SQLValue\"N\n\rSQLExecResult\x12*\n\x03txs\x18\x05 \x03(\x0b\x32\x1d.immudb.schema.CommittedSQLTx\x12\x11\n\tongoingTx\x18\x06 \x01(\x08\"\x8d\x03\n\x0e\x43ommittedSQLTx\x12\'\n\x06header\x18\x01 \x01(\x0b\x32\x17.immudb.schema.TxHeader\x12\x13\n\x0bupdatedRows\x18\x02 \x01(\r\x12K\n\x0flastInsertedPKs\x18\x03 \x03(\x0b\x32\x32.immudb.schema.CommittedSQLTx.LastInsertedPKsEntry\x12M\n\x10\x66irstInsertedPKs\x18\x04 \x03(\x0b\x32\x33.immudb.schema.CommittedSQLTx.FirstInsertedPKsEntry\x1aO\n\x14LastInsertedPKsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.immudb.schema.SQLValue:\x02\x38\x01\x1aP\n\x15\x46irstInsertedPKsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.immudb.schema.SQLValue:\x02\x38\x01\"Z\n\x0eSQLQueryResult\x12&\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x15.immudb.schema.Column\x12 \n\x04rows\x18\x01 \x03(\x0b\x32\x12.immudb.schema.Row\"$\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\"?\n\x03Row\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\x12\'\n\x06values\x18\x02 \x03(\x0b\x32\x17.immudb.schema.SQLValue\"\x82\x01\n\x08SQLValue\x12*\n\x04null\x18\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x0b\n\x01n\x18\x02 \x01(\x03H\x00\x12\x0b\n\x01s\x18\x03 \x01(\tH\x00\x12\x0b\n\x01\x62\x18\x04 \x01(\x08H\x00\x12\x0c\n\x02\x62s\x18\x05 \x01(\x0cH\x00\x12\x0c\n\x02ts\x18\x06 \x01(\x03H\x00\x42\x07\n\x05value\"3\n\x0cNewTxRequest\x12#\n\x04mode\x18\x01 \x01(\x0e\x32\x15.immudb.schema.TxMode\"&\n\rNewTxResponse\x12\x15\n\rtransactionID\x18\x01 \x01(\t\"(\n\tErrorInfo\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\r\n\x05\x63\x61use\x18\x02 \x01(\t\"\x1a\n\tDebugInfo\x12\r\n\x05stack\x18\x01 \x01(\t\" \n\tRetryInfo\x12\x13\n\x0bretry_delay\x18\x01 \x01(\x05*K\n\x0f\x45ntryTypeAction\x12\x0b\n\x07\x45XCLUDE\x10\x00\x12\x0f\n\x0bONLY_DIGEST\x10\x01\x12\r\n\tRAW_VALUE\x10\x02\x12\x0b\n\x07RESOLVE\x10\x03*)\n\x10PermissionAction\x12\t\n\x05GRANT\x10\x00\x12\n\n\x06REVOKE\x10\x01*4\n\x06TxMode\x12\x0c\n\x08ReadOnly\x10\x00\x12\r\n\tWriteOnly\x10\x01\x12\r\n\tReadWrite\x10\x02\x32\x82(\n\x0bImmuService\x12<\n\tListUsers\x12\x16.google.protobuf.Empty\x1a\x17.immudb.schema.UserList\x12\x46\n\nCreateUser\x12 .immudb.schema.CreateUserRequest\x1a\x16.google.protobuf.Empty\x12N\n\x0e\x43hangePassword\x12$.immudb.schema.ChangePasswordRequest\x1a\x16.google.protobuf.Empty\x12R\n\x10\x43hangePermission\x12&.immudb.schema.ChangePermissionRequest\x1a\x16.google.protobuf.Empty\x12L\n\rSetActiveUser\x12#.immudb.schema.SetActiveUserRequest\x1a\x16.google.protobuf.Empty\x12\x45\n\x10UpdateAuthConfig\x12\x19.immudb.schema.AuthConfig\x1a\x16.google.protobuf.Empty\x12\x45\n\x10UpdateMTLSConfig\x12\x19.immudb.schema.MTLSConfig\x1a\x16.google.protobuf.Empty\x12V\n\x0bOpenSession\x12!.immudb.schema.OpenSessionRequest\x1a\".immudb.schema.OpenSessionResponse\"\x00\x12@\n\x0c\x43loseSession\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00\x12=\n\tKeepAlive\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00\x12\x44\n\x05NewTx\x12\x1b.immudb.schema.NewTxRequest\x1a\x1c.immudb.schema.NewTxResponse\"\x00\x12\x41\n\x06\x43ommit\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.CommittedSQLTx\"\x00\x12<\n\x08Rollback\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00\x12\x44\n\tTxSQLExec\x12\x1d.immudb.schema.SQLExecRequest\x1a\x16.google.protobuf.Empty\"\x00\x12M\n\nTxSQLQuery\x12\x1e.immudb.schema.SQLQueryRequest\x1a\x1d.immudb.schema.SQLQueryResult\"\x00\x12\x42\n\x05Login\x12\x1b.immudb.schema.LoginRequest\x1a\x1c.immudb.schema.LoginResponse\x12\x38\n\x06Logout\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\x12\x39\n\x03Set\x12\x19.immudb.schema.SetRequest\x1a\x17.immudb.schema.TxHeader\x12Q\n\rVerifiableSet\x12#.immudb.schema.VerifiableSetRequest\x1a\x1b.immudb.schema.VerifiableTx\x12\x36\n\x03Get\x12\x19.immudb.schema.KeyRequest\x1a\x14.immudb.schema.Entry\x12T\n\rVerifiableGet\x12#.immudb.schema.VerifiableGetRequest\x1a\x1e.immudb.schema.VerifiableEntry\x12\x43\n\x06\x44\x65lete\x12 .immudb.schema.DeleteKeysRequest\x1a\x17.immudb.schema.TxHeader\x12?\n\x06GetAll\x12\x1d.immudb.schema.KeyListRequest\x1a\x16.immudb.schema.Entries\x12\x41\n\x07\x45xecAll\x12\x1d.immudb.schema.ExecAllRequest\x1a\x17.immudb.schema.TxHeader\x12:\n\x04Scan\x12\x1a.immudb.schema.ScanRequest\x1a\x16.immudb.schema.Entries\x12<\n\x05\x43ount\x12\x18.immudb.schema.KeyPrefix\x1a\x19.immudb.schema.EntryCount\x12=\n\x08\x43ountAll\x12\x16.google.protobuf.Empty\x1a\x19.immudb.schema.EntryCount\x12\x35\n\x06TxById\x12\x18.immudb.schema.TxRequest\x1a\x11.immudb.schema.Tx\x12S\n\x10VerifiableTxById\x12\".immudb.schema.VerifiableTxRequest\x1a\x1b.immudb.schema.VerifiableTx\x12=\n\x06TxScan\x12\x1c.immudb.schema.TxScanRequest\x1a\x15.immudb.schema.TxList\x12@\n\x07History\x12\x1d.immudb.schema.HistoryRequest\x1a\x16.immudb.schema.Entries\x12?\n\x06Health\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.HealthResponse\x12O\n\x0e\x44\x61tabaseHealth\x12\x16.google.protobuf.Empty\x1a%.immudb.schema.DatabaseHealthResponse\x12\x45\n\x0c\x43urrentState\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.ImmutableState\x12H\n\x0cSetReference\x12\x1f.immudb.schema.ReferenceRequest\x1a\x17.immudb.schema.TxHeader\x12`\n\x16VerifiableSetReference\x12).immudb.schema.VerifiableReferenceRequest\x1a\x1b.immudb.schema.VerifiableTx\x12;\n\x04ZAdd\x12\x1a.immudb.schema.ZAddRequest\x1a\x17.immudb.schema.TxHeader\x12S\n\x0eVerifiableZAdd\x12$.immudb.schema.VerifiableZAddRequest\x1a\x1b.immudb.schema.VerifiableTx\x12=\n\x05ZScan\x12\x1b.immudb.schema.ZScanRequest\x1a\x17.immudb.schema.ZEntries\x12\x41\n\x0e\x43reateDatabase\x12\x17.immudb.schema.Database\x1a\x16.google.protobuf.Empty\x12M\n\x12\x43reateDatabaseWith\x12\x1f.immudb.schema.DatabaseSettings\x1a\x16.google.protobuf.Empty\x12_\n\x10\x43reateDatabaseV2\x12$.immudb.schema.CreateDatabaseRequest\x1a%.immudb.schema.CreateDatabaseResponse\x12W\n\x0cLoadDatabase\x12\".immudb.schema.LoadDatabaseRequest\x1a#.immudb.schema.LoadDatabaseResponse\x12]\n\x0eUnloadDatabase\x12$.immudb.schema.UnloadDatabaseRequest\x1a%.immudb.schema.UnloadDatabaseResponse\x12]\n\x0e\x44\x65leteDatabase\x12$.immudb.schema.DeleteDatabaseRequest\x1a%.immudb.schema.DeleteDatabaseResponse\x12K\n\x0c\x44\x61tabaseList\x12\x16.google.protobuf.Empty\x1a#.immudb.schema.DatabaseListResponse\x12]\n\x0e\x44\x61tabaseListV2\x12$.immudb.schema.DatabaseListRequestV2\x1a%.immudb.schema.DatabaseListResponseV2\x12G\n\x0bUseDatabase\x12\x17.immudb.schema.Database\x1a\x1f.immudb.schema.UseDatabaseReply\x12I\n\x0eUpdateDatabase\x12\x1f.immudb.schema.DatabaseSettings\x1a\x16.google.protobuf.Empty\x12_\n\x10UpdateDatabaseV2\x12$.immudb.schema.UpdateDatabaseRequest\x1a%.immudb.schema.UpdateDatabaseResponse\x12N\n\x13GetDatabaseSettings\x12\x16.google.protobuf.Empty\x1a\x1f.immudb.schema.DatabaseSettings\x12h\n\x15GetDatabaseSettingsV2\x12&.immudb.schema.DatabaseSettingsRequest\x1a\'.immudb.schema.DatabaseSettingsResponse\x12Q\n\nFlushIndex\x12 .immudb.schema.FlushIndexRequest\x1a!.immudb.schema.FlushIndexResponse\x12>\n\x0c\x43ompactIndex\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\x12@\n\tstreamGet\x12\x19.immudb.schema.KeyRequest\x1a\x14.immudb.schema.Chunk\"\x00\x30\x01\x12>\n\tstreamSet\x12\x14.immudb.schema.Chunk\x1a\x17.immudb.schema.TxHeader\"\x00(\x01\x12T\n\x13streamVerifiableGet\x12#.immudb.schema.VerifiableGetRequest\x1a\x14.immudb.schema.Chunk\"\x00\x30\x01\x12L\n\x13streamVerifiableSet\x12\x14.immudb.schema.Chunk\x1a\x1b.immudb.schema.VerifiableTx\"\x00(\x01\x12\x42\n\nstreamScan\x12\x1a.immudb.schema.ScanRequest\x1a\x14.immudb.schema.Chunk\"\x00\x30\x01\x12\x44\n\x0bstreamZScan\x12\x1b.immudb.schema.ZScanRequest\x1a\x14.immudb.schema.Chunk\"\x00\x30\x01\x12H\n\rstreamHistory\x12\x1d.immudb.schema.HistoryRequest\x1a\x14.immudb.schema.Chunk\"\x00\x30\x01\x12\x42\n\rstreamExecAll\x12\x14.immudb.schema.Chunk\x1a\x17.immudb.schema.TxHeader\"\x00(\x01\x12\x44\n\x08\x65xportTx\x12\x1e.immudb.schema.ExportTxRequest\x1a\x14.immudb.schema.Chunk\"\x00\x30\x01\x12@\n\x0breplicateTx\x12\x14.immudb.schema.Chunk\x1a\x17.immudb.schema.TxHeader\"\x00(\x01\x12\x46\n\x07SQLExec\x12\x1d.immudb.schema.SQLExecRequest\x1a\x1c.immudb.schema.SQLExecResult\x12I\n\x08SQLQuery\x12\x1e.immudb.schema.SQLQueryRequest\x1a\x1d.immudb.schema.SQLQueryResult\x12\x43\n\nListTables\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.SQLQueryResult\x12\x44\n\rDescribeTable\x12\x14.immudb.schema.Table\x1a\x1d.immudb.schema.SQLQueryResult\x12]\n\x10VerifiableSQLGet\x12&.immudb.schema.VerifiableSQLGetRequest\x1a!.immudb.schema.VerifiableSQLEntryB-Z+github.com/codenotary/immudb/pkg/api/schemab\x06proto3') - , - dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) - -_ENTRYTYPEACTION = _descriptor.EnumDescriptor( - name='EntryTypeAction', - full_name='immudb.schema.EntryTypeAction', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='EXCLUDE', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='ONLY_DIGEST', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='RAW_VALUE', index=2, number=2, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='RESOLVE', index=3, number=3, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=12269, - serialized_end=12344, -) -_sym_db.RegisterEnumDescriptor(_ENTRYTYPEACTION) +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cschema.proto\x12\rimmudb.schema\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1cgoogle/protobuf/struct.proto\"\x12\n\x03Key\x12\x0b\n\x03key\x18\x01 \x01(\x0c\"2\n\nPermission\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x12\n\npermission\x18\x02 \x01(\r\"z\n\x04User\x12\x0c\n\x04user\x18\x01 \x01(\x0c\x12.\n\x0bpermissions\x18\x03 \x03(\x0b\x32\x19.immudb.schema.Permission\x12\x11\n\tcreatedby\x18\x04 \x01(\t\x12\x11\n\tcreatedat\x18\x05 \x01(\t\x12\x0e\n\x06\x61\x63tive\x18\x06 \x01(\x08\".\n\x08UserList\x12\"\n\x05users\x18\x01 \x03(\x0b\x32\x13.immudb.schema.User\"Y\n\x11\x43reateUserRequest\x12\x0c\n\x04user\x18\x01 \x01(\x0c\x12\x10\n\x08password\x18\x02 \x01(\x0c\x12\x12\n\npermission\x18\x03 \x01(\r\x12\x10\n\x08\x64\x61tabase\x18\x04 \x01(\t\"\x1b\n\x0bUserRequest\x12\x0c\n\x04user\x18\x01 \x01(\x0c\"O\n\x15\x43hangePasswordRequest\x12\x0c\n\x04user\x18\x01 \x01(\x0c\x12\x13\n\x0boldPassword\x18\x02 \x01(\x0c\x12\x13\n\x0bnewPassword\x18\x03 \x01(\x0c\".\n\x0cLoginRequest\x12\x0c\n\x04user\x18\x01 \x01(\x0c\x12\x10\n\x08password\x18\x02 \x01(\x0c\"/\n\rLoginResponse\x12\r\n\x05token\x18\x01 \x01(\t\x12\x0f\n\x07warning\x18\x02 \x01(\x0c\"\x1a\n\nAuthConfig\x12\x0c\n\x04kind\x18\x01 \x01(\r\"\x1d\n\nMTLSConfig\x12\x0f\n\x07\x65nabled\x18\x01 \x01(\x08\"N\n\x12OpenSessionRequest\x12\x10\n\x08username\x18\x01 \x01(\x0c\x12\x10\n\x08password\x18\x02 \x01(\x0c\x12\x14\n\x0c\x64\x61tabaseName\x18\x03 \x01(\t\"<\n\x13OpenSessionResponse\x12\x11\n\tsessionID\x18\x01 \x01(\t\x12\x12\n\nserverUUID\x18\x02 \x01(\t\"\xb5\x03\n\x0cPrecondition\x12L\n\x0ckeyMustExist\x18\x01 \x01(\x0b\x32\x34.immudb.schema.Precondition.KeyMustExistPreconditionH\x00\x12R\n\x0fkeyMustNotExist\x18\x02 \x01(\x0b\x32\x37.immudb.schema.Precondition.KeyMustNotExistPreconditionH\x00\x12^\n\x15keyNotModifiedAfterTX\x18\x03 \x01(\x0b\x32=.immudb.schema.Precondition.KeyNotModifiedAfterTXPreconditionH\x00\x1a\'\n\x18KeyMustExistPrecondition\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x1a*\n\x1bKeyMustNotExistPrecondition\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x1a>\n!KeyNotModifiedAfterTXPrecondition\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x0c\n\x04txID\x18\x02 \x01(\x04\x42\x0e\n\x0cprecondition\"S\n\x08KeyValue\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05value\x18\x02 \x01(\x0c\x12+\n\x08metadata\x18\x03 \x01(\x0b\x32\x19.immudb.schema.KVMetadata\"\xaf\x01\n\x05\x45ntry\x12\n\n\x02tx\x18\x01 \x01(\x04\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\r\n\x05value\x18\x03 \x01(\x0c\x12.\n\x0creferencedBy\x18\x04 \x01(\x0b\x32\x18.immudb.schema.Reference\x12+\n\x08metadata\x18\x05 \x01(\x0b\x32\x19.immudb.schema.KVMetadata\x12\x0f\n\x07\x65xpired\x18\x06 \x01(\x08\x12\x10\n\x08revision\x18\x07 \x01(\x04\"q\n\tReference\x12\n\n\x02tx\x18\x01 \x01(\x04\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\x0c\n\x04\x61tTx\x18\x03 \x01(\x04\x12+\n\x08metadata\x18\x04 \x01(\x0b\x32\x19.immudb.schema.KVMetadata\x12\x10\n\x08revision\x18\x05 \x01(\x04\"\x94\x01\n\x02Op\x12%\n\x02kv\x18\x01 \x01(\x0b\x32\x17.immudb.schema.KeyValueH\x00\x12*\n\x04zAdd\x18\x02 \x01(\x0b\x32\x1a.immudb.schema.ZAddRequestH\x00\x12.\n\x03ref\x18\x03 \x01(\x0b\x32\x1f.immudb.schema.ReferenceRequestH\x00\x42\x0b\n\toperation\"{\n\x0e\x45xecAllRequest\x12%\n\nOperations\x18\x01 \x03(\x0b\x32\x11.immudb.schema.Op\x12\x0e\n\x06noWait\x18\x02 \x01(\x08\x12\x32\n\rpreconditions\x18\x03 \x03(\x0b\x32\x1b.immudb.schema.Precondition\"0\n\x07\x45ntries\x12%\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x14.immudb.schema.Entry\"d\n\x06ZEntry\x12\x0b\n\x03set\x18\x01 \x01(\x0c\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12#\n\x05\x65ntry\x18\x03 \x01(\x0b\x32\x14.immudb.schema.Entry\x12\r\n\x05score\x18\x04 \x01(\x01\x12\x0c\n\x04\x61tTx\x18\x05 \x01(\x04\"2\n\x08ZEntries\x12&\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\x15.immudb.schema.ZEntry\"\xb9\x01\n\x0bScanRequest\x12\x0f\n\x07seekKey\x18\x01 \x01(\x0c\x12\x0e\n\x06\x65ndKey\x18\x07 \x01(\x0c\x12\x0e\n\x06prefix\x18\x02 \x01(\x0c\x12\x0c\n\x04\x64\x65sc\x18\x03 \x01(\x08\x12\r\n\x05limit\x18\x04 \x01(\x04\x12\x0f\n\x07sinceTx\x18\x05 \x01(\x04\x12\x0e\n\x06noWait\x18\x06 \x01(\x08\x12\x15\n\rinclusiveSeek\x18\x08 \x01(\x08\x12\x14\n\x0cinclusiveEnd\x18\t \x01(\x08\x12\x0e\n\x06offset\x18\n \x01(\x04\"\x1b\n\tKeyPrefix\x12\x0e\n\x06prefix\x18\x01 \x01(\x0c\"\x1b\n\nEntryCount\x12\r\n\x05\x63ount\x18\x01 \x01(\x04\"1\n\tSignature\x12\x11\n\tpublicKey\x18\x01 \x01(\x0c\x12\x11\n\tsignature\x18\x02 \x01(\x0c\"\xaf\x01\n\x08TxHeader\x12\n\n\x02id\x18\x01 \x01(\x04\x12\x0f\n\x07prevAlh\x18\x02 \x01(\x0c\x12\n\n\x02ts\x18\x03 \x01(\x03\x12\x10\n\x08nentries\x18\x04 \x01(\x05\x12\n\n\x02\x65H\x18\x05 \x01(\x0c\x12\x0e\n\x06\x62lTxId\x18\x06 \x01(\x04\x12\x0e\n\x06\x62lRoot\x18\x07 \x01(\x0c\x12\x0f\n\x07version\x18\x08 \x01(\x05\x12+\n\x08metadata\x18\t \x01(\x0b\x32\x19.immudb.schema.TxMetadata\"\x0c\n\nTxMetadata\"D\n\x0bLinearProof\x12\x12\n\nsourceTxId\x18\x01 \x01(\x04\x12\x12\n\nTargetTxId\x18\x02 \x01(\x04\x12\r\n\x05terms\x18\x03 \x03(\x0c\"\x83\x02\n\tDualProof\x12/\n\x0esourceTxHeader\x18\x01 \x01(\x0b\x32\x17.immudb.schema.TxHeader\x12/\n\x0etargetTxHeader\x18\x02 \x01(\x0b\x32\x17.immudb.schema.TxHeader\x12\x16\n\x0einclusionProof\x18\x03 \x03(\x0c\x12\x18\n\x10\x63onsistencyProof\x18\x04 \x03(\x0c\x12\x15\n\rtargetBlTxAlh\x18\x05 \x01(\x0c\x12\x1a\n\x12lastInclusionProof\x18\x06 \x03(\x0c\x12/\n\x0blinearProof\x18\x07 \x01(\x0b\x32\x1a.immudb.schema.LinearProof\"\xa8\x01\n\x02Tx\x12\'\n\x06header\x18\x01 \x01(\x0b\x32\x17.immudb.schema.TxHeader\x12\'\n\x07\x65ntries\x18\x02 \x03(\x0b\x32\x16.immudb.schema.TxEntry\x12\'\n\tkvEntries\x18\x03 \x03(\x0b\x32\x14.immudb.schema.Entry\x12\'\n\x08zEntries\x18\x04 \x03(\x0b\x32\x15.immudb.schema.ZEntry\"p\n\x07TxEntry\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x0e\n\x06hValue\x18\x02 \x01(\x0c\x12\x0c\n\x04vLen\x18\x03 \x01(\x05\x12+\n\x08metadata\x18\x04 \x01(\x0b\x32\x19.immudb.schema.KVMetadata\x12\r\n\x05value\x18\x05 \x01(\x0c\"b\n\nKVMetadata\x12\x0f\n\x07\x64\x65leted\x18\x01 \x01(\x08\x12-\n\nexpiration\x18\x02 \x01(\x0b\x32\x19.immudb.schema.Expiration\x12\x14\n\x0cnonIndexable\x18\x03 \x01(\x08\"\x1f\n\nExpiration\x12\x11\n\texpiresAt\x18\x01 \x01(\x03\"\x87\x01\n\x0cVerifiableTx\x12\x1d\n\x02tx\x18\x01 \x01(\x0b\x32\x11.immudb.schema.Tx\x12+\n\tdualProof\x18\x02 \x01(\x0b\x32\x18.immudb.schema.DualProof\x12+\n\tsignature\x18\x03 \x01(\x0b\x32\x18.immudb.schema.Signature\"\xa0\x01\n\x0fVerifiableEntry\x12#\n\x05\x65ntry\x18\x01 \x01(\x0b\x32\x14.immudb.schema.Entry\x12\x31\n\x0cverifiableTx\x18\x02 \x01(\x0b\x32\x1b.immudb.schema.VerifiableTx\x12\x35\n\x0einclusionProof\x18\x03 \x01(\x0b\x32\x1d.immudb.schema.InclusionProof\"<\n\x0eInclusionProof\x12\x0c\n\x04leaf\x18\x01 \x01(\x05\x12\r\n\x05width\x18\x02 \x01(\x05\x12\r\n\x05terms\x18\x03 \x03(\x0c\"v\n\nSetRequest\x12$\n\x03KVs\x18\x01 \x03(\x0b\x32\x17.immudb.schema.KeyValue\x12\x0e\n\x06noWait\x18\x02 \x01(\x08\x12\x32\n\rpreconditions\x18\x03 \x03(\x0b\x32\x1b.immudb.schema.Precondition\"\\\n\nKeyRequest\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x0c\n\x04\x61tTx\x18\x02 \x01(\x04\x12\x0f\n\x07sinceTx\x18\x03 \x01(\x04\x12\x0e\n\x06noWait\x18\x04 \x01(\x08\x12\x12\n\natRevision\x18\x05 \x01(\x03\"/\n\x0eKeyListRequest\x12\x0c\n\x04keys\x18\x01 \x03(\x0c\x12\x0f\n\x07sinceTx\x18\x02 \x01(\x04\"B\n\x11\x44\x65leteKeysRequest\x12\x0c\n\x04keys\x18\x01 \x03(\x0c\x12\x0f\n\x07sinceTx\x18\x02 \x01(\x04\x12\x0e\n\x06noWait\x18\x03 \x01(\x08\"[\n\x14VerifiableSetRequest\x12-\n\nsetRequest\x18\x01 \x01(\x0b\x32\x19.immudb.schema.SetRequest\x12\x14\n\x0cproveSinceTx\x18\x02 \x01(\x04\"[\n\x14VerifiableGetRequest\x12-\n\nkeyRequest\x18\x01 \x01(\x0b\x32\x19.immudb.schema.KeyRequest\x12\x14\n\x0cproveSinceTx\x18\x02 \x01(\x04\"\x13\n\x11ServerInfoRequest\"%\n\x12ServerInfoResponse\x12\x0f\n\x07version\x18\x01 \x01(\t\"1\n\x0eHealthResponse\x12\x0e\n\x06status\x18\x01 \x01(\x08\x12\x0f\n\x07version\x18\x02 \x01(\t\"Q\n\x16\x44\x61tabaseHealthResponse\x12\x17\n\x0fpendingRequests\x18\x01 \x01(\r\x12\x1e\n\x16lastRequestCompletedAt\x18\x02 \x01(\x03\"g\n\x0eImmutableState\x12\n\n\x02\x64\x62\x18\x01 \x01(\t\x12\x0c\n\x04txId\x18\x02 \x01(\x04\x12\x0e\n\x06txHash\x18\x03 \x01(\x0c\x12+\n\tsignature\x18\x04 \x01(\x0b\x32\x18.immudb.schema.Signature\"\x9a\x01\n\x10ReferenceRequest\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x15\n\rreferencedKey\x18\x02 \x01(\x0c\x12\x0c\n\x04\x61tTx\x18\x03 \x01(\x04\x12\x10\n\x08\x62oundRef\x18\x04 \x01(\x08\x12\x0e\n\x06noWait\x18\x05 \x01(\x08\x12\x32\n\rpreconditions\x18\x06 \x03(\x0b\x32\x1b.immudb.schema.Precondition\"m\n\x1aVerifiableReferenceRequest\x12\x39\n\x10referenceRequest\x18\x01 \x01(\x0b\x32\x1f.immudb.schema.ReferenceRequest\x12\x14\n\x0cproveSinceTx\x18\x02 \x01(\x04\"f\n\x0bZAddRequest\x12\x0b\n\x03set\x18\x01 \x01(\x0c\x12\r\n\x05score\x18\x02 \x01(\x01\x12\x0b\n\x03key\x18\x03 \x01(\x0c\x12\x0c\n\x04\x61tTx\x18\x04 \x01(\x04\x12\x10\n\x08\x62oundRef\x18\x05 \x01(\x08\x12\x0e\n\x06noWait\x18\x06 \x01(\x08\"\x16\n\x05Score\x12\r\n\x05score\x18\x01 \x01(\x01\"\x86\x02\n\x0cZScanRequest\x12\x0b\n\x03set\x18\x01 \x01(\x0c\x12\x0f\n\x07seekKey\x18\x02 \x01(\x0c\x12\x11\n\tseekScore\x18\x03 \x01(\x01\x12\x10\n\x08seekAtTx\x18\x04 \x01(\x04\x12\x15\n\rinclusiveSeek\x18\x05 \x01(\x08\x12\r\n\x05limit\x18\x06 \x01(\x04\x12\x0c\n\x04\x64\x65sc\x18\x07 \x01(\x08\x12&\n\x08minScore\x18\x08 \x01(\x0b\x32\x14.immudb.schema.Score\x12&\n\x08maxScore\x18\t \x01(\x0b\x32\x14.immudb.schema.Score\x12\x0f\n\x07sinceTx\x18\n \x01(\x04\x12\x0e\n\x06noWait\x18\x0b \x01(\x08\x12\x0e\n\x06offset\x18\x0c \x01(\x04\"[\n\x0eHistoryRequest\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\x0e\n\x06offset\x18\x02 \x01(\x04\x12\r\n\x05limit\x18\x03 \x01(\x05\x12\x0c\n\x04\x64\x65sc\x18\x04 \x01(\x08\x12\x0f\n\x07sinceTx\x18\x05 \x01(\x04\"^\n\x15VerifiableZAddRequest\x12/\n\x0bzAddRequest\x18\x01 \x01(\x0b\x32\x1a.immudb.schema.ZAddRequest\x12\x14\n\x0cproveSinceTx\x18\x02 \x01(\x04\"\x8b\x01\n\tTxRequest\x12\n\n\x02tx\x18\x01 \x01(\x04\x12/\n\x0b\x65ntriesSpec\x18\x02 \x01(\x0b\x32\x1a.immudb.schema.EntriesSpec\x12\x0f\n\x07sinceTx\x18\x03 \x01(\x04\x12\x0e\n\x06noWait\x18\x04 \x01(\x08\x12 \n\x18keepReferencesUnresolved\x18\x05 \x01(\x08\"\xac\x01\n\x0b\x45ntriesSpec\x12\x33\n\rkvEntriesSpec\x18\x01 \x01(\x0b\x32\x1c.immudb.schema.EntryTypeSpec\x12\x32\n\x0czEntriesSpec\x18\x02 \x01(\x0b\x32\x1c.immudb.schema.EntryTypeSpec\x12\x34\n\x0esqlEntriesSpec\x18\x03 \x01(\x0b\x32\x1c.immudb.schema.EntryTypeSpec\"?\n\rEntryTypeSpec\x12.\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x1e.immudb.schema.EntryTypeAction\"\xab\x01\n\x13VerifiableTxRequest\x12\n\n\x02tx\x18\x01 \x01(\x04\x12\x14\n\x0cproveSinceTx\x18\x02 \x01(\x04\x12/\n\x0b\x65ntriesSpec\x18\x03 \x01(\x0b\x32\x1a.immudb.schema.EntriesSpec\x12\x0f\n\x07sinceTx\x18\x04 \x01(\x04\x12\x0e\n\x06noWait\x18\x05 \x01(\x08\x12 \n\x18keepReferencesUnresolved\x18\x06 \x01(\x08\"\x91\x01\n\rTxScanRequest\x12\x11\n\tinitialTx\x18\x01 \x01(\x04\x12\r\n\x05limit\x18\x02 \x01(\r\x12\x0c\n\x04\x64\x65sc\x18\x03 \x01(\x08\x12/\n\x0b\x65ntriesSpec\x18\x04 \x01(\x0b\x32\x1a.immudb.schema.EntriesSpec\x12\x0f\n\x07sinceTx\x18\x05 \x01(\x04\x12\x0e\n\x06noWait\x18\x06 \x01(\x08\"(\n\x06TxList\x12\x1e\n\x03txs\x18\x01 \x03(\x0b\x32\x11.immudb.schema.Tx\"\x1d\n\x0f\x45xportTxRequest\x12\n\n\x02tx\x18\x01 \x01(\x04\" \n\x08\x44\x61tabase\x12\x14\n\x0c\x64\x61tabaseName\x18\x01 \x01(\t\"\x9b\x02\n\x10\x44\x61tabaseSettings\x12\x14\n\x0c\x64\x61tabaseName\x18\x01 \x01(\t\x12\x0f\n\x07replica\x18\x02 \x01(\x08\x12\x16\n\x0emasterDatabase\x18\x03 \x01(\t\x12\x15\n\rmasterAddress\x18\x04 \x01(\t\x12\x12\n\nmasterPort\x18\x05 \x01(\r\x12\x18\n\x10\x66ollowerUsername\x18\x06 \x01(\t\x12\x18\n\x10\x66ollowerPassword\x18\x07 \x01(\t\x12\x10\n\x08\x66ileSize\x18\x08 \x01(\r\x12\x11\n\tmaxKeyLen\x18\t \x01(\r\x12\x13\n\x0bmaxValueLen\x18\n \x01(\r\x12\x14\n\x0cmaxTxEntries\x18\x0b \x01(\r\x12\x19\n\x11\x65xcludeCommitTime\x18\x0c \x01(\x08\"u\n\x15\x43reateDatabaseRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x08settings\x18\x02 \x01(\x0b\x32\'.immudb.schema.DatabaseNullableSettings\x12\x13\n\x0bifNotExists\x18\x03 \x01(\x08\"y\n\x16\x43reateDatabaseResponse\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x08settings\x18\x02 \x01(\x0b\x32\'.immudb.schema.DatabaseNullableSettings\x12\x16\n\x0e\x61lreadyExisted\x18\x03 \x01(\x08\"d\n\x15UpdateDatabaseRequest\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x39\n\x08settings\x18\x02 \x01(\x0b\x32\'.immudb.schema.DatabaseNullableSettings\"e\n\x16UpdateDatabaseResponse\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x39\n\x08settings\x18\x02 \x01(\x0b\x32\'.immudb.schema.DatabaseNullableSettings\"\x19\n\x17\x44\x61tabaseSettingsRequest\"g\n\x18\x44\x61tabaseSettingsResponse\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\x12\x39\n\x08settings\x18\x02 \x01(\x0b\x32\'.immudb.schema.DatabaseNullableSettings\"\x1f\n\x0eNullableUint32\x12\r\n\x05value\x18\x01 \x01(\r\"\x1f\n\x0eNullableUint64\x12\r\n\x05value\x18\x01 \x01(\x04\"\x1e\n\rNullableFloat\x12\r\n\x05value\x18\x01 \x01(\x02\"\x1d\n\x0cNullableBool\x12\r\n\x05value\x18\x01 \x01(\x08\"\x1f\n\x0eNullableString\x12\r\n\x05value\x18\x01 \x01(\t\"%\n\x14NullableMilliseconds\x12\r\n\x05value\x18\x01 \x01(\x03\"\xd2\x08\n\x18\x44\x61tabaseNullableSettings\x12G\n\x13replicationSettings\x18\x02 \x01(\x0b\x32*.immudb.schema.ReplicationNullableSettings\x12/\n\x08\x66ileSize\x18\x08 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x30\n\tmaxKeyLen\x18\t \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x32\n\x0bmaxValueLen\x18\n \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x33\n\x0cmaxTxEntries\x18\x0b \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x36\n\x11\x65xcludeCommitTime\x18\x0c \x01(\x0b\x32\x1b.immudb.schema.NullableBool\x12\x35\n\x0emaxConcurrency\x18\r \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x37\n\x10maxIOConcurrency\x18\x0e \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x35\n\x0etxLogCacheSize\x18\x0f \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x39\n\x12vLogMaxOpenedFiles\x18\x10 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12:\n\x13txLogMaxOpenedFiles\x18\x11 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12>\n\x17\x63ommitLogMaxOpenedFiles\x18\x12 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12;\n\rindexSettings\x18\x13 \x01(\x0b\x32$.immudb.schema.IndexNullableSettings\x12;\n\x14writeTxHeaderVersion\x18\x14 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12-\n\x08\x61utoload\x18\x15 \x01(\x0b\x32\x1b.immudb.schema.NullableBool\x12\x35\n\x0ereadTxPoolSize\x18\x16 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12:\n\rsyncFrequency\x18\x17 \x01(\x0b\x32#.immudb.schema.NullableMilliseconds\x12\x36\n\x0fwriteBufferSize\x18\x18 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x37\n\x0b\x61htSettings\x18\x19 \x01(\x0b\x32\".immudb.schema.AHTNullableSettings\"\xdd\x02\n\x1bReplicationNullableSettings\x12,\n\x07replica\x18\x01 \x01(\x0b\x32\x1b.immudb.schema.NullableBool\x12\x35\n\x0emasterDatabase\x18\x02 \x01(\x0b\x32\x1d.immudb.schema.NullableString\x12\x34\n\rmasterAddress\x18\x03 \x01(\x0b\x32\x1d.immudb.schema.NullableString\x12\x31\n\nmasterPort\x18\x04 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x37\n\x10\x66ollowerUsername\x18\x05 \x01(\x0b\x32\x1d.immudb.schema.NullableString\x12\x37\n\x10\x66ollowerPassword\x18\x06 \x01(\x0b\x32\x1d.immudb.schema.NullableString\"\x86\x06\n\x15IndexNullableSettings\x12\x35\n\x0e\x66lushThreshold\x18\x01 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x34\n\rsyncThreshold\x18\x02 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x30\n\tcacheSize\x18\x03 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x32\n\x0bmaxNodeSize\x18\x04 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x39\n\x12maxActiveSnapshots\x18\x05 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x39\n\x12renewSnapRootAfter\x18\x06 \x01(\x0b\x32\x1d.immudb.schema.NullableUint64\x12\x35\n\x0e\x63ompactionThld\x18\x07 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12<\n\x15\x64\x65layDuringCompaction\x18\x08 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12=\n\x16nodesLogMaxOpenedFiles\x18\t \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12?\n\x18historyLogMaxOpenedFiles\x18\n \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12>\n\x17\x63ommitLogMaxOpenedFiles\x18\x0b \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x36\n\x0f\x66lushBufferSize\x18\x0c \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x37\n\x11\x63leanupPercentage\x18\r \x01(\x0b\x32\x1c.immudb.schema.NullableFloat\"\x83\x01\n\x13\x41HTNullableSettings\x12\x34\n\rsyncThreshold\x18\x01 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\x12\x36\n\x0fwriteBufferSize\x18\x02 \x01(\x0b\x32\x1d.immudb.schema.NullableUint32\"\'\n\x13LoadDatabaseRequest\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\"(\n\x14LoadDatabaseResponse\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\")\n\x15UnloadDatabaseRequest\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\"*\n\x16UnloadDatabaseResponse\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\")\n\x15\x44\x65leteDatabaseRequest\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\"*\n\x16\x44\x65leteDatabaseResponse\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\">\n\x11\x46lushIndexRequest\x12\x19\n\x11\x63leanupPercentage\x18\x01 \x01(\x02\x12\x0e\n\x06synced\x18\x02 \x01(\x08\"&\n\x12\x46lushIndexResponse\x12\x10\n\x08\x64\x61tabase\x18\x01 \x01(\t\"\x1a\n\x05Table\x12\x11\n\ttableName\x18\x01 \x01(\t\"h\n\rSQLGetRequest\x12\r\n\x05table\x18\x01 \x01(\t\x12)\n\x08pkValues\x18\x02 \x03(\x0b\x32\x17.immudb.schema.SQLValue\x12\x0c\n\x04\x61tTx\x18\x03 \x01(\x04\x12\x0f\n\x07sinceTx\x18\x04 \x01(\x04\"d\n\x17VerifiableSQLGetRequest\x12\x33\n\rsqlGetRequest\x18\x01 \x01(\x0b\x32\x1c.immudb.schema.SQLGetRequest\x12\x14\n\x0cproveSinceTx\x18\x02 \x01(\x04\"_\n\x08SQLEntry\x12\n\n\x02tx\x18\x01 \x01(\x04\x12\x0b\n\x03key\x18\x02 \x01(\x0c\x12\r\n\x05value\x18\x03 \x01(\x0c\x12+\n\x08metadata\x18\x04 \x01(\x0b\x32\x19.immudb.schema.KVMetadata\"\xdd\x05\n\x12VerifiableSQLEntry\x12)\n\x08sqlEntry\x18\x01 \x01(\x0b\x32\x17.immudb.schema.SQLEntry\x12\x31\n\x0cverifiableTx\x18\x02 \x01(\x0b\x32\x1b.immudb.schema.VerifiableTx\x12\x35\n\x0einclusionProof\x18\x03 \x01(\x0b\x32\x1d.immudb.schema.InclusionProof\x12\x12\n\nDatabaseId\x18\x04 \x01(\r\x12\x0f\n\x07TableId\x18\x05 \x01(\r\x12\r\n\x05PKIDs\x18\x10 \x03(\r\x12I\n\x0c\x43olNamesById\x18\x08 \x03(\x0b\x32\x33.immudb.schema.VerifiableSQLEntry.ColNamesByIdEntry\x12I\n\x0c\x43olIdsByName\x18\t \x03(\x0b\x32\x33.immudb.schema.VerifiableSQLEntry.ColIdsByNameEntry\x12I\n\x0c\x43olTypesById\x18\n \x03(\x0b\x32\x33.immudb.schema.VerifiableSQLEntry.ColTypesByIdEntry\x12\x45\n\nColLenById\x18\x0b \x03(\x0b\x32\x31.immudb.schema.VerifiableSQLEntry.ColLenByIdEntry\x1a\x33\n\x11\x43olNamesByIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x33\n\x11\x43olIdsByNameEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\r:\x02\x38\x01\x1a\x33\n\x11\x43olTypesByIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x31\n\x0f\x43olLenByIdEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01J\x04\x08\x06\x10\x07\"!\n\x10UseDatabaseReply\x12\r\n\x05token\x18\x01 \x01(\t\"\x82\x01\n\x17\x43hangePermissionRequest\x12/\n\x06\x61\x63tion\x18\x01 \x01(\x0e\x32\x1f.immudb.schema.PermissionAction\x12\x10\n\x08username\x18\x02 \x01(\t\x12\x10\n\x08\x64\x61tabase\x18\x03 \x01(\t\x12\x12\n\npermission\x18\x04 \x01(\r\"8\n\x14SetActiveUserRequest\x12\x0e\n\x06\x61\x63tive\x18\x01 \x01(\x08\x12\x10\n\x08username\x18\x02 \x01(\t\"B\n\x14\x44\x61tabaseListResponse\x12*\n\tdatabases\x18\x01 \x03(\x0b\x32\x17.immudb.schema.Database\"\x17\n\x15\x44\x61tabaseListRequestV2\"P\n\x16\x44\x61tabaseListResponseV2\x12\x36\n\tdatabases\x18\x01 \x03(\x0b\x32#.immudb.schema.DatabaseWithSettings\"o\n\x14\x44\x61tabaseWithSettings\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x08settings\x18\x02 \x01(\x0b\x32\'.immudb.schema.DatabaseNullableSettings\x12\x0e\n\x06loaded\x18\x03 \x01(\x08\"\x18\n\x05\x43hunk\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\"9\n\x12UseSnapshotRequest\x12\x0f\n\x07sinceTx\x18\x01 \x01(\x04\x12\x12\n\nasBeforeTx\x18\x02 \x01(\x04\"X\n\x0eSQLExecRequest\x12\x0b\n\x03sql\x18\x01 \x01(\t\x12)\n\x06params\x18\x02 \x03(\x0b\x32\x19.immudb.schema.NamedParam\x12\x0e\n\x06noWait\x18\x03 \x01(\x08\"`\n\x0fSQLQueryRequest\x12\x0b\n\x03sql\x18\x01 \x01(\t\x12)\n\x06params\x18\x02 \x03(\x0b\x32\x19.immudb.schema.NamedParam\x12\x15\n\rreuseSnapshot\x18\x03 \x01(\x08\"B\n\nNamedParam\x12\x0c\n\x04name\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.immudb.schema.SQLValue\"N\n\rSQLExecResult\x12*\n\x03txs\x18\x05 \x03(\x0b\x32\x1d.immudb.schema.CommittedSQLTx\x12\x11\n\tongoingTx\x18\x06 \x01(\x08\"\x8d\x03\n\x0e\x43ommittedSQLTx\x12\'\n\x06header\x18\x01 \x01(\x0b\x32\x17.immudb.schema.TxHeader\x12\x13\n\x0bupdatedRows\x18\x02 \x01(\r\x12K\n\x0flastInsertedPKs\x18\x03 \x03(\x0b\x32\x32.immudb.schema.CommittedSQLTx.LastInsertedPKsEntry\x12M\n\x10\x66irstInsertedPKs\x18\x04 \x03(\x0b\x32\x33.immudb.schema.CommittedSQLTx.FirstInsertedPKsEntry\x1aO\n\x14LastInsertedPKsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.immudb.schema.SQLValue:\x02\x38\x01\x1aP\n\x15\x46irstInsertedPKsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12&\n\x05value\x18\x02 \x01(\x0b\x32\x17.immudb.schema.SQLValue:\x02\x38\x01\"Z\n\x0eSQLQueryResult\x12&\n\x07\x63olumns\x18\x02 \x03(\x0b\x32\x15.immudb.schema.Column\x12 \n\x04rows\x18\x01 \x03(\x0b\x32\x12.immudb.schema.Row\"$\n\x06\x43olumn\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\"?\n\x03Row\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\x12\'\n\x06values\x18\x02 \x03(\x0b\x32\x17.immudb.schema.SQLValue\"\x82\x01\n\x08SQLValue\x12*\n\x04null\x18\x01 \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x0b\n\x01n\x18\x02 \x01(\x03H\x00\x12\x0b\n\x01s\x18\x03 \x01(\tH\x00\x12\x0b\n\x01\x62\x18\x04 \x01(\x08H\x00\x12\x0c\n\x02\x62s\x18\x05 \x01(\x0cH\x00\x12\x0c\n\x02ts\x18\x06 \x01(\x03H\x00\x42\x07\n\x05value\"3\n\x0cNewTxRequest\x12#\n\x04mode\x18\x01 \x01(\x0e\x32\x15.immudb.schema.TxMode\"&\n\rNewTxResponse\x12\x15\n\rtransactionID\x18\x01 \x01(\t\"(\n\tErrorInfo\x12\x0c\n\x04\x63ode\x18\x01 \x01(\t\x12\r\n\x05\x63\x61use\x18\x02 \x01(\t\"\x1a\n\tDebugInfo\x12\r\n\x05stack\x18\x01 \x01(\t\" \n\tRetryInfo\x12\x13\n\x0bretry_delay\x18\x01 \x01(\x05*K\n\x0f\x45ntryTypeAction\x12\x0b\n\x07\x45XCLUDE\x10\x00\x12\x0f\n\x0bONLY_DIGEST\x10\x01\x12\r\n\tRAW_VALUE\x10\x02\x12\x0b\n\x07RESOLVE\x10\x03*)\n\x10PermissionAction\x12\t\n\x05GRANT\x10\x00\x12\n\n\x06REVOKE\x10\x01*4\n\x06TxMode\x12\x0c\n\x08ReadOnly\x10\x00\x12\r\n\tWriteOnly\x10\x01\x12\r\n\tReadWrite\x10\x02\x32\xd1\x32\n\x0bImmuService\x12P\n\tListUsers\x12\x16.google.protobuf.Empty\x1a\x17.immudb.schema.UserList\"\x12\x82\xd3\xe4\x93\x02\x0c\x12\n/user/list\x12X\n\nCreateUser\x12 .immudb.schema.CreateUserRequest\x1a\x16.google.protobuf.Empty\"\x10\x82\xd3\xe4\x93\x02\n\"\x05/user:\x01*\x12p\n\x0e\x43hangePassword\x12$.immudb.schema.ChangePasswordRequest\x1a\x16.google.protobuf.Empty\" \x82\xd3\xe4\x93\x02\x1a\"\x15/user/password/change:\x01*\x12u\n\x10\x43hangePermission\x12&.immudb.schema.ChangePermissionRequest\x1a\x16.google.protobuf.Empty\"!\x82\xd3\xe4\x93\x02\x1b\"\x16/user/changepermission:\x01*\x12l\n\rSetActiveUser\x12#.immudb.schema.SetActiveUserRequest\x1a\x16.google.protobuf.Empty\"\x1e\x82\xd3\xe4\x93\x02\x18\"\x13/user/setactiveUser:\x01*\x12J\n\x10UpdateAuthConfig\x12\x19.immudb.schema.AuthConfig\x1a\x16.google.protobuf.Empty\"\x03\x88\x02\x01\x12J\n\x10UpdateMTLSConfig\x12\x19.immudb.schema.MTLSConfig\x1a\x16.google.protobuf.Empty\"\x03\x88\x02\x01\x12V\n\x0bOpenSession\x12!.immudb.schema.OpenSessionRequest\x1a\".immudb.schema.OpenSessionResponse\"\x00\x12@\n\x0c\x43loseSession\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00\x12=\n\tKeepAlive\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00\x12\x44\n\x05NewTx\x12\x1b.immudb.schema.NewTxRequest\x1a\x1c.immudb.schema.NewTxResponse\"\x00\x12\x41\n\x06\x43ommit\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.CommittedSQLTx\"\x00\x12<\n\x08Rollback\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x00\x12\x44\n\tTxSQLExec\x12\x1d.immudb.schema.SQLExecRequest\x1a\x16.google.protobuf.Empty\"\x00\x12M\n\nTxSQLQuery\x12\x1e.immudb.schema.SQLQueryRequest\x1a\x1d.immudb.schema.SQLQueryResult\"\x00\x12X\n\x05Login\x12\x1b.immudb.schema.LoginRequest\x1a\x1c.immudb.schema.LoginResponse\"\x14\x88\x02\x01\x82\xd3\xe4\x93\x02\x0b\"\x06/login:\x01*\x12O\n\x06Logout\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x15\x88\x02\x01\x82\xd3\xe4\x93\x02\x0c\"\x07/logout:\x01*\x12M\n\x03Set\x12\x19.immudb.schema.SetRequest\x1a\x17.immudb.schema.TxHeader\"\x12\x82\xd3\xe4\x93\x02\x0c\"\x07/db/set:\x01*\x12p\n\rVerifiableSet\x12#.immudb.schema.VerifiableSetRequest\x1a\x1b.immudb.schema.VerifiableTx\"\x1d\x82\xd3\xe4\x93\x02\x17\"\x12/db/verifiable/set:\x01*\x12M\n\x03Get\x12\x19.immudb.schema.KeyRequest\x1a\x14.immudb.schema.Entry\"\x15\x82\xd3\xe4\x93\x02\x0f\x12\r/db/get/{key}\x12s\n\rVerifiableGet\x12#.immudb.schema.VerifiableGetRequest\x1a\x1e.immudb.schema.VerifiableEntry\"\x1d\x82\xd3\xe4\x93\x02\x17\"\x12/db/verifiable/get:\x01*\x12Z\n\x06\x44\x65lete\x12 .immudb.schema.DeleteKeysRequest\x1a\x17.immudb.schema.TxHeader\"\x15\x82\xd3\xe4\x93\x02\x0f\"\n/db/delete:\x01*\x12V\n\x06GetAll\x12\x1d.immudb.schema.KeyListRequest\x1a\x16.immudb.schema.Entries\"\x15\x82\xd3\xe4\x93\x02\x0f\"\n/db/getall:\x01*\x12Y\n\x07\x45xecAll\x12\x1d.immudb.schema.ExecAllRequest\x1a\x17.immudb.schema.TxHeader\"\x16\x82\xd3\xe4\x93\x02\x10\"\x0b/db/execall:\x01*\x12O\n\x04Scan\x12\x1a.immudb.schema.ScanRequest\x1a\x16.immudb.schema.Entries\"\x13\x82\xd3\xe4\x93\x02\r\"\x08/db/scan:\x01*\x12X\n\x05\x43ount\x12\x18.immudb.schema.KeyPrefix\x1a\x19.immudb.schema.EntryCount\"\x1a\x82\xd3\xe4\x93\x02\x14\x12\x12/db/count/{prefix}\x12S\n\x08\x43ountAll\x12\x16.google.protobuf.Empty\x1a\x19.immudb.schema.EntryCount\"\x14\x82\xd3\xe4\x93\x02\x0e\x12\x0c/db/countall\x12J\n\x06TxById\x12\x18.immudb.schema.TxRequest\x1a\x11.immudb.schema.Tx\"\x13\x82\xd3\xe4\x93\x02\r\x12\x0b/db/tx/{tx}\x12s\n\x10VerifiableTxById\x12\".immudb.schema.VerifiableTxRequest\x1a\x1b.immudb.schema.VerifiableTx\"\x1e\x82\xd3\xe4\x93\x02\x18\x12\x16/db/verifiable/tx/{tx}\x12P\n\x06TxScan\x12\x1c.immudb.schema.TxScanRequest\x1a\x15.immudb.schema.TxList\"\x11\x82\xd3\xe4\x93\x02\x0b\"\x06/db/tx:\x01*\x12X\n\x07History\x12\x1d.immudb.schema.HistoryRequest\x1a\x16.immudb.schema.Entries\"\x16\x82\xd3\xe4\x93\x02\x10\"\x0b/db/history:\x01*\x12\x66\n\nServerInfo\x12 .immudb.schema.ServerInfoRequest\x1a!.immudb.schema.ServerInfoResponse\"\x13\x82\xd3\xe4\x93\x02\r\x12\x0b/serverinfo\x12P\n\x06Health\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.HealthResponse\"\x0f\x82\xd3\xe4\x93\x02\t\x12\x07/health\x12\x63\n\x0e\x44\x61tabaseHealth\x12\x16.google.protobuf.Empty\x1a%.immudb.schema.DatabaseHealthResponse\"\x12\x82\xd3\xe4\x93\x02\x0c\x12\n/db/health\x12X\n\x0c\x43urrentState\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.ImmutableState\"\x11\x82\xd3\xe4\x93\x02\x0b\x12\t/db/state\x12\x65\n\x0cSetReference\x12\x1f.immudb.schema.ReferenceRequest\x1a\x17.immudb.schema.TxHeader\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/db/setreference:\x01*\x12\x88\x01\n\x16VerifiableSetReference\x12).immudb.schema.VerifiableReferenceRequest\x1a\x1b.immudb.schema.VerifiableTx\"&\x82\xd3\xe4\x93\x02 \"\x1b/db/verifiable/setreference:\x01*\x12P\n\x04ZAdd\x12\x1a.immudb.schema.ZAddRequest\x1a\x17.immudb.schema.TxHeader\"\x13\x82\xd3\xe4\x93\x02\r\"\x08/db/zadd:\x01*\x12s\n\x0eVerifiableZAdd\x12$.immudb.schema.VerifiableZAddRequest\x1a\x1b.immudb.schema.VerifiableTx\"\x1e\x82\xd3\xe4\x93\x02\x18\"\x13/db/verifiable/zadd:\x01*\x12S\n\x05ZScan\x12\x1b.immudb.schema.ZScanRequest\x1a\x17.immudb.schema.ZEntries\"\x14\x82\xd3\xe4\x93\x02\x0e\"\t/db/zscan:\x01*\x12[\n\x0e\x43reateDatabase\x12\x17.immudb.schema.Database\x1a\x16.google.protobuf.Empty\"\x18\x88\x02\x01\x82\xd3\xe4\x93\x02\x0f\"\n/db/create:\x01*\x12k\n\x12\x43reateDatabaseWith\x12\x1f.immudb.schema.DatabaseSettings\x1a\x16.google.protobuf.Empty\"\x1c\x88\x02\x01\x82\xd3\xe4\x93\x02\x13\"\x0e/db/createwith:\x01*\x12y\n\x10\x43reateDatabaseV2\x12$.immudb.schema.CreateDatabaseRequest\x1a%.immudb.schema.CreateDatabaseResponse\"\x18\x82\xd3\xe4\x93\x02\x12\"\r/db/create/v2:\x01*\x12l\n\x0cLoadDatabase\x12\".immudb.schema.LoadDatabaseRequest\x1a#.immudb.schema.LoadDatabaseResponse\"\x13\x82\xd3\xe4\x93\x02\r\"\x08/db/load:\x01*\x12t\n\x0eUnloadDatabase\x12$.immudb.schema.UnloadDatabaseRequest\x1a%.immudb.schema.UnloadDatabaseResponse\"\x15\x82\xd3\xe4\x93\x02\x0f\"\n/db/unload:\x01*\x12t\n\x0e\x44\x65leteDatabase\x12$.immudb.schema.DeleteDatabaseRequest\x1a%.immudb.schema.DeleteDatabaseResponse\"\x15\x82\xd3\xe4\x93\x02\x0f\"\n/db/delete:\x01*\x12\x63\n\x0c\x44\x61tabaseList\x12\x16.google.protobuf.Empty\x1a#.immudb.schema.DatabaseListResponse\"\x16\x88\x02\x01\x82\xd3\xe4\x93\x02\r\"\x08/db/list:\x01*\x12u\n\x0e\x44\x61tabaseListV2\x12$.immudb.schema.DatabaseListRequestV2\x1a%.immudb.schema.DatabaseListResponseV2\"\x16\x82\xd3\xe4\x93\x02\x10\"\x0b/db/list/v2:\x01*\x12g\n\x0bUseDatabase\x12\x17.immudb.schema.Database\x1a\x1f.immudb.schema.UseDatabaseReply\"\x1e\x82\xd3\xe4\x93\x02\x18\x12\x16/db/use/{databaseName}\x12\x63\n\x0eUpdateDatabase\x12\x1f.immudb.schema.DatabaseSettings\x1a\x16.google.protobuf.Empty\"\x18\x88\x02\x01\x82\xd3\xe4\x93\x02\x0f\"\n/db/update:\x01*\x12y\n\x10UpdateDatabaseV2\x12$.immudb.schema.UpdateDatabaseRequest\x1a%.immudb.schema.UpdateDatabaseResponse\"\x18\x82\xd3\xe4\x93\x02\x12\"\r/db/update/v2:\x01*\x12j\n\x13GetDatabaseSettings\x12\x16.google.protobuf.Empty\x1a\x1f.immudb.schema.DatabaseSettings\"\x1a\x88\x02\x01\x82\xd3\xe4\x93\x02\x11\"\x0c/db/settings:\x01*\x12\x84\x01\n\x15GetDatabaseSettingsV2\x12&.immudb.schema.DatabaseSettingsRequest\x1a\'.immudb.schema.DatabaseSettingsResponse\"\x1a\x82\xd3\xe4\x93\x02\x14\"\x0f/db/settings/v2:\x01*\x12i\n\nFlushIndex\x12 .immudb.schema.FlushIndexRequest\x1a!.immudb.schema.FlushIndexResponse\"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/db/flushindex\x12X\n\x0c\x43ompactIndex\x12\x16.google.protobuf.Empty\x1a\x16.google.protobuf.Empty\"\x18\x82\xd3\xe4\x93\x02\x12\x12\x10/db/compactindex\x12@\n\tstreamGet\x12\x19.immudb.schema.KeyRequest\x1a\x14.immudb.schema.Chunk\"\x00\x30\x01\x12>\n\tstreamSet\x12\x14.immudb.schema.Chunk\x1a\x17.immudb.schema.TxHeader\"\x00(\x01\x12T\n\x13streamVerifiableGet\x12#.immudb.schema.VerifiableGetRequest\x1a\x14.immudb.schema.Chunk\"\x00\x30\x01\x12L\n\x13streamVerifiableSet\x12\x14.immudb.schema.Chunk\x1a\x1b.immudb.schema.VerifiableTx\"\x00(\x01\x12\x42\n\nstreamScan\x12\x1a.immudb.schema.ScanRequest\x1a\x14.immudb.schema.Chunk\"\x00\x30\x01\x12\x44\n\x0bstreamZScan\x12\x1b.immudb.schema.ZScanRequest\x1a\x14.immudb.schema.Chunk\"\x00\x30\x01\x12H\n\rstreamHistory\x12\x1d.immudb.schema.HistoryRequest\x1a\x14.immudb.schema.Chunk\"\x00\x30\x01\x12\x42\n\rstreamExecAll\x12\x14.immudb.schema.Chunk\x1a\x17.immudb.schema.TxHeader\"\x00(\x01\x12\x44\n\x08\x65xportTx\x12\x1e.immudb.schema.ExportTxRequest\x1a\x14.immudb.schema.Chunk\"\x00\x30\x01\x12@\n\x0breplicateTx\x12\x14.immudb.schema.Chunk\x1a\x17.immudb.schema.TxHeader\"\x00(\x01\x12^\n\x07SQLExec\x12\x1d.immudb.schema.SQLExecRequest\x1a\x1c.immudb.schema.SQLExecResult\"\x16\x82\xd3\xe4\x93\x02\x10\"\x0b/db/sqlexec:\x01*\x12\x62\n\x08SQLQuery\x12\x1e.immudb.schema.SQLQueryRequest\x1a\x1d.immudb.schema.SQLQueryResult\"\x17\x82\xd3\xe4\x93\x02\x11\"\x0c/db/sqlquery:\x01*\x12[\n\nListTables\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.SQLQueryResult\"\x16\x82\xd3\xe4\x93\x02\x10\x12\x0e/db/table/list\x12[\n\rDescribeTable\x12\x14.immudb.schema.Table\x1a\x1d.immudb.schema.SQLQueryResult\"\x15\x82\xd3\xe4\x93\x02\x0f\"\n/db/tables:\x01*\x12\x7f\n\x10VerifiableSQLGet\x12&.immudb.schema.VerifiableSQLGetRequest\x1a!.immudb.schema.VerifiableSQLEntry\" \x82\xd3\xe4\x93\x02\x1a\"\x15/db/verifiable/sqlget:\x01*B-Z+github.com/codenotary/immudb/pkg/api/schemab\x06proto3') +_ENTRYTYPEACTION = DESCRIPTOR.enum_types_by_name['EntryTypeAction'] EntryTypeAction = enum_type_wrapper.EnumTypeWrapper(_ENTRYTYPEACTION) -_PERMISSIONACTION = _descriptor.EnumDescriptor( - name='PermissionAction', - full_name='immudb.schema.PermissionAction', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='GRANT', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='REVOKE', index=1, number=1, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=12346, - serialized_end=12387, -) -_sym_db.RegisterEnumDescriptor(_PERMISSIONACTION) - +_PERMISSIONACTION = DESCRIPTOR.enum_types_by_name['PermissionAction'] PermissionAction = enum_type_wrapper.EnumTypeWrapper(_PERMISSIONACTION) -_TXMODE = _descriptor.EnumDescriptor( - name='TxMode', - full_name='immudb.schema.TxMode', - filename=None, - file=DESCRIPTOR, - values=[ - _descriptor.EnumValueDescriptor( - name='ReadOnly', index=0, number=0, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='WriteOnly', index=1, number=1, - serialized_options=None, - type=None), - _descriptor.EnumValueDescriptor( - name='ReadWrite', index=2, number=2, - serialized_options=None, - type=None), - ], - containing_type=None, - serialized_options=None, - serialized_start=12389, - serialized_end=12441, -) -_sym_db.RegisterEnumDescriptor(_TXMODE) - +_TXMODE = DESCRIPTOR.enum_types_by_name['TxMode'] TxMode = enum_type_wrapper.EnumTypeWrapper(_TXMODE) EXCLUDE = 0 ONLY_DIGEST = 1 @@ -119,5598 +37,131 @@ ReadWrite = 2 - -_KEY = _descriptor.Descriptor( - name='Key', - full_name='immudb.schema.Key', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.Key.key', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=90, - serialized_end=108, -) - - -_PERMISSION = _descriptor.Descriptor( - name='Permission', - full_name='immudb.schema.Permission', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.Permission.database', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='permission', full_name='immudb.schema.Permission.permission', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=110, - serialized_end=160, -) - - -_USER = _descriptor.Descriptor( - name='User', - full_name='immudb.schema.User', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='user', full_name='immudb.schema.User.user', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='permissions', full_name='immudb.schema.User.permissions', index=1, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='createdby', full_name='immudb.schema.User.createdby', index=2, - number=4, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='createdat', full_name='immudb.schema.User.createdat', index=3, - number=5, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='active', full_name='immudb.schema.User.active', index=4, - number=6, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=162, - serialized_end=284, -) - - -_USERLIST = _descriptor.Descriptor( - name='UserList', - full_name='immudb.schema.UserList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='users', full_name='immudb.schema.UserList.users', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=286, - serialized_end=332, -) - - -_CREATEUSERREQUEST = _descriptor.Descriptor( - name='CreateUserRequest', - full_name='immudb.schema.CreateUserRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='user', full_name='immudb.schema.CreateUserRequest.user', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='password', full_name='immudb.schema.CreateUserRequest.password', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='permission', full_name='immudb.schema.CreateUserRequest.permission', index=2, - number=3, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.CreateUserRequest.database', index=3, - number=4, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=334, - serialized_end=423, -) - - -_USERREQUEST = _descriptor.Descriptor( - name='UserRequest', - full_name='immudb.schema.UserRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='user', full_name='immudb.schema.UserRequest.user', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=425, - serialized_end=452, -) - - -_CHANGEPASSWORDREQUEST = _descriptor.Descriptor( - name='ChangePasswordRequest', - full_name='immudb.schema.ChangePasswordRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='user', full_name='immudb.schema.ChangePasswordRequest.user', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='oldPassword', full_name='immudb.schema.ChangePasswordRequest.oldPassword', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='newPassword', full_name='immudb.schema.ChangePasswordRequest.newPassword', index=2, - number=3, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=454, - serialized_end=533, -) - - -_LOGINREQUEST = _descriptor.Descriptor( - name='LoginRequest', - full_name='immudb.schema.LoginRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='user', full_name='immudb.schema.LoginRequest.user', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='password', full_name='immudb.schema.LoginRequest.password', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=535, - serialized_end=581, -) - - -_LOGINRESPONSE = _descriptor.Descriptor( - name='LoginResponse', - full_name='immudb.schema.LoginResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='token', full_name='immudb.schema.LoginResponse.token', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='warning', full_name='immudb.schema.LoginResponse.warning', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=583, - serialized_end=630, -) - - -_AUTHCONFIG = _descriptor.Descriptor( - name='AuthConfig', - full_name='immudb.schema.AuthConfig', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='kind', full_name='immudb.schema.AuthConfig.kind', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=632, - serialized_end=658, -) - - -_MTLSCONFIG = _descriptor.Descriptor( - name='MTLSConfig', - full_name='immudb.schema.MTLSConfig', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='enabled', full_name='immudb.schema.MTLSConfig.enabled', index=0, - number=1, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=660, - serialized_end=689, -) - - -_OPENSESSIONREQUEST = _descriptor.Descriptor( - name='OpenSessionRequest', - full_name='immudb.schema.OpenSessionRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='username', full_name='immudb.schema.OpenSessionRequest.username', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='password', full_name='immudb.schema.OpenSessionRequest.password', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='databaseName', full_name='immudb.schema.OpenSessionRequest.databaseName', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=691, - serialized_end=769, -) - - -_OPENSESSIONRESPONSE = _descriptor.Descriptor( - name='OpenSessionResponse', - full_name='immudb.schema.OpenSessionResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='sessionID', full_name='immudb.schema.OpenSessionResponse.sessionID', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='serverUUID', full_name='immudb.schema.OpenSessionResponse.serverUUID', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=771, - serialized_end=831, -) - - -_PRECONDITION_KEYMUSTEXISTPRECONDITION = _descriptor.Descriptor( - name='KeyMustExistPrecondition', - full_name='immudb.schema.Precondition.KeyMustExistPrecondition', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.Precondition.KeyMustExistPrecondition.key', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1108, - serialized_end=1147, -) - -_PRECONDITION_KEYMUSTNOTEXISTPRECONDITION = _descriptor.Descriptor( - name='KeyMustNotExistPrecondition', - full_name='immudb.schema.Precondition.KeyMustNotExistPrecondition', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.Precondition.KeyMustNotExistPrecondition.key', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1149, - serialized_end=1191, -) - -_PRECONDITION_KEYNOTMODIFIEDAFTERTXPRECONDITION = _descriptor.Descriptor( - name='KeyNotModifiedAfterTXPrecondition', - full_name='immudb.schema.Precondition.KeyNotModifiedAfterTXPrecondition', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.Precondition.KeyNotModifiedAfterTXPrecondition.key', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='txID', full_name='immudb.schema.Precondition.KeyNotModifiedAfterTXPrecondition.txID', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1193, - serialized_end=1255, -) - -_PRECONDITION = _descriptor.Descriptor( - name='Precondition', - full_name='immudb.schema.Precondition', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='keyMustExist', full_name='immudb.schema.Precondition.keyMustExist', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='keyMustNotExist', full_name='immudb.schema.Precondition.keyMustNotExist', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='keyNotModifiedAfterTX', full_name='immudb.schema.Precondition.keyNotModifiedAfterTX', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[_PRECONDITION_KEYMUSTEXISTPRECONDITION, _PRECONDITION_KEYMUSTNOTEXISTPRECONDITION, _PRECONDITION_KEYNOTMODIFIEDAFTERTXPRECONDITION, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='precondition', full_name='immudb.schema.Precondition.precondition', - index=0, containing_type=None, fields=[]), - ], - serialized_start=834, - serialized_end=1271, -) - - -_KEYVALUE = _descriptor.Descriptor( - name='KeyValue', - full_name='immudb.schema.KeyValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.KeyValue.key', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.KeyValue.value', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='metadata', full_name='immudb.schema.KeyValue.metadata', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1273, - serialized_end=1356, -) - - -_ENTRY = _descriptor.Descriptor( - name='Entry', - full_name='immudb.schema.Entry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='tx', full_name='immudb.schema.Entry.tx', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.Entry.key', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.Entry.value', index=2, - number=3, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='referencedBy', full_name='immudb.schema.Entry.referencedBy', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='metadata', full_name='immudb.schema.Entry.metadata', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='expired', full_name='immudb.schema.Entry.expired', index=5, - number=6, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='revision', full_name='immudb.schema.Entry.revision', index=6, - number=7, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1359, - serialized_end=1534, -) - - -_REFERENCE = _descriptor.Descriptor( - name='Reference', - full_name='immudb.schema.Reference', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='tx', full_name='immudb.schema.Reference.tx', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.Reference.key', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='atTx', full_name='immudb.schema.Reference.atTx', index=2, - number=3, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='metadata', full_name='immudb.schema.Reference.metadata', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='revision', full_name='immudb.schema.Reference.revision', index=4, - number=5, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1536, - serialized_end=1649, -) - - -_OP = _descriptor.Descriptor( - name='Op', - full_name='immudb.schema.Op', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='kv', full_name='immudb.schema.Op.kv', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='zAdd', full_name='immudb.schema.Op.zAdd', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='ref', full_name='immudb.schema.Op.ref', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='operation', full_name='immudb.schema.Op.operation', - index=0, containing_type=None, fields=[]), - ], - serialized_start=1652, - serialized_end=1800, -) - - -_EXECALLREQUEST = _descriptor.Descriptor( - name='ExecAllRequest', - full_name='immudb.schema.ExecAllRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='Operations', full_name='immudb.schema.ExecAllRequest.Operations', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='noWait', full_name='immudb.schema.ExecAllRequest.noWait', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='preconditions', full_name='immudb.schema.ExecAllRequest.preconditions', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1802, - serialized_end=1925, -) - - -_ENTRIES = _descriptor.Descriptor( - name='Entries', - full_name='immudb.schema.Entries', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='entries', full_name='immudb.schema.Entries.entries', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1927, - serialized_end=1975, -) - - -_ZENTRY = _descriptor.Descriptor( - name='ZEntry', - full_name='immudb.schema.ZEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='set', full_name='immudb.schema.ZEntry.set', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.ZEntry.key', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='entry', full_name='immudb.schema.ZEntry.entry', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='score', full_name='immudb.schema.ZEntry.score', index=3, - number=4, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='atTx', full_name='immudb.schema.ZEntry.atTx', index=4, - number=5, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=1977, - serialized_end=2077, -) - - -_ZENTRIES = _descriptor.Descriptor( - name='ZEntries', - full_name='immudb.schema.ZEntries', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='entries', full_name='immudb.schema.ZEntries.entries', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2079, - serialized_end=2129, -) - - -_SCANREQUEST = _descriptor.Descriptor( - name='ScanRequest', - full_name='immudb.schema.ScanRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='seekKey', full_name='immudb.schema.ScanRequest.seekKey', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='prefix', full_name='immudb.schema.ScanRequest.prefix', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='desc', full_name='immudb.schema.ScanRequest.desc', index=2, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='limit', full_name='immudb.schema.ScanRequest.limit', index=3, - number=4, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sinceTx', full_name='immudb.schema.ScanRequest.sinceTx', index=4, - number=5, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='noWait', full_name='immudb.schema.ScanRequest.noWait', index=5, - number=6, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2131, - serialized_end=2239, -) - - -_KEYPREFIX = _descriptor.Descriptor( - name='KeyPrefix', - full_name='immudb.schema.KeyPrefix', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='prefix', full_name='immudb.schema.KeyPrefix.prefix', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2241, - serialized_end=2268, -) - - -_ENTRYCOUNT = _descriptor.Descriptor( - name='EntryCount', - full_name='immudb.schema.EntryCount', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='count', full_name='immudb.schema.EntryCount.count', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2270, - serialized_end=2297, -) - - -_SIGNATURE = _descriptor.Descriptor( - name='Signature', - full_name='immudb.schema.Signature', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='publicKey', full_name='immudb.schema.Signature.publicKey', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='signature', full_name='immudb.schema.Signature.signature', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2299, - serialized_end=2348, -) - - -_TXHEADER = _descriptor.Descriptor( - name='TxHeader', - full_name='immudb.schema.TxHeader', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='id', full_name='immudb.schema.TxHeader.id', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='prevAlh', full_name='immudb.schema.TxHeader.prevAlh', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='ts', full_name='immudb.schema.TxHeader.ts', index=2, - number=3, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='nentries', full_name='immudb.schema.TxHeader.nentries', index=3, - number=4, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='eH', full_name='immudb.schema.TxHeader.eH', index=4, - number=5, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='blTxId', full_name='immudb.schema.TxHeader.blTxId', index=5, - number=6, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='blRoot', full_name='immudb.schema.TxHeader.blRoot', index=6, - number=7, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='version', full_name='immudb.schema.TxHeader.version', index=7, - number=8, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='metadata', full_name='immudb.schema.TxHeader.metadata', index=8, - number=9, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2351, - serialized_end=2526, -) - - -_TXMETADATA = _descriptor.Descriptor( - name='TxMetadata', - full_name='immudb.schema.TxMetadata', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2528, - serialized_end=2540, -) - - -_LINEARPROOF = _descriptor.Descriptor( - name='LinearProof', - full_name='immudb.schema.LinearProof', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='sourceTxId', full_name='immudb.schema.LinearProof.sourceTxId', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='TargetTxId', full_name='immudb.schema.LinearProof.TargetTxId', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='terms', full_name='immudb.schema.LinearProof.terms', index=2, - number=3, type=12, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2542, - serialized_end=2610, -) - - -_DUALPROOF = _descriptor.Descriptor( - name='DualProof', - full_name='immudb.schema.DualProof', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='sourceTxHeader', full_name='immudb.schema.DualProof.sourceTxHeader', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='targetTxHeader', full_name='immudb.schema.DualProof.targetTxHeader', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='inclusionProof', full_name='immudb.schema.DualProof.inclusionProof', index=2, - number=3, type=12, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='consistencyProof', full_name='immudb.schema.DualProof.consistencyProof', index=3, - number=4, type=12, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='targetBlTxAlh', full_name='immudb.schema.DualProof.targetBlTxAlh', index=4, - number=5, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='lastInclusionProof', full_name='immudb.schema.DualProof.lastInclusionProof', index=5, - number=6, type=12, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='linearProof', full_name='immudb.schema.DualProof.linearProof', index=6, - number=7, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2613, - serialized_end=2872, -) - - -_TX = _descriptor.Descriptor( - name='Tx', - full_name='immudb.schema.Tx', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='header', full_name='immudb.schema.Tx.header', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='entries', full_name='immudb.schema.Tx.entries', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='kvEntries', full_name='immudb.schema.Tx.kvEntries', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='zEntries', full_name='immudb.schema.Tx.zEntries', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2875, - serialized_end=3043, -) - - -_TXENTRY = _descriptor.Descriptor( - name='TxEntry', - full_name='immudb.schema.TxEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.TxEntry.key', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='hValue', full_name='immudb.schema.TxEntry.hValue', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='vLen', full_name='immudb.schema.TxEntry.vLen', index=2, - number=3, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='metadata', full_name='immudb.schema.TxEntry.metadata', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.TxEntry.value', index=4, - number=5, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3045, - serialized_end=3157, -) - - -_KVMETADATA = _descriptor.Descriptor( - name='KVMetadata', - full_name='immudb.schema.KVMetadata', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='deleted', full_name='immudb.schema.KVMetadata.deleted', index=0, - number=1, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='expiration', full_name='immudb.schema.KVMetadata.expiration', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='nonIndexable', full_name='immudb.schema.KVMetadata.nonIndexable', index=2, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3159, - serialized_end=3257, -) - - -_EXPIRATION = _descriptor.Descriptor( - name='Expiration', - full_name='immudb.schema.Expiration', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='expiresAt', full_name='immudb.schema.Expiration.expiresAt', index=0, - number=1, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3259, - serialized_end=3290, -) - - -_VERIFIABLETX = _descriptor.Descriptor( - name='VerifiableTx', - full_name='immudb.schema.VerifiableTx', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='tx', full_name='immudb.schema.VerifiableTx.tx', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='dualProof', full_name='immudb.schema.VerifiableTx.dualProof', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='signature', full_name='immudb.schema.VerifiableTx.signature', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3293, - serialized_end=3428, -) - - -_VERIFIABLEENTRY = _descriptor.Descriptor( - name='VerifiableEntry', - full_name='immudb.schema.VerifiableEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='entry', full_name='immudb.schema.VerifiableEntry.entry', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='verifiableTx', full_name='immudb.schema.VerifiableEntry.verifiableTx', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='inclusionProof', full_name='immudb.schema.VerifiableEntry.inclusionProof', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3431, - serialized_end=3591, -) - - -_INCLUSIONPROOF = _descriptor.Descriptor( - name='InclusionProof', - full_name='immudb.schema.InclusionProof', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='leaf', full_name='immudb.schema.InclusionProof.leaf', index=0, - number=1, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='width', full_name='immudb.schema.InclusionProof.width', index=1, - number=2, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='terms', full_name='immudb.schema.InclusionProof.terms', index=2, - number=3, type=12, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3593, - serialized_end=3653, -) - - -_SETREQUEST = _descriptor.Descriptor( - name='SetRequest', - full_name='immudb.schema.SetRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='KVs', full_name='immudb.schema.SetRequest.KVs', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='noWait', full_name='immudb.schema.SetRequest.noWait', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='preconditions', full_name='immudb.schema.SetRequest.preconditions', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3655, - serialized_end=3773, -) - - -_KEYREQUEST = _descriptor.Descriptor( - name='KeyRequest', - full_name='immudb.schema.KeyRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.KeyRequest.key', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='atTx', full_name='immudb.schema.KeyRequest.atTx', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sinceTx', full_name='immudb.schema.KeyRequest.sinceTx', index=2, - number=3, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='noWait', full_name='immudb.schema.KeyRequest.noWait', index=3, - number=4, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='atRevision', full_name='immudb.schema.KeyRequest.atRevision', index=4, - number=5, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3775, - serialized_end=3867, -) - - -_KEYLISTREQUEST = _descriptor.Descriptor( - name='KeyListRequest', - full_name='immudb.schema.KeyListRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='keys', full_name='immudb.schema.KeyListRequest.keys', index=0, - number=1, type=12, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sinceTx', full_name='immudb.schema.KeyListRequest.sinceTx', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3869, - serialized_end=3916, -) - - -_DELETEKEYSREQUEST = _descriptor.Descriptor( - name='DeleteKeysRequest', - full_name='immudb.schema.DeleteKeysRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='keys', full_name='immudb.schema.DeleteKeysRequest.keys', index=0, - number=1, type=12, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sinceTx', full_name='immudb.schema.DeleteKeysRequest.sinceTx', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='noWait', full_name='immudb.schema.DeleteKeysRequest.noWait', index=2, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3918, - serialized_end=3984, -) - - -_VERIFIABLESETREQUEST = _descriptor.Descriptor( - name='VerifiableSetRequest', - full_name='immudb.schema.VerifiableSetRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='setRequest', full_name='immudb.schema.VerifiableSetRequest.setRequest', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='proveSinceTx', full_name='immudb.schema.VerifiableSetRequest.proveSinceTx', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=3986, - serialized_end=4077, -) - - -_VERIFIABLEGETREQUEST = _descriptor.Descriptor( - name='VerifiableGetRequest', - full_name='immudb.schema.VerifiableGetRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='keyRequest', full_name='immudb.schema.VerifiableGetRequest.keyRequest', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='proveSinceTx', full_name='immudb.schema.VerifiableGetRequest.proveSinceTx', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4079, - serialized_end=4170, -) - - -_HEALTHRESPONSE = _descriptor.Descriptor( - name='HealthResponse', - full_name='immudb.schema.HealthResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='status', full_name='immudb.schema.HealthResponse.status', index=0, - number=1, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='version', full_name='immudb.schema.HealthResponse.version', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4172, - serialized_end=4221, -) - - -_DATABASEHEALTHRESPONSE = _descriptor.Descriptor( - name='DatabaseHealthResponse', - full_name='immudb.schema.DatabaseHealthResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='pendingRequests', full_name='immudb.schema.DatabaseHealthResponse.pendingRequests', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='lastRequestCompletedAt', full_name='immudb.schema.DatabaseHealthResponse.lastRequestCompletedAt', index=1, - number=2, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4223, - serialized_end=4304, -) - - -_IMMUTABLESTATE = _descriptor.Descriptor( - name='ImmutableState', - full_name='immudb.schema.ImmutableState', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='db', full_name='immudb.schema.ImmutableState.db', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='txId', full_name='immudb.schema.ImmutableState.txId', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='txHash', full_name='immudb.schema.ImmutableState.txHash', index=2, - number=3, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='signature', full_name='immudb.schema.ImmutableState.signature', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4306, - serialized_end=4409, -) - - -_REFERENCEREQUEST = _descriptor.Descriptor( - name='ReferenceRequest', - full_name='immudb.schema.ReferenceRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.ReferenceRequest.key', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='referencedKey', full_name='immudb.schema.ReferenceRequest.referencedKey', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='atTx', full_name='immudb.schema.ReferenceRequest.atTx', index=2, - number=3, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='boundRef', full_name='immudb.schema.ReferenceRequest.boundRef', index=3, - number=4, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='noWait', full_name='immudb.schema.ReferenceRequest.noWait', index=4, - number=5, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='preconditions', full_name='immudb.schema.ReferenceRequest.preconditions', index=5, - number=6, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4412, - serialized_end=4566, -) - - -_VERIFIABLEREFERENCEREQUEST = _descriptor.Descriptor( - name='VerifiableReferenceRequest', - full_name='immudb.schema.VerifiableReferenceRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='referenceRequest', full_name='immudb.schema.VerifiableReferenceRequest.referenceRequest', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='proveSinceTx', full_name='immudb.schema.VerifiableReferenceRequest.proveSinceTx', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4568, - serialized_end=4677, -) - - -_ZADDREQUEST = _descriptor.Descriptor( - name='ZAddRequest', - full_name='immudb.schema.ZAddRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='set', full_name='immudb.schema.ZAddRequest.set', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='score', full_name='immudb.schema.ZAddRequest.score', index=1, - number=2, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.ZAddRequest.key', index=2, - number=3, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='atTx', full_name='immudb.schema.ZAddRequest.atTx', index=3, - number=4, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='boundRef', full_name='immudb.schema.ZAddRequest.boundRef', index=4, - number=5, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='noWait', full_name='immudb.schema.ZAddRequest.noWait', index=5, - number=6, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4679, - serialized_end=4781, -) - - -_SCORE = _descriptor.Descriptor( - name='Score', - full_name='immudb.schema.Score', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='score', full_name='immudb.schema.Score.score', index=0, - number=1, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4783, - serialized_end=4805, -) - - -_ZSCANREQUEST = _descriptor.Descriptor( - name='ZScanRequest', - full_name='immudb.schema.ZScanRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='set', full_name='immudb.schema.ZScanRequest.set', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='seekKey', full_name='immudb.schema.ZScanRequest.seekKey', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='seekScore', full_name='immudb.schema.ZScanRequest.seekScore', index=2, - number=3, type=1, cpp_type=5, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='seekAtTx', full_name='immudb.schema.ZScanRequest.seekAtTx', index=3, - number=4, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='inclusiveSeek', full_name='immudb.schema.ZScanRequest.inclusiveSeek', index=4, - number=5, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='limit', full_name='immudb.schema.ZScanRequest.limit', index=5, - number=6, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='desc', full_name='immudb.schema.ZScanRequest.desc', index=6, - number=7, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='minScore', full_name='immudb.schema.ZScanRequest.minScore', index=7, - number=8, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maxScore', full_name='immudb.schema.ZScanRequest.maxScore', index=8, - number=9, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sinceTx', full_name='immudb.schema.ZScanRequest.sinceTx', index=9, - number=10, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='noWait', full_name='immudb.schema.ZScanRequest.noWait', index=10, - number=11, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=4808, - serialized_end=5054, -) - - -_HISTORYREQUEST = _descriptor.Descriptor( - name='HistoryRequest', - full_name='immudb.schema.HistoryRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.HistoryRequest.key', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='offset', full_name='immudb.schema.HistoryRequest.offset', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='limit', full_name='immudb.schema.HistoryRequest.limit', index=2, - number=3, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='desc', full_name='immudb.schema.HistoryRequest.desc', index=3, - number=4, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sinceTx', full_name='immudb.schema.HistoryRequest.sinceTx', index=4, - number=5, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=5056, - serialized_end=5147, -) - - -_VERIFIABLEZADDREQUEST = _descriptor.Descriptor( - name='VerifiableZAddRequest', - full_name='immudb.schema.VerifiableZAddRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='zAddRequest', full_name='immudb.schema.VerifiableZAddRequest.zAddRequest', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='proveSinceTx', full_name='immudb.schema.VerifiableZAddRequest.proveSinceTx', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=5149, - serialized_end=5243, -) - - -_TXREQUEST = _descriptor.Descriptor( - name='TxRequest', - full_name='immudb.schema.TxRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='tx', full_name='immudb.schema.TxRequest.tx', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='entriesSpec', full_name='immudb.schema.TxRequest.entriesSpec', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sinceTx', full_name='immudb.schema.TxRequest.sinceTx', index=2, - number=3, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='noWait', full_name='immudb.schema.TxRequest.noWait', index=3, - number=4, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=5245, - serialized_end=5350, -) - - -_ENTRIESSPEC = _descriptor.Descriptor( - name='EntriesSpec', - full_name='immudb.schema.EntriesSpec', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='kvEntriesSpec', full_name='immudb.schema.EntriesSpec.kvEntriesSpec', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='zEntriesSpec', full_name='immudb.schema.EntriesSpec.zEntriesSpec', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sqlEntriesSpec', full_name='immudb.schema.EntriesSpec.sqlEntriesSpec', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=5353, - serialized_end=5525, -) - - -_ENTRYTYPESPEC = _descriptor.Descriptor( - name='EntryTypeSpec', - full_name='immudb.schema.EntryTypeSpec', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='action', full_name='immudb.schema.EntryTypeSpec.action', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=5527, - serialized_end=5590, -) - - -_VERIFIABLETXREQUEST = _descriptor.Descriptor( - name='VerifiableTxRequest', - full_name='immudb.schema.VerifiableTxRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='tx', full_name='immudb.schema.VerifiableTxRequest.tx', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='proveSinceTx', full_name='immudb.schema.VerifiableTxRequest.proveSinceTx', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='entriesSpec', full_name='immudb.schema.VerifiableTxRequest.entriesSpec', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sinceTx', full_name='immudb.schema.VerifiableTxRequest.sinceTx', index=3, - number=4, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='noWait', full_name='immudb.schema.VerifiableTxRequest.noWait', index=4, - number=5, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=5593, - serialized_end=5730, -) - - -_TXSCANREQUEST = _descriptor.Descriptor( - name='TxScanRequest', - full_name='immudb.schema.TxScanRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='initialTx', full_name='immudb.schema.TxScanRequest.initialTx', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='limit', full_name='immudb.schema.TxScanRequest.limit', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='desc', full_name='immudb.schema.TxScanRequest.desc', index=2, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='entriesSpec', full_name='immudb.schema.TxScanRequest.entriesSpec', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sinceTx', full_name='immudb.schema.TxScanRequest.sinceTx', index=4, - number=5, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='noWait', full_name='immudb.schema.TxScanRequest.noWait', index=5, - number=6, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=5733, - serialized_end=5878, -) - - -_TXLIST = _descriptor.Descriptor( - name='TxList', - full_name='immudb.schema.TxList', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='txs', full_name='immudb.schema.TxList.txs', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=5880, - serialized_end=5920, -) - - -_EXPORTTXREQUEST = _descriptor.Descriptor( - name='ExportTxRequest', - full_name='immudb.schema.ExportTxRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='tx', full_name='immudb.schema.ExportTxRequest.tx', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=5922, - serialized_end=5951, -) - - -_DATABASE = _descriptor.Descriptor( - name='Database', - full_name='immudb.schema.Database', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='databaseName', full_name='immudb.schema.Database.databaseName', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=5953, - serialized_end=5985, -) - - -_DATABASESETTINGS = _descriptor.Descriptor( - name='DatabaseSettings', - full_name='immudb.schema.DatabaseSettings', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='databaseName', full_name='immudb.schema.DatabaseSettings.databaseName', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='replica', full_name='immudb.schema.DatabaseSettings.replica', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='masterDatabase', full_name='immudb.schema.DatabaseSettings.masterDatabase', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='masterAddress', full_name='immudb.schema.DatabaseSettings.masterAddress', index=3, - number=4, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='masterPort', full_name='immudb.schema.DatabaseSettings.masterPort', index=4, - number=5, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='followerUsername', full_name='immudb.schema.DatabaseSettings.followerUsername', index=5, - number=6, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='followerPassword', full_name='immudb.schema.DatabaseSettings.followerPassword', index=6, - number=7, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='fileSize', full_name='immudb.schema.DatabaseSettings.fileSize', index=7, - number=8, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maxKeyLen', full_name='immudb.schema.DatabaseSettings.maxKeyLen', index=8, - number=9, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maxValueLen', full_name='immudb.schema.DatabaseSettings.maxValueLen', index=9, - number=10, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maxTxEntries', full_name='immudb.schema.DatabaseSettings.maxTxEntries', index=10, - number=11, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='excludeCommitTime', full_name='immudb.schema.DatabaseSettings.excludeCommitTime', index=11, - number=12, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=5988, - serialized_end=6271, -) - - -_CREATEDATABASEREQUEST = _descriptor.Descriptor( - name='CreateDatabaseRequest', - full_name='immudb.schema.CreateDatabaseRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='immudb.schema.CreateDatabaseRequest.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='settings', full_name='immudb.schema.CreateDatabaseRequest.settings', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=6273, - serialized_end=6369, -) - - -_CREATEDATABASERESPONSE = _descriptor.Descriptor( - name='CreateDatabaseResponse', - full_name='immudb.schema.CreateDatabaseResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='immudb.schema.CreateDatabaseResponse.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='settings', full_name='immudb.schema.CreateDatabaseResponse.settings', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=6371, - serialized_end=6468, -) - - -_UPDATEDATABASEREQUEST = _descriptor.Descriptor( - name='UpdateDatabaseRequest', - full_name='immudb.schema.UpdateDatabaseRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.UpdateDatabaseRequest.database', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='settings', full_name='immudb.schema.UpdateDatabaseRequest.settings', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=6470, - serialized_end=6570, -) - - -_UPDATEDATABASERESPONSE = _descriptor.Descriptor( - name='UpdateDatabaseResponse', - full_name='immudb.schema.UpdateDatabaseResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.UpdateDatabaseResponse.database', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='settings', full_name='immudb.schema.UpdateDatabaseResponse.settings', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=6572, - serialized_end=6673, -) - - -_DATABASESETTINGSREQUEST = _descriptor.Descriptor( - name='DatabaseSettingsRequest', - full_name='immudb.schema.DatabaseSettingsRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=6675, - serialized_end=6700, -) - - -_DATABASESETTINGSRESPONSE = _descriptor.Descriptor( - name='DatabaseSettingsResponse', - full_name='immudb.schema.DatabaseSettingsResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.DatabaseSettingsResponse.database', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='settings', full_name='immudb.schema.DatabaseSettingsResponse.settings', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=6702, - serialized_end=6805, -) - - -_NULLABLEUINT32 = _descriptor.Descriptor( - name='NullableUint32', - full_name='immudb.schema.NullableUint32', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.NullableUint32.value', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=6807, - serialized_end=6838, -) - - -_NULLABLEUINT64 = _descriptor.Descriptor( - name='NullableUint64', - full_name='immudb.schema.NullableUint64', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.NullableUint64.value', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=6840, - serialized_end=6871, -) - - -_NULLABLEFLOAT = _descriptor.Descriptor( - name='NullableFloat', - full_name='immudb.schema.NullableFloat', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.NullableFloat.value', index=0, - number=1, type=2, cpp_type=6, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=6873, - serialized_end=6903, -) - - -_NULLABLEBOOL = _descriptor.Descriptor( - name='NullableBool', - full_name='immudb.schema.NullableBool', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.NullableBool.value', index=0, - number=1, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=6905, - serialized_end=6934, -) - - -_NULLABLESTRING = _descriptor.Descriptor( - name='NullableString', - full_name='immudb.schema.NullableString', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.NullableString.value', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=6936, - serialized_end=6967, -) - - -_DATABASENULLABLESETTINGS = _descriptor.Descriptor( - name='DatabaseNullableSettings', - full_name='immudb.schema.DatabaseNullableSettings', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='replicationSettings', full_name='immudb.schema.DatabaseNullableSettings.replicationSettings', index=0, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='fileSize', full_name='immudb.schema.DatabaseNullableSettings.fileSize', index=1, - number=8, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maxKeyLen', full_name='immudb.schema.DatabaseNullableSettings.maxKeyLen', index=2, - number=9, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maxValueLen', full_name='immudb.schema.DatabaseNullableSettings.maxValueLen', index=3, - number=10, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maxTxEntries', full_name='immudb.schema.DatabaseNullableSettings.maxTxEntries', index=4, - number=11, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='excludeCommitTime', full_name='immudb.schema.DatabaseNullableSettings.excludeCommitTime', index=5, - number=12, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maxConcurrency', full_name='immudb.schema.DatabaseNullableSettings.maxConcurrency', index=6, - number=13, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maxIOConcurrency', full_name='immudb.schema.DatabaseNullableSettings.maxIOConcurrency', index=7, - number=14, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='txLogCacheSize', full_name='immudb.schema.DatabaseNullableSettings.txLogCacheSize', index=8, - number=15, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='vLogMaxOpenedFiles', full_name='immudb.schema.DatabaseNullableSettings.vLogMaxOpenedFiles', index=9, - number=16, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='txLogMaxOpenedFiles', full_name='immudb.schema.DatabaseNullableSettings.txLogMaxOpenedFiles', index=10, - number=17, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='commitLogMaxOpenedFiles', full_name='immudb.schema.DatabaseNullableSettings.commitLogMaxOpenedFiles', index=11, - number=18, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='indexSettings', full_name='immudb.schema.DatabaseNullableSettings.indexSettings', index=12, - number=19, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='writeTxHeaderVersion', full_name='immudb.schema.DatabaseNullableSettings.writeTxHeaderVersion', index=13, - number=20, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='autoload', full_name='immudb.schema.DatabaseNullableSettings.autoload', index=14, - number=21, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=6970, - serialized_end=7848, -) - - -_REPLICATIONNULLABLESETTINGS = _descriptor.Descriptor( - name='ReplicationNullableSettings', - full_name='immudb.schema.ReplicationNullableSettings', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='replica', full_name='immudb.schema.ReplicationNullableSettings.replica', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='masterDatabase', full_name='immudb.schema.ReplicationNullableSettings.masterDatabase', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='masterAddress', full_name='immudb.schema.ReplicationNullableSettings.masterAddress', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='masterPort', full_name='immudb.schema.ReplicationNullableSettings.masterPort', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='followerUsername', full_name='immudb.schema.ReplicationNullableSettings.followerUsername', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='followerPassword', full_name='immudb.schema.ReplicationNullableSettings.followerPassword', index=5, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=7851, - serialized_end=8200, -) - - -_INDEXNULLABLESETTINGS = _descriptor.Descriptor( - name='IndexNullableSettings', - full_name='immudb.schema.IndexNullableSettings', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='flushThreshold', full_name='immudb.schema.IndexNullableSettings.flushThreshold', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='syncThreshold', full_name='immudb.schema.IndexNullableSettings.syncThreshold', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='cacheSize', full_name='immudb.schema.IndexNullableSettings.cacheSize', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maxNodeSize', full_name='immudb.schema.IndexNullableSettings.maxNodeSize', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='maxActiveSnapshots', full_name='immudb.schema.IndexNullableSettings.maxActiveSnapshots', index=4, - number=5, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='renewSnapRootAfter', full_name='immudb.schema.IndexNullableSettings.renewSnapRootAfter', index=5, - number=6, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='compactionThld', full_name='immudb.schema.IndexNullableSettings.compactionThld', index=6, - number=7, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='delayDuringCompaction', full_name='immudb.schema.IndexNullableSettings.delayDuringCompaction', index=7, - number=8, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='nodesLogMaxOpenedFiles', full_name='immudb.schema.IndexNullableSettings.nodesLogMaxOpenedFiles', index=8, - number=9, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='historyLogMaxOpenedFiles', full_name='immudb.schema.IndexNullableSettings.historyLogMaxOpenedFiles', index=9, - number=10, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='commitLogMaxOpenedFiles', full_name='immudb.schema.IndexNullableSettings.commitLogMaxOpenedFiles', index=10, - number=11, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='flushBufferSize', full_name='immudb.schema.IndexNullableSettings.flushBufferSize', index=11, - number=12, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='cleanupPercentage', full_name='immudb.schema.IndexNullableSettings.cleanupPercentage', index=12, - number=13, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=8203, - serialized_end=8977, -) - - -_LOADDATABASEREQUEST = _descriptor.Descriptor( - name='LoadDatabaseRequest', - full_name='immudb.schema.LoadDatabaseRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.LoadDatabaseRequest.database', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=8979, - serialized_end=9018, -) - - -_LOADDATABASERESPONSE = _descriptor.Descriptor( - name='LoadDatabaseResponse', - full_name='immudb.schema.LoadDatabaseResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.LoadDatabaseResponse.database', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=9020, - serialized_end=9060, -) - - -_UNLOADDATABASEREQUEST = _descriptor.Descriptor( - name='UnloadDatabaseRequest', - full_name='immudb.schema.UnloadDatabaseRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.UnloadDatabaseRequest.database', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=9062, - serialized_end=9103, -) - - -_UNLOADDATABASERESPONSE = _descriptor.Descriptor( - name='UnloadDatabaseResponse', - full_name='immudb.schema.UnloadDatabaseResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.UnloadDatabaseResponse.database', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=9105, - serialized_end=9147, -) - - -_DELETEDATABASEREQUEST = _descriptor.Descriptor( - name='DeleteDatabaseRequest', - full_name='immudb.schema.DeleteDatabaseRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.DeleteDatabaseRequest.database', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=9149, - serialized_end=9190, -) - - -_DELETEDATABASERESPONSE = _descriptor.Descriptor( - name='DeleteDatabaseResponse', - full_name='immudb.schema.DeleteDatabaseResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.DeleteDatabaseResponse.database', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=9192, - serialized_end=9234, -) - - -_FLUSHINDEXREQUEST = _descriptor.Descriptor( - name='FlushIndexRequest', - full_name='immudb.schema.FlushIndexRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='cleanupPercentage', full_name='immudb.schema.FlushIndexRequest.cleanupPercentage', index=0, - number=1, type=2, cpp_type=6, label=1, - has_default_value=False, default_value=float(0), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='synced', full_name='immudb.schema.FlushIndexRequest.synced', index=1, - number=2, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=9236, - serialized_end=9298, -) - - -_FLUSHINDEXRESPONSE = _descriptor.Descriptor( - name='FlushIndexResponse', - full_name='immudb.schema.FlushIndexResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.FlushIndexResponse.database', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=9300, - serialized_end=9338, -) - - -_TABLE = _descriptor.Descriptor( - name='Table', - full_name='immudb.schema.Table', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='tableName', full_name='immudb.schema.Table.tableName', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=9340, - serialized_end=9366, -) - - -_SQLGETREQUEST = _descriptor.Descriptor( - name='SQLGetRequest', - full_name='immudb.schema.SQLGetRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='table', full_name='immudb.schema.SQLGetRequest.table', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='pkValues', full_name='immudb.schema.SQLGetRequest.pkValues', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='atTx', full_name='immudb.schema.SQLGetRequest.atTx', index=2, - number=3, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='sinceTx', full_name='immudb.schema.SQLGetRequest.sinceTx', index=3, - number=4, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=9368, - serialized_end=9472, -) - - -_VERIFIABLESQLGETREQUEST = _descriptor.Descriptor( - name='VerifiableSQLGetRequest', - full_name='immudb.schema.VerifiableSQLGetRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='sqlGetRequest', full_name='immudb.schema.VerifiableSQLGetRequest.sqlGetRequest', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='proveSinceTx', full_name='immudb.schema.VerifiableSQLGetRequest.proveSinceTx', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=9474, - serialized_end=9574, -) - - -_SQLENTRY = _descriptor.Descriptor( - name='SQLEntry', - full_name='immudb.schema.SQLEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='tx', full_name='immudb.schema.SQLEntry.tx', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.SQLEntry.key', index=1, - number=2, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.SQLEntry.value', index=2, - number=3, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='metadata', full_name='immudb.schema.SQLEntry.metadata', index=3, - number=4, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=9576, - serialized_end=9671, -) - - -_VERIFIABLESQLENTRY_COLNAMESBYIDENTRY = _descriptor.Descriptor( - name='ColNamesByIdEntry', - full_name='immudb.schema.VerifiableSQLEntry.ColNamesByIdEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.VerifiableSQLEntry.ColNamesByIdEntry.key', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.VerifiableSQLEntry.ColNamesByIdEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=_b('8\001'), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10193, - serialized_end=10244, -) - -_VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY = _descriptor.Descriptor( - name='ColIdsByNameEntry', - full_name='immudb.schema.VerifiableSQLEntry.ColIdsByNameEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.VerifiableSQLEntry.ColIdsByNameEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.VerifiableSQLEntry.ColIdsByNameEntry.value', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=_b('8\001'), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10246, - serialized_end=10297, -) - -_VERIFIABLESQLENTRY_COLTYPESBYIDENTRY = _descriptor.Descriptor( - name='ColTypesByIdEntry', - full_name='immudb.schema.VerifiableSQLEntry.ColTypesByIdEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.VerifiableSQLEntry.ColTypesByIdEntry.key', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.VerifiableSQLEntry.ColTypesByIdEntry.value', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=_b('8\001'), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10299, - serialized_end=10350, -) - -_VERIFIABLESQLENTRY_COLLENBYIDENTRY = _descriptor.Descriptor( - name='ColLenByIdEntry', - full_name='immudb.schema.VerifiableSQLEntry.ColLenByIdEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.VerifiableSQLEntry.ColLenByIdEntry.key', index=0, - number=1, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.VerifiableSQLEntry.ColLenByIdEntry.value', index=1, - number=2, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=_b('8\001'), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10352, - serialized_end=10401, -) - -_VERIFIABLESQLENTRY = _descriptor.Descriptor( - name='VerifiableSQLEntry', - full_name='immudb.schema.VerifiableSQLEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='sqlEntry', full_name='immudb.schema.VerifiableSQLEntry.sqlEntry', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='verifiableTx', full_name='immudb.schema.VerifiableSQLEntry.verifiableTx', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='inclusionProof', full_name='immudb.schema.VerifiableSQLEntry.inclusionProof', index=2, - number=3, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='DatabaseId', full_name='immudb.schema.VerifiableSQLEntry.DatabaseId', index=3, - number=4, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='TableId', full_name='immudb.schema.VerifiableSQLEntry.TableId', index=4, - number=5, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='PKIDs', full_name='immudb.schema.VerifiableSQLEntry.PKIDs', index=5, - number=16, type=13, cpp_type=3, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='ColNamesById', full_name='immudb.schema.VerifiableSQLEntry.ColNamesById', index=6, - number=8, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='ColIdsByName', full_name='immudb.schema.VerifiableSQLEntry.ColIdsByName', index=7, - number=9, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='ColTypesById', full_name='immudb.schema.VerifiableSQLEntry.ColTypesById', index=8, - number=10, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='ColLenById', full_name='immudb.schema.VerifiableSQLEntry.ColLenById', index=9, - number=11, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[_VERIFIABLESQLENTRY_COLNAMESBYIDENTRY, _VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY, _VERIFIABLESQLENTRY_COLTYPESBYIDENTRY, _VERIFIABLESQLENTRY_COLLENBYIDENTRY, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=9674, - serialized_end=10407, -) - - -_USEDATABASEREPLY = _descriptor.Descriptor( - name='UseDatabaseReply', - full_name='immudb.schema.UseDatabaseReply', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='token', full_name='immudb.schema.UseDatabaseReply.token', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10409, - serialized_end=10442, -) - - -_CHANGEPERMISSIONREQUEST = _descriptor.Descriptor( - name='ChangePermissionRequest', - full_name='immudb.schema.ChangePermissionRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='action', full_name='immudb.schema.ChangePermissionRequest.action', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='username', full_name='immudb.schema.ChangePermissionRequest.username', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='database', full_name='immudb.schema.ChangePermissionRequest.database', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='permission', full_name='immudb.schema.ChangePermissionRequest.permission', index=3, - number=4, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10445, - serialized_end=10575, -) - - -_SETACTIVEUSERREQUEST = _descriptor.Descriptor( - name='SetActiveUserRequest', - full_name='immudb.schema.SetActiveUserRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='active', full_name='immudb.schema.SetActiveUserRequest.active', index=0, - number=1, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='username', full_name='immudb.schema.SetActiveUserRequest.username', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10577, - serialized_end=10633, -) - - -_DATABASELISTRESPONSE = _descriptor.Descriptor( - name='DatabaseListResponse', - full_name='immudb.schema.DatabaseListResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='databases', full_name='immudb.schema.DatabaseListResponse.databases', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10635, - serialized_end=10701, -) - - -_DATABASELISTREQUESTV2 = _descriptor.Descriptor( - name='DatabaseListRequestV2', - full_name='immudb.schema.DatabaseListRequestV2', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10703, - serialized_end=10726, -) - - -_DATABASELISTRESPONSEV2 = _descriptor.Descriptor( - name='DatabaseListResponseV2', - full_name='immudb.schema.DatabaseListResponseV2', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='databases', full_name='immudb.schema.DatabaseListResponseV2.databases', index=0, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10728, - serialized_end=10808, -) - - -_DATABASEWITHSETTINGS = _descriptor.Descriptor( - name='DatabaseWithSettings', - full_name='immudb.schema.DatabaseWithSettings', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='immudb.schema.DatabaseWithSettings.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='settings', full_name='immudb.schema.DatabaseWithSettings.settings', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='loaded', full_name='immudb.schema.DatabaseWithSettings.loaded', index=2, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10810, - serialized_end=10921, -) - - -_CHUNK = _descriptor.Descriptor( - name='Chunk', - full_name='immudb.schema.Chunk', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='content', full_name='immudb.schema.Chunk.content', index=0, - number=1, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10923, - serialized_end=10947, -) - - -_USESNAPSHOTREQUEST = _descriptor.Descriptor( - name='UseSnapshotRequest', - full_name='immudb.schema.UseSnapshotRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='sinceTx', full_name='immudb.schema.UseSnapshotRequest.sinceTx', index=0, - number=1, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='asBeforeTx', full_name='immudb.schema.UseSnapshotRequest.asBeforeTx', index=1, - number=2, type=4, cpp_type=4, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=10949, - serialized_end=11006, -) - - -_SQLEXECREQUEST = _descriptor.Descriptor( - name='SQLExecRequest', - full_name='immudb.schema.SQLExecRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='sql', full_name='immudb.schema.SQLExecRequest.sql', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='params', full_name='immudb.schema.SQLExecRequest.params', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='noWait', full_name='immudb.schema.SQLExecRequest.noWait', index=2, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=11008, - serialized_end=11096, -) - - -_SQLQUERYREQUEST = _descriptor.Descriptor( - name='SQLQueryRequest', - full_name='immudb.schema.SQLQueryRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='sql', full_name='immudb.schema.SQLQueryRequest.sql', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='params', full_name='immudb.schema.SQLQueryRequest.params', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='reuseSnapshot', full_name='immudb.schema.SQLQueryRequest.reuseSnapshot', index=2, - number=3, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=11098, - serialized_end=11194, -) - - -_NAMEDPARAM = _descriptor.Descriptor( - name='NamedParam', - full_name='immudb.schema.NamedParam', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='immudb.schema.NamedParam.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.NamedParam.value', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=11196, - serialized_end=11262, -) - - -_SQLEXECRESULT = _descriptor.Descriptor( - name='SQLExecResult', - full_name='immudb.schema.SQLExecResult', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='txs', full_name='immudb.schema.SQLExecResult.txs', index=0, - number=5, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='ongoingTx', full_name='immudb.schema.SQLExecResult.ongoingTx', index=1, - number=6, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=11264, - serialized_end=11342, -) - - -_COMMITTEDSQLTX_LASTINSERTEDPKSENTRY = _descriptor.Descriptor( - name='LastInsertedPKsEntry', - full_name='immudb.schema.CommittedSQLTx.LastInsertedPKsEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.CommittedSQLTx.LastInsertedPKsEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.CommittedSQLTx.LastInsertedPKsEntry.value', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=_b('8\001'), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=11581, - serialized_end=11660, -) - -_COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY = _descriptor.Descriptor( - name='FirstInsertedPKsEntry', - full_name='immudb.schema.CommittedSQLTx.FirstInsertedPKsEntry', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='key', full_name='immudb.schema.CommittedSQLTx.FirstInsertedPKsEntry.key', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.CommittedSQLTx.FirstInsertedPKsEntry.value', index=1, - number=2, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=_b('8\001'), - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=11662, - serialized_end=11742, -) - -_COMMITTEDSQLTX = _descriptor.Descriptor( - name='CommittedSQLTx', - full_name='immudb.schema.CommittedSQLTx', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='header', full_name='immudb.schema.CommittedSQLTx.header', index=0, - number=1, type=11, cpp_type=10, label=1, - has_default_value=False, default_value=None, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='updatedRows', full_name='immudb.schema.CommittedSQLTx.updatedRows', index=1, - number=2, type=13, cpp_type=3, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='lastInsertedPKs', full_name='immudb.schema.CommittedSQLTx.lastInsertedPKs', index=2, - number=3, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='firstInsertedPKs', full_name='immudb.schema.CommittedSQLTx.firstInsertedPKs', index=3, - number=4, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[_COMMITTEDSQLTX_LASTINSERTEDPKSENTRY, _COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY, ], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=11345, - serialized_end=11742, -) - - -_SQLQUERYRESULT = _descriptor.Descriptor( - name='SQLQueryResult', - full_name='immudb.schema.SQLQueryResult', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='columns', full_name='immudb.schema.SQLQueryResult.columns', index=0, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='rows', full_name='immudb.schema.SQLQueryResult.rows', index=1, - number=1, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=11744, - serialized_end=11834, -) - - -_COLUMN = _descriptor.Descriptor( - name='Column', - full_name='immudb.schema.Column', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='name', full_name='immudb.schema.Column.name', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='type', full_name='immudb.schema.Column.type', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=11836, - serialized_end=11872, -) - - -_ROW = _descriptor.Descriptor( - name='Row', - full_name='immudb.schema.Row', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='columns', full_name='immudb.schema.Row.columns', index=0, - number=1, type=9, cpp_type=9, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='values', full_name='immudb.schema.Row.values', index=1, - number=2, type=11, cpp_type=10, label=3, - has_default_value=False, default_value=[], - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=11874, - serialized_end=11937, -) - - -_SQLVALUE = _descriptor.Descriptor( - name='SQLValue', - full_name='immudb.schema.SQLValue', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='null', full_name='immudb.schema.SQLValue.null', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='n', full_name='immudb.schema.SQLValue.n', index=1, - number=2, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='s', full_name='immudb.schema.SQLValue.s', index=2, - number=3, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='b', full_name='immudb.schema.SQLValue.b', index=3, - number=4, type=8, cpp_type=7, label=1, - has_default_value=False, default_value=False, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='bs', full_name='immudb.schema.SQLValue.bs', index=4, - number=5, type=12, cpp_type=9, label=1, - has_default_value=False, default_value=_b(""), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='ts', full_name='immudb.schema.SQLValue.ts', index=5, - number=6, type=3, cpp_type=2, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - _descriptor.OneofDescriptor( - name='value', full_name='immudb.schema.SQLValue.value', - index=0, containing_type=None, fields=[]), - ], - serialized_start=11940, - serialized_end=12070, -) - - -_NEWTXREQUEST = _descriptor.Descriptor( - name='NewTxRequest', - full_name='immudb.schema.NewTxRequest', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='mode', full_name='immudb.schema.NewTxRequest.mode', index=0, - number=1, type=14, cpp_type=8, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=12072, - serialized_end=12123, -) - - -_NEWTXRESPONSE = _descriptor.Descriptor( - name='NewTxResponse', - full_name='immudb.schema.NewTxResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='transactionID', full_name='immudb.schema.NewTxResponse.transactionID', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=12125, - serialized_end=12163, -) - - -_ERRORINFO = _descriptor.Descriptor( - name='ErrorInfo', - full_name='immudb.schema.ErrorInfo', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='code', full_name='immudb.schema.ErrorInfo.code', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - _descriptor.FieldDescriptor( - name='cause', full_name='immudb.schema.ErrorInfo.cause', index=1, - number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=12165, - serialized_end=12205, -) - - -_DEBUGINFO = _descriptor.Descriptor( - name='DebugInfo', - full_name='immudb.schema.DebugInfo', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='stack', full_name='immudb.schema.DebugInfo.stack', index=0, - number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=_b("").decode('utf-8'), - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=12207, - serialized_end=12233, -) - - -_RETRYINFO = _descriptor.Descriptor( - name='RetryInfo', - full_name='immudb.schema.RetryInfo', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='retry_delay', full_name='immudb.schema.RetryInfo.retry_delay', index=0, - number=1, type=5, cpp_type=1, label=1, - has_default_value=False, default_value=0, - message_type=None, enum_type=None, containing_type=None, - is_extension=False, extension_scope=None, - serialized_options=None, file=DESCRIPTOR), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=12235, - serialized_end=12267, -) - -_USER.fields_by_name['permissions'].message_type = _PERMISSION -_USERLIST.fields_by_name['users'].message_type = _USER -_PRECONDITION_KEYMUSTEXISTPRECONDITION.containing_type = _PRECONDITION -_PRECONDITION_KEYMUSTNOTEXISTPRECONDITION.containing_type = _PRECONDITION -_PRECONDITION_KEYNOTMODIFIEDAFTERTXPRECONDITION.containing_type = _PRECONDITION -_PRECONDITION.fields_by_name['keyMustExist'].message_type = _PRECONDITION_KEYMUSTEXISTPRECONDITION -_PRECONDITION.fields_by_name['keyMustNotExist'].message_type = _PRECONDITION_KEYMUSTNOTEXISTPRECONDITION -_PRECONDITION.fields_by_name['keyNotModifiedAfterTX'].message_type = _PRECONDITION_KEYNOTMODIFIEDAFTERTXPRECONDITION -_PRECONDITION.oneofs_by_name['precondition'].fields.append( - _PRECONDITION.fields_by_name['keyMustExist']) -_PRECONDITION.fields_by_name['keyMustExist'].containing_oneof = _PRECONDITION.oneofs_by_name['precondition'] -_PRECONDITION.oneofs_by_name['precondition'].fields.append( - _PRECONDITION.fields_by_name['keyMustNotExist']) -_PRECONDITION.fields_by_name['keyMustNotExist'].containing_oneof = _PRECONDITION.oneofs_by_name['precondition'] -_PRECONDITION.oneofs_by_name['precondition'].fields.append( - _PRECONDITION.fields_by_name['keyNotModifiedAfterTX']) -_PRECONDITION.fields_by_name['keyNotModifiedAfterTX'].containing_oneof = _PRECONDITION.oneofs_by_name['precondition'] -_KEYVALUE.fields_by_name['metadata'].message_type = _KVMETADATA -_ENTRY.fields_by_name['referencedBy'].message_type = _REFERENCE -_ENTRY.fields_by_name['metadata'].message_type = _KVMETADATA -_REFERENCE.fields_by_name['metadata'].message_type = _KVMETADATA -_OP.fields_by_name['kv'].message_type = _KEYVALUE -_OP.fields_by_name['zAdd'].message_type = _ZADDREQUEST -_OP.fields_by_name['ref'].message_type = _REFERENCEREQUEST -_OP.oneofs_by_name['operation'].fields.append( - _OP.fields_by_name['kv']) -_OP.fields_by_name['kv'].containing_oneof = _OP.oneofs_by_name['operation'] -_OP.oneofs_by_name['operation'].fields.append( - _OP.fields_by_name['zAdd']) -_OP.fields_by_name['zAdd'].containing_oneof = _OP.oneofs_by_name['operation'] -_OP.oneofs_by_name['operation'].fields.append( - _OP.fields_by_name['ref']) -_OP.fields_by_name['ref'].containing_oneof = _OP.oneofs_by_name['operation'] -_EXECALLREQUEST.fields_by_name['Operations'].message_type = _OP -_EXECALLREQUEST.fields_by_name['preconditions'].message_type = _PRECONDITION -_ENTRIES.fields_by_name['entries'].message_type = _ENTRY -_ZENTRY.fields_by_name['entry'].message_type = _ENTRY -_ZENTRIES.fields_by_name['entries'].message_type = _ZENTRY -_TXHEADER.fields_by_name['metadata'].message_type = _TXMETADATA -_DUALPROOF.fields_by_name['sourceTxHeader'].message_type = _TXHEADER -_DUALPROOF.fields_by_name['targetTxHeader'].message_type = _TXHEADER -_DUALPROOF.fields_by_name['linearProof'].message_type = _LINEARPROOF -_TX.fields_by_name['header'].message_type = _TXHEADER -_TX.fields_by_name['entries'].message_type = _TXENTRY -_TX.fields_by_name['kvEntries'].message_type = _ENTRY -_TX.fields_by_name['zEntries'].message_type = _ZENTRY -_TXENTRY.fields_by_name['metadata'].message_type = _KVMETADATA -_KVMETADATA.fields_by_name['expiration'].message_type = _EXPIRATION -_VERIFIABLETX.fields_by_name['tx'].message_type = _TX -_VERIFIABLETX.fields_by_name['dualProof'].message_type = _DUALPROOF -_VERIFIABLETX.fields_by_name['signature'].message_type = _SIGNATURE -_VERIFIABLEENTRY.fields_by_name['entry'].message_type = _ENTRY -_VERIFIABLEENTRY.fields_by_name['verifiableTx'].message_type = _VERIFIABLETX -_VERIFIABLEENTRY.fields_by_name['inclusionProof'].message_type = _INCLUSIONPROOF -_SETREQUEST.fields_by_name['KVs'].message_type = _KEYVALUE -_SETREQUEST.fields_by_name['preconditions'].message_type = _PRECONDITION -_VERIFIABLESETREQUEST.fields_by_name['setRequest'].message_type = _SETREQUEST -_VERIFIABLEGETREQUEST.fields_by_name['keyRequest'].message_type = _KEYREQUEST -_IMMUTABLESTATE.fields_by_name['signature'].message_type = _SIGNATURE -_REFERENCEREQUEST.fields_by_name['preconditions'].message_type = _PRECONDITION -_VERIFIABLEREFERENCEREQUEST.fields_by_name['referenceRequest'].message_type = _REFERENCEREQUEST -_ZSCANREQUEST.fields_by_name['minScore'].message_type = _SCORE -_ZSCANREQUEST.fields_by_name['maxScore'].message_type = _SCORE -_VERIFIABLEZADDREQUEST.fields_by_name['zAddRequest'].message_type = _ZADDREQUEST -_TXREQUEST.fields_by_name['entriesSpec'].message_type = _ENTRIESSPEC -_ENTRIESSPEC.fields_by_name['kvEntriesSpec'].message_type = _ENTRYTYPESPEC -_ENTRIESSPEC.fields_by_name['zEntriesSpec'].message_type = _ENTRYTYPESPEC -_ENTRIESSPEC.fields_by_name['sqlEntriesSpec'].message_type = _ENTRYTYPESPEC -_ENTRYTYPESPEC.fields_by_name['action'].enum_type = _ENTRYTYPEACTION -_VERIFIABLETXREQUEST.fields_by_name['entriesSpec'].message_type = _ENTRIESSPEC -_TXSCANREQUEST.fields_by_name['entriesSpec'].message_type = _ENTRIESSPEC -_TXLIST.fields_by_name['txs'].message_type = _TX -_CREATEDATABASEREQUEST.fields_by_name['settings'].message_type = _DATABASENULLABLESETTINGS -_CREATEDATABASERESPONSE.fields_by_name['settings'].message_type = _DATABASENULLABLESETTINGS -_UPDATEDATABASEREQUEST.fields_by_name['settings'].message_type = _DATABASENULLABLESETTINGS -_UPDATEDATABASERESPONSE.fields_by_name['settings'].message_type = _DATABASENULLABLESETTINGS -_DATABASESETTINGSRESPONSE.fields_by_name['settings'].message_type = _DATABASENULLABLESETTINGS -_DATABASENULLABLESETTINGS.fields_by_name['replicationSettings'].message_type = _REPLICATIONNULLABLESETTINGS -_DATABASENULLABLESETTINGS.fields_by_name['fileSize'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['maxKeyLen'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['maxValueLen'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['maxTxEntries'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['excludeCommitTime'].message_type = _NULLABLEBOOL -_DATABASENULLABLESETTINGS.fields_by_name['maxConcurrency'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['maxIOConcurrency'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['txLogCacheSize'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['vLogMaxOpenedFiles'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['txLogMaxOpenedFiles'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['commitLogMaxOpenedFiles'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['indexSettings'].message_type = _INDEXNULLABLESETTINGS -_DATABASENULLABLESETTINGS.fields_by_name['writeTxHeaderVersion'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['autoload'].message_type = _NULLABLEBOOL -_REPLICATIONNULLABLESETTINGS.fields_by_name['replica'].message_type = _NULLABLEBOOL -_REPLICATIONNULLABLESETTINGS.fields_by_name['masterDatabase'].message_type = _NULLABLESTRING -_REPLICATIONNULLABLESETTINGS.fields_by_name['masterAddress'].message_type = _NULLABLESTRING -_REPLICATIONNULLABLESETTINGS.fields_by_name['masterPort'].message_type = _NULLABLEUINT32 -_REPLICATIONNULLABLESETTINGS.fields_by_name['followerUsername'].message_type = _NULLABLESTRING -_REPLICATIONNULLABLESETTINGS.fields_by_name['followerPassword'].message_type = _NULLABLESTRING -_INDEXNULLABLESETTINGS.fields_by_name['flushThreshold'].message_type = _NULLABLEUINT32 -_INDEXNULLABLESETTINGS.fields_by_name['syncThreshold'].message_type = _NULLABLEUINT32 -_INDEXNULLABLESETTINGS.fields_by_name['cacheSize'].message_type = _NULLABLEUINT32 -_INDEXNULLABLESETTINGS.fields_by_name['maxNodeSize'].message_type = _NULLABLEUINT32 -_INDEXNULLABLESETTINGS.fields_by_name['maxActiveSnapshots'].message_type = _NULLABLEUINT32 -_INDEXNULLABLESETTINGS.fields_by_name['renewSnapRootAfter'].message_type = _NULLABLEUINT64 -_INDEXNULLABLESETTINGS.fields_by_name['compactionThld'].message_type = _NULLABLEUINT32 -_INDEXNULLABLESETTINGS.fields_by_name['delayDuringCompaction'].message_type = _NULLABLEUINT32 -_INDEXNULLABLESETTINGS.fields_by_name['nodesLogMaxOpenedFiles'].message_type = _NULLABLEUINT32 -_INDEXNULLABLESETTINGS.fields_by_name['historyLogMaxOpenedFiles'].message_type = _NULLABLEUINT32 -_INDEXNULLABLESETTINGS.fields_by_name['commitLogMaxOpenedFiles'].message_type = _NULLABLEUINT32 -_INDEXNULLABLESETTINGS.fields_by_name['flushBufferSize'].message_type = _NULLABLEUINT32 -_INDEXNULLABLESETTINGS.fields_by_name['cleanupPercentage'].message_type = _NULLABLEFLOAT -_SQLGETREQUEST.fields_by_name['pkValues'].message_type = _SQLVALUE -_VERIFIABLESQLGETREQUEST.fields_by_name['sqlGetRequest'].message_type = _SQLGETREQUEST -_SQLENTRY.fields_by_name['metadata'].message_type = _KVMETADATA -_VERIFIABLESQLENTRY_COLNAMESBYIDENTRY.containing_type = _VERIFIABLESQLENTRY -_VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY.containing_type = _VERIFIABLESQLENTRY -_VERIFIABLESQLENTRY_COLTYPESBYIDENTRY.containing_type = _VERIFIABLESQLENTRY -_VERIFIABLESQLENTRY_COLLENBYIDENTRY.containing_type = _VERIFIABLESQLENTRY -_VERIFIABLESQLENTRY.fields_by_name['sqlEntry'].message_type = _SQLENTRY -_VERIFIABLESQLENTRY.fields_by_name['verifiableTx'].message_type = _VERIFIABLETX -_VERIFIABLESQLENTRY.fields_by_name['inclusionProof'].message_type = _INCLUSIONPROOF -_VERIFIABLESQLENTRY.fields_by_name['ColNamesById'].message_type = _VERIFIABLESQLENTRY_COLNAMESBYIDENTRY -_VERIFIABLESQLENTRY.fields_by_name['ColIdsByName'].message_type = _VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY -_VERIFIABLESQLENTRY.fields_by_name['ColTypesById'].message_type = _VERIFIABLESQLENTRY_COLTYPESBYIDENTRY -_VERIFIABLESQLENTRY.fields_by_name['ColLenById'].message_type = _VERIFIABLESQLENTRY_COLLENBYIDENTRY -_CHANGEPERMISSIONREQUEST.fields_by_name['action'].enum_type = _PERMISSIONACTION -_DATABASELISTRESPONSE.fields_by_name['databases'].message_type = _DATABASE -_DATABASELISTRESPONSEV2.fields_by_name['databases'].message_type = _DATABASEWITHSETTINGS -_DATABASEWITHSETTINGS.fields_by_name['settings'].message_type = _DATABASENULLABLESETTINGS -_SQLEXECREQUEST.fields_by_name['params'].message_type = _NAMEDPARAM -_SQLQUERYREQUEST.fields_by_name['params'].message_type = _NAMEDPARAM -_NAMEDPARAM.fields_by_name['value'].message_type = _SQLVALUE -_SQLEXECRESULT.fields_by_name['txs'].message_type = _COMMITTEDSQLTX -_COMMITTEDSQLTX_LASTINSERTEDPKSENTRY.fields_by_name['value'].message_type = _SQLVALUE -_COMMITTEDSQLTX_LASTINSERTEDPKSENTRY.containing_type = _COMMITTEDSQLTX -_COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY.fields_by_name['value'].message_type = _SQLVALUE -_COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY.containing_type = _COMMITTEDSQLTX -_COMMITTEDSQLTX.fields_by_name['header'].message_type = _TXHEADER -_COMMITTEDSQLTX.fields_by_name['lastInsertedPKs'].message_type = _COMMITTEDSQLTX_LASTINSERTEDPKSENTRY -_COMMITTEDSQLTX.fields_by_name['firstInsertedPKs'].message_type = _COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY -_SQLQUERYRESULT.fields_by_name['columns'].message_type = _COLUMN -_SQLQUERYRESULT.fields_by_name['rows'].message_type = _ROW -_ROW.fields_by_name['values'].message_type = _SQLVALUE -_SQLVALUE.fields_by_name['null'].enum_type = google_dot_protobuf_dot_struct__pb2._NULLVALUE -_SQLVALUE.oneofs_by_name['value'].fields.append( - _SQLVALUE.fields_by_name['null']) -_SQLVALUE.fields_by_name['null'].containing_oneof = _SQLVALUE.oneofs_by_name['value'] -_SQLVALUE.oneofs_by_name['value'].fields.append( - _SQLVALUE.fields_by_name['n']) -_SQLVALUE.fields_by_name['n'].containing_oneof = _SQLVALUE.oneofs_by_name['value'] -_SQLVALUE.oneofs_by_name['value'].fields.append( - _SQLVALUE.fields_by_name['s']) -_SQLVALUE.fields_by_name['s'].containing_oneof = _SQLVALUE.oneofs_by_name['value'] -_SQLVALUE.oneofs_by_name['value'].fields.append( - _SQLVALUE.fields_by_name['b']) -_SQLVALUE.fields_by_name['b'].containing_oneof = _SQLVALUE.oneofs_by_name['value'] -_SQLVALUE.oneofs_by_name['value'].fields.append( - _SQLVALUE.fields_by_name['bs']) -_SQLVALUE.fields_by_name['bs'].containing_oneof = _SQLVALUE.oneofs_by_name['value'] -_SQLVALUE.oneofs_by_name['value'].fields.append( - _SQLVALUE.fields_by_name['ts']) -_SQLVALUE.fields_by_name['ts'].containing_oneof = _SQLVALUE.oneofs_by_name['value'] -_NEWTXREQUEST.fields_by_name['mode'].enum_type = _TXMODE -DESCRIPTOR.message_types_by_name['Key'] = _KEY -DESCRIPTOR.message_types_by_name['Permission'] = _PERMISSION -DESCRIPTOR.message_types_by_name['User'] = _USER -DESCRIPTOR.message_types_by_name['UserList'] = _USERLIST -DESCRIPTOR.message_types_by_name['CreateUserRequest'] = _CREATEUSERREQUEST -DESCRIPTOR.message_types_by_name['UserRequest'] = _USERREQUEST -DESCRIPTOR.message_types_by_name['ChangePasswordRequest'] = _CHANGEPASSWORDREQUEST -DESCRIPTOR.message_types_by_name['LoginRequest'] = _LOGINREQUEST -DESCRIPTOR.message_types_by_name['LoginResponse'] = _LOGINRESPONSE -DESCRIPTOR.message_types_by_name['AuthConfig'] = _AUTHCONFIG -DESCRIPTOR.message_types_by_name['MTLSConfig'] = _MTLSCONFIG -DESCRIPTOR.message_types_by_name['OpenSessionRequest'] = _OPENSESSIONREQUEST -DESCRIPTOR.message_types_by_name['OpenSessionResponse'] = _OPENSESSIONRESPONSE -DESCRIPTOR.message_types_by_name['Precondition'] = _PRECONDITION -DESCRIPTOR.message_types_by_name['KeyValue'] = _KEYVALUE -DESCRIPTOR.message_types_by_name['Entry'] = _ENTRY -DESCRIPTOR.message_types_by_name['Reference'] = _REFERENCE -DESCRIPTOR.message_types_by_name['Op'] = _OP -DESCRIPTOR.message_types_by_name['ExecAllRequest'] = _EXECALLREQUEST -DESCRIPTOR.message_types_by_name['Entries'] = _ENTRIES -DESCRIPTOR.message_types_by_name['ZEntry'] = _ZENTRY -DESCRIPTOR.message_types_by_name['ZEntries'] = _ZENTRIES -DESCRIPTOR.message_types_by_name['ScanRequest'] = _SCANREQUEST -DESCRIPTOR.message_types_by_name['KeyPrefix'] = _KEYPREFIX -DESCRIPTOR.message_types_by_name['EntryCount'] = _ENTRYCOUNT -DESCRIPTOR.message_types_by_name['Signature'] = _SIGNATURE -DESCRIPTOR.message_types_by_name['TxHeader'] = _TXHEADER -DESCRIPTOR.message_types_by_name['TxMetadata'] = _TXMETADATA -DESCRIPTOR.message_types_by_name['LinearProof'] = _LINEARPROOF -DESCRIPTOR.message_types_by_name['DualProof'] = _DUALPROOF -DESCRIPTOR.message_types_by_name['Tx'] = _TX -DESCRIPTOR.message_types_by_name['TxEntry'] = _TXENTRY -DESCRIPTOR.message_types_by_name['KVMetadata'] = _KVMETADATA -DESCRIPTOR.message_types_by_name['Expiration'] = _EXPIRATION -DESCRIPTOR.message_types_by_name['VerifiableTx'] = _VERIFIABLETX -DESCRIPTOR.message_types_by_name['VerifiableEntry'] = _VERIFIABLEENTRY -DESCRIPTOR.message_types_by_name['InclusionProof'] = _INCLUSIONPROOF -DESCRIPTOR.message_types_by_name['SetRequest'] = _SETREQUEST -DESCRIPTOR.message_types_by_name['KeyRequest'] = _KEYREQUEST -DESCRIPTOR.message_types_by_name['KeyListRequest'] = _KEYLISTREQUEST -DESCRIPTOR.message_types_by_name['DeleteKeysRequest'] = _DELETEKEYSREQUEST -DESCRIPTOR.message_types_by_name['VerifiableSetRequest'] = _VERIFIABLESETREQUEST -DESCRIPTOR.message_types_by_name['VerifiableGetRequest'] = _VERIFIABLEGETREQUEST -DESCRIPTOR.message_types_by_name['HealthResponse'] = _HEALTHRESPONSE -DESCRIPTOR.message_types_by_name['DatabaseHealthResponse'] = _DATABASEHEALTHRESPONSE -DESCRIPTOR.message_types_by_name['ImmutableState'] = _IMMUTABLESTATE -DESCRIPTOR.message_types_by_name['ReferenceRequest'] = _REFERENCEREQUEST -DESCRIPTOR.message_types_by_name['VerifiableReferenceRequest'] = _VERIFIABLEREFERENCEREQUEST -DESCRIPTOR.message_types_by_name['ZAddRequest'] = _ZADDREQUEST -DESCRIPTOR.message_types_by_name['Score'] = _SCORE -DESCRIPTOR.message_types_by_name['ZScanRequest'] = _ZSCANREQUEST -DESCRIPTOR.message_types_by_name['HistoryRequest'] = _HISTORYREQUEST -DESCRIPTOR.message_types_by_name['VerifiableZAddRequest'] = _VERIFIABLEZADDREQUEST -DESCRIPTOR.message_types_by_name['TxRequest'] = _TXREQUEST -DESCRIPTOR.message_types_by_name['EntriesSpec'] = _ENTRIESSPEC -DESCRIPTOR.message_types_by_name['EntryTypeSpec'] = _ENTRYTYPESPEC -DESCRIPTOR.message_types_by_name['VerifiableTxRequest'] = _VERIFIABLETXREQUEST -DESCRIPTOR.message_types_by_name['TxScanRequest'] = _TXSCANREQUEST -DESCRIPTOR.message_types_by_name['TxList'] = _TXLIST -DESCRIPTOR.message_types_by_name['ExportTxRequest'] = _EXPORTTXREQUEST -DESCRIPTOR.message_types_by_name['Database'] = _DATABASE -DESCRIPTOR.message_types_by_name['DatabaseSettings'] = _DATABASESETTINGS -DESCRIPTOR.message_types_by_name['CreateDatabaseRequest'] = _CREATEDATABASEREQUEST -DESCRIPTOR.message_types_by_name['CreateDatabaseResponse'] = _CREATEDATABASERESPONSE -DESCRIPTOR.message_types_by_name['UpdateDatabaseRequest'] = _UPDATEDATABASEREQUEST -DESCRIPTOR.message_types_by_name['UpdateDatabaseResponse'] = _UPDATEDATABASERESPONSE -DESCRIPTOR.message_types_by_name['DatabaseSettingsRequest'] = _DATABASESETTINGSREQUEST -DESCRIPTOR.message_types_by_name['DatabaseSettingsResponse'] = _DATABASESETTINGSRESPONSE -DESCRIPTOR.message_types_by_name['NullableUint32'] = _NULLABLEUINT32 -DESCRIPTOR.message_types_by_name['NullableUint64'] = _NULLABLEUINT64 -DESCRIPTOR.message_types_by_name['NullableFloat'] = _NULLABLEFLOAT -DESCRIPTOR.message_types_by_name['NullableBool'] = _NULLABLEBOOL -DESCRIPTOR.message_types_by_name['NullableString'] = _NULLABLESTRING -DESCRIPTOR.message_types_by_name['DatabaseNullableSettings'] = _DATABASENULLABLESETTINGS -DESCRIPTOR.message_types_by_name['ReplicationNullableSettings'] = _REPLICATIONNULLABLESETTINGS -DESCRIPTOR.message_types_by_name['IndexNullableSettings'] = _INDEXNULLABLESETTINGS -DESCRIPTOR.message_types_by_name['LoadDatabaseRequest'] = _LOADDATABASEREQUEST -DESCRIPTOR.message_types_by_name['LoadDatabaseResponse'] = _LOADDATABASERESPONSE -DESCRIPTOR.message_types_by_name['UnloadDatabaseRequest'] = _UNLOADDATABASEREQUEST -DESCRIPTOR.message_types_by_name['UnloadDatabaseResponse'] = _UNLOADDATABASERESPONSE -DESCRIPTOR.message_types_by_name['DeleteDatabaseRequest'] = _DELETEDATABASEREQUEST -DESCRIPTOR.message_types_by_name['DeleteDatabaseResponse'] = _DELETEDATABASERESPONSE -DESCRIPTOR.message_types_by_name['FlushIndexRequest'] = _FLUSHINDEXREQUEST -DESCRIPTOR.message_types_by_name['FlushIndexResponse'] = _FLUSHINDEXRESPONSE -DESCRIPTOR.message_types_by_name['Table'] = _TABLE -DESCRIPTOR.message_types_by_name['SQLGetRequest'] = _SQLGETREQUEST -DESCRIPTOR.message_types_by_name['VerifiableSQLGetRequest'] = _VERIFIABLESQLGETREQUEST -DESCRIPTOR.message_types_by_name['SQLEntry'] = _SQLENTRY -DESCRIPTOR.message_types_by_name['VerifiableSQLEntry'] = _VERIFIABLESQLENTRY -DESCRIPTOR.message_types_by_name['UseDatabaseReply'] = _USEDATABASEREPLY -DESCRIPTOR.message_types_by_name['ChangePermissionRequest'] = _CHANGEPERMISSIONREQUEST -DESCRIPTOR.message_types_by_name['SetActiveUserRequest'] = _SETACTIVEUSERREQUEST -DESCRIPTOR.message_types_by_name['DatabaseListResponse'] = _DATABASELISTRESPONSE -DESCRIPTOR.message_types_by_name['DatabaseListRequestV2'] = _DATABASELISTREQUESTV2 -DESCRIPTOR.message_types_by_name['DatabaseListResponseV2'] = _DATABASELISTRESPONSEV2 -DESCRIPTOR.message_types_by_name['DatabaseWithSettings'] = _DATABASEWITHSETTINGS -DESCRIPTOR.message_types_by_name['Chunk'] = _CHUNK -DESCRIPTOR.message_types_by_name['UseSnapshotRequest'] = _USESNAPSHOTREQUEST -DESCRIPTOR.message_types_by_name['SQLExecRequest'] = _SQLEXECREQUEST -DESCRIPTOR.message_types_by_name['SQLQueryRequest'] = _SQLQUERYREQUEST -DESCRIPTOR.message_types_by_name['NamedParam'] = _NAMEDPARAM -DESCRIPTOR.message_types_by_name['SQLExecResult'] = _SQLEXECRESULT -DESCRIPTOR.message_types_by_name['CommittedSQLTx'] = _COMMITTEDSQLTX -DESCRIPTOR.message_types_by_name['SQLQueryResult'] = _SQLQUERYRESULT -DESCRIPTOR.message_types_by_name['Column'] = _COLUMN -DESCRIPTOR.message_types_by_name['Row'] = _ROW -DESCRIPTOR.message_types_by_name['SQLValue'] = _SQLVALUE -DESCRIPTOR.message_types_by_name['NewTxRequest'] = _NEWTXREQUEST -DESCRIPTOR.message_types_by_name['NewTxResponse'] = _NEWTXRESPONSE -DESCRIPTOR.message_types_by_name['ErrorInfo'] = _ERRORINFO -DESCRIPTOR.message_types_by_name['DebugInfo'] = _DEBUGINFO -DESCRIPTOR.message_types_by_name['RetryInfo'] = _RETRYINFO -DESCRIPTOR.enum_types_by_name['EntryTypeAction'] = _ENTRYTYPEACTION -DESCRIPTOR.enum_types_by_name['PermissionAction'] = _PERMISSIONACTION -DESCRIPTOR.enum_types_by_name['TxMode'] = _TXMODE -_sym_db.RegisterFileDescriptor(DESCRIPTOR) - +_KEY = DESCRIPTOR.message_types_by_name['Key'] +_PERMISSION = DESCRIPTOR.message_types_by_name['Permission'] +_USER = DESCRIPTOR.message_types_by_name['User'] +_USERLIST = DESCRIPTOR.message_types_by_name['UserList'] +_CREATEUSERREQUEST = DESCRIPTOR.message_types_by_name['CreateUserRequest'] +_USERREQUEST = DESCRIPTOR.message_types_by_name['UserRequest'] +_CHANGEPASSWORDREQUEST = DESCRIPTOR.message_types_by_name['ChangePasswordRequest'] +_LOGINREQUEST = DESCRIPTOR.message_types_by_name['LoginRequest'] +_LOGINRESPONSE = DESCRIPTOR.message_types_by_name['LoginResponse'] +_AUTHCONFIG = DESCRIPTOR.message_types_by_name['AuthConfig'] +_MTLSCONFIG = DESCRIPTOR.message_types_by_name['MTLSConfig'] +_OPENSESSIONREQUEST = DESCRIPTOR.message_types_by_name['OpenSessionRequest'] +_OPENSESSIONRESPONSE = DESCRIPTOR.message_types_by_name['OpenSessionResponse'] +_PRECONDITION = DESCRIPTOR.message_types_by_name['Precondition'] +_PRECONDITION_KEYMUSTEXISTPRECONDITION = _PRECONDITION.nested_types_by_name['KeyMustExistPrecondition'] +_PRECONDITION_KEYMUSTNOTEXISTPRECONDITION = _PRECONDITION.nested_types_by_name['KeyMustNotExistPrecondition'] +_PRECONDITION_KEYNOTMODIFIEDAFTERTXPRECONDITION = _PRECONDITION.nested_types_by_name['KeyNotModifiedAfterTXPrecondition'] +_KEYVALUE = DESCRIPTOR.message_types_by_name['KeyValue'] +_ENTRY = DESCRIPTOR.message_types_by_name['Entry'] +_REFERENCE = DESCRIPTOR.message_types_by_name['Reference'] +_OP = DESCRIPTOR.message_types_by_name['Op'] +_EXECALLREQUEST = DESCRIPTOR.message_types_by_name['ExecAllRequest'] +_ENTRIES = DESCRIPTOR.message_types_by_name['Entries'] +_ZENTRY = DESCRIPTOR.message_types_by_name['ZEntry'] +_ZENTRIES = DESCRIPTOR.message_types_by_name['ZEntries'] +_SCANREQUEST = DESCRIPTOR.message_types_by_name['ScanRequest'] +_KEYPREFIX = DESCRIPTOR.message_types_by_name['KeyPrefix'] +_ENTRYCOUNT = DESCRIPTOR.message_types_by_name['EntryCount'] +_SIGNATURE = DESCRIPTOR.message_types_by_name['Signature'] +_TXHEADER = DESCRIPTOR.message_types_by_name['TxHeader'] +_TXMETADATA = DESCRIPTOR.message_types_by_name['TxMetadata'] +_LINEARPROOF = DESCRIPTOR.message_types_by_name['LinearProof'] +_DUALPROOF = DESCRIPTOR.message_types_by_name['DualProof'] +_TX = DESCRIPTOR.message_types_by_name['Tx'] +_TXENTRY = DESCRIPTOR.message_types_by_name['TxEntry'] +_KVMETADATA = DESCRIPTOR.message_types_by_name['KVMetadata'] +_EXPIRATION = DESCRIPTOR.message_types_by_name['Expiration'] +_VERIFIABLETX = DESCRIPTOR.message_types_by_name['VerifiableTx'] +_VERIFIABLEENTRY = DESCRIPTOR.message_types_by_name['VerifiableEntry'] +_INCLUSIONPROOF = DESCRIPTOR.message_types_by_name['InclusionProof'] +_SETREQUEST = DESCRIPTOR.message_types_by_name['SetRequest'] +_KEYREQUEST = DESCRIPTOR.message_types_by_name['KeyRequest'] +_KEYLISTREQUEST = DESCRIPTOR.message_types_by_name['KeyListRequest'] +_DELETEKEYSREQUEST = DESCRIPTOR.message_types_by_name['DeleteKeysRequest'] +_VERIFIABLESETREQUEST = DESCRIPTOR.message_types_by_name['VerifiableSetRequest'] +_VERIFIABLEGETREQUEST = DESCRIPTOR.message_types_by_name['VerifiableGetRequest'] +_SERVERINFOREQUEST = DESCRIPTOR.message_types_by_name['ServerInfoRequest'] +_SERVERINFORESPONSE = DESCRIPTOR.message_types_by_name['ServerInfoResponse'] +_HEALTHRESPONSE = DESCRIPTOR.message_types_by_name['HealthResponse'] +_DATABASEHEALTHRESPONSE = DESCRIPTOR.message_types_by_name['DatabaseHealthResponse'] +_IMMUTABLESTATE = DESCRIPTOR.message_types_by_name['ImmutableState'] +_REFERENCEREQUEST = DESCRIPTOR.message_types_by_name['ReferenceRequest'] +_VERIFIABLEREFERENCEREQUEST = DESCRIPTOR.message_types_by_name['VerifiableReferenceRequest'] +_ZADDREQUEST = DESCRIPTOR.message_types_by_name['ZAddRequest'] +_SCORE = DESCRIPTOR.message_types_by_name['Score'] +_ZSCANREQUEST = DESCRIPTOR.message_types_by_name['ZScanRequest'] +_HISTORYREQUEST = DESCRIPTOR.message_types_by_name['HistoryRequest'] +_VERIFIABLEZADDREQUEST = DESCRIPTOR.message_types_by_name['VerifiableZAddRequest'] +_TXREQUEST = DESCRIPTOR.message_types_by_name['TxRequest'] +_ENTRIESSPEC = DESCRIPTOR.message_types_by_name['EntriesSpec'] +_ENTRYTYPESPEC = DESCRIPTOR.message_types_by_name['EntryTypeSpec'] +_VERIFIABLETXREQUEST = DESCRIPTOR.message_types_by_name['VerifiableTxRequest'] +_TXSCANREQUEST = DESCRIPTOR.message_types_by_name['TxScanRequest'] +_TXLIST = DESCRIPTOR.message_types_by_name['TxList'] +_EXPORTTXREQUEST = DESCRIPTOR.message_types_by_name['ExportTxRequest'] +_DATABASE = DESCRIPTOR.message_types_by_name['Database'] +_DATABASESETTINGS = DESCRIPTOR.message_types_by_name['DatabaseSettings'] +_CREATEDATABASEREQUEST = DESCRIPTOR.message_types_by_name['CreateDatabaseRequest'] +_CREATEDATABASERESPONSE = DESCRIPTOR.message_types_by_name['CreateDatabaseResponse'] +_UPDATEDATABASEREQUEST = DESCRIPTOR.message_types_by_name['UpdateDatabaseRequest'] +_UPDATEDATABASERESPONSE = DESCRIPTOR.message_types_by_name['UpdateDatabaseResponse'] +_DATABASESETTINGSREQUEST = DESCRIPTOR.message_types_by_name['DatabaseSettingsRequest'] +_DATABASESETTINGSRESPONSE = DESCRIPTOR.message_types_by_name['DatabaseSettingsResponse'] +_NULLABLEUINT32 = DESCRIPTOR.message_types_by_name['NullableUint32'] +_NULLABLEUINT64 = DESCRIPTOR.message_types_by_name['NullableUint64'] +_NULLABLEFLOAT = DESCRIPTOR.message_types_by_name['NullableFloat'] +_NULLABLEBOOL = DESCRIPTOR.message_types_by_name['NullableBool'] +_NULLABLESTRING = DESCRIPTOR.message_types_by_name['NullableString'] +_NULLABLEMILLISECONDS = DESCRIPTOR.message_types_by_name['NullableMilliseconds'] +_DATABASENULLABLESETTINGS = DESCRIPTOR.message_types_by_name['DatabaseNullableSettings'] +_REPLICATIONNULLABLESETTINGS = DESCRIPTOR.message_types_by_name['ReplicationNullableSettings'] +_INDEXNULLABLESETTINGS = DESCRIPTOR.message_types_by_name['IndexNullableSettings'] +_AHTNULLABLESETTINGS = DESCRIPTOR.message_types_by_name['AHTNullableSettings'] +_LOADDATABASEREQUEST = DESCRIPTOR.message_types_by_name['LoadDatabaseRequest'] +_LOADDATABASERESPONSE = DESCRIPTOR.message_types_by_name['LoadDatabaseResponse'] +_UNLOADDATABASEREQUEST = DESCRIPTOR.message_types_by_name['UnloadDatabaseRequest'] +_UNLOADDATABASERESPONSE = DESCRIPTOR.message_types_by_name['UnloadDatabaseResponse'] +_DELETEDATABASEREQUEST = DESCRIPTOR.message_types_by_name['DeleteDatabaseRequest'] +_DELETEDATABASERESPONSE = DESCRIPTOR.message_types_by_name['DeleteDatabaseResponse'] +_FLUSHINDEXREQUEST = DESCRIPTOR.message_types_by_name['FlushIndexRequest'] +_FLUSHINDEXRESPONSE = DESCRIPTOR.message_types_by_name['FlushIndexResponse'] +_TABLE = DESCRIPTOR.message_types_by_name['Table'] +_SQLGETREQUEST = DESCRIPTOR.message_types_by_name['SQLGetRequest'] +_VERIFIABLESQLGETREQUEST = DESCRIPTOR.message_types_by_name['VerifiableSQLGetRequest'] +_SQLENTRY = DESCRIPTOR.message_types_by_name['SQLEntry'] +_VERIFIABLESQLENTRY = DESCRIPTOR.message_types_by_name['VerifiableSQLEntry'] +_VERIFIABLESQLENTRY_COLNAMESBYIDENTRY = _VERIFIABLESQLENTRY.nested_types_by_name['ColNamesByIdEntry'] +_VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY = _VERIFIABLESQLENTRY.nested_types_by_name['ColIdsByNameEntry'] +_VERIFIABLESQLENTRY_COLTYPESBYIDENTRY = _VERIFIABLESQLENTRY.nested_types_by_name['ColTypesByIdEntry'] +_VERIFIABLESQLENTRY_COLLENBYIDENTRY = _VERIFIABLESQLENTRY.nested_types_by_name['ColLenByIdEntry'] +_USEDATABASEREPLY = DESCRIPTOR.message_types_by_name['UseDatabaseReply'] +_CHANGEPERMISSIONREQUEST = DESCRIPTOR.message_types_by_name['ChangePermissionRequest'] +_SETACTIVEUSERREQUEST = DESCRIPTOR.message_types_by_name['SetActiveUserRequest'] +_DATABASELISTRESPONSE = DESCRIPTOR.message_types_by_name['DatabaseListResponse'] +_DATABASELISTREQUESTV2 = DESCRIPTOR.message_types_by_name['DatabaseListRequestV2'] +_DATABASELISTRESPONSEV2 = DESCRIPTOR.message_types_by_name['DatabaseListResponseV2'] +_DATABASEWITHSETTINGS = DESCRIPTOR.message_types_by_name['DatabaseWithSettings'] +_CHUNK = DESCRIPTOR.message_types_by_name['Chunk'] +_USESNAPSHOTREQUEST = DESCRIPTOR.message_types_by_name['UseSnapshotRequest'] +_SQLEXECREQUEST = DESCRIPTOR.message_types_by_name['SQLExecRequest'] +_SQLQUERYREQUEST = DESCRIPTOR.message_types_by_name['SQLQueryRequest'] +_NAMEDPARAM = DESCRIPTOR.message_types_by_name['NamedParam'] +_SQLEXECRESULT = DESCRIPTOR.message_types_by_name['SQLExecResult'] +_COMMITTEDSQLTX = DESCRIPTOR.message_types_by_name['CommittedSQLTx'] +_COMMITTEDSQLTX_LASTINSERTEDPKSENTRY = _COMMITTEDSQLTX.nested_types_by_name['LastInsertedPKsEntry'] +_COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY = _COMMITTEDSQLTX.nested_types_by_name['FirstInsertedPKsEntry'] +_SQLQUERYRESULT = DESCRIPTOR.message_types_by_name['SQLQueryResult'] +_COLUMN = DESCRIPTOR.message_types_by_name['Column'] +_ROW = DESCRIPTOR.message_types_by_name['Row'] +_SQLVALUE = DESCRIPTOR.message_types_by_name['SQLValue'] +_NEWTXREQUEST = DESCRIPTOR.message_types_by_name['NewTxRequest'] +_NEWTXRESPONSE = DESCRIPTOR.message_types_by_name['NewTxResponse'] +_ERRORINFO = DESCRIPTOR.message_types_by_name['ErrorInfo'] +_DEBUGINFO = DESCRIPTOR.message_types_by_name['DebugInfo'] +_RETRYINFO = DESCRIPTOR.message_types_by_name['RetryInfo'] Key = _reflection.GeneratedProtocolMessageType('Key', (_message.Message,), { 'DESCRIPTOR' : _KEY, '__module__' : 'schema_pb2' @@ -6036,6 +487,20 @@ }) _sym_db.RegisterMessage(VerifiableGetRequest) +ServerInfoRequest = _reflection.GeneratedProtocolMessageType('ServerInfoRequest', (_message.Message,), { + 'DESCRIPTOR' : _SERVERINFOREQUEST, + '__module__' : 'schema_pb2' + # @@protoc_insertion_point(class_scope:immudb.schema.ServerInfoRequest) + }) +_sym_db.RegisterMessage(ServerInfoRequest) + +ServerInfoResponse = _reflection.GeneratedProtocolMessageType('ServerInfoResponse', (_message.Message,), { + 'DESCRIPTOR' : _SERVERINFORESPONSE, + '__module__' : 'schema_pb2' + # @@protoc_insertion_point(class_scope:immudb.schema.ServerInfoResponse) + }) +_sym_db.RegisterMessage(ServerInfoResponse) + HealthResponse = _reflection.GeneratedProtocolMessageType('HealthResponse', (_message.Message,), { 'DESCRIPTOR' : _HEALTHRESPONSE, '__module__' : 'schema_pb2' @@ -6246,6 +711,13 @@ }) _sym_db.RegisterMessage(NullableString) +NullableMilliseconds = _reflection.GeneratedProtocolMessageType('NullableMilliseconds', (_message.Message,), { + 'DESCRIPTOR' : _NULLABLEMILLISECONDS, + '__module__' : 'schema_pb2' + # @@protoc_insertion_point(class_scope:immudb.schema.NullableMilliseconds) + }) +_sym_db.RegisterMessage(NullableMilliseconds) + DatabaseNullableSettings = _reflection.GeneratedProtocolMessageType('DatabaseNullableSettings', (_message.Message,), { 'DESCRIPTOR' : _DATABASENULLABLESETTINGS, '__module__' : 'schema_pb2' @@ -6267,6 +739,13 @@ }) _sym_db.RegisterMessage(IndexNullableSettings) +AHTNullableSettings = _reflection.GeneratedProtocolMessageType('AHTNullableSettings', (_message.Message,), { + 'DESCRIPTOR' : _AHTNULLABLESETTINGS, + '__module__' : 'schema_pb2' + # @@protoc_insertion_point(class_scope:immudb.schema.AHTNullableSettings) + }) +_sym_db.RegisterMessage(AHTNullableSettings) + LoadDatabaseRequest = _reflection.GeneratedProtocolMessageType('LoadDatabaseRequest', (_message.Message,), { 'DESCRIPTOR' : _LOADDATABASEREQUEST, '__module__' : 'schema_pb2' @@ -6567,648 +1046,383 @@ }) _sym_db.RegisterMessage(RetryInfo) - -DESCRIPTOR._options = None -_VERIFIABLESQLENTRY_COLNAMESBYIDENTRY._options = None -_VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY._options = None -_VERIFIABLESQLENTRY_COLTYPESBYIDENTRY._options = None -_VERIFIABLESQLENTRY_COLLENBYIDENTRY._options = None -_COMMITTEDSQLTX_LASTINSERTEDPKSENTRY._options = None -_COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY._options = None - -_IMMUSERVICE = _descriptor.ServiceDescriptor( - name='ImmuService', - full_name='immudb.schema.ImmuService', - file=DESCRIPTOR, - index=0, - serialized_options=None, - serialized_start=12444, - serialized_end=17566, - methods=[ - _descriptor.MethodDescriptor( - name='ListUsers', - full_name='immudb.schema.ImmuService.ListUsers', - index=0, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_USERLIST, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='CreateUser', - full_name='immudb.schema.ImmuService.CreateUser', - index=1, - containing_service=None, - input_type=_CREATEUSERREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ChangePassword', - full_name='immudb.schema.ImmuService.ChangePassword', - index=2, - containing_service=None, - input_type=_CHANGEPASSWORDREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ChangePermission', - full_name='immudb.schema.ImmuService.ChangePermission', - index=3, - containing_service=None, - input_type=_CHANGEPERMISSIONREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='SetActiveUser', - full_name='immudb.schema.ImmuService.SetActiveUser', - index=4, - containing_service=None, - input_type=_SETACTIVEUSERREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='UpdateAuthConfig', - full_name='immudb.schema.ImmuService.UpdateAuthConfig', - index=5, - containing_service=None, - input_type=_AUTHCONFIG, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='UpdateMTLSConfig', - full_name='immudb.schema.ImmuService.UpdateMTLSConfig', - index=6, - containing_service=None, - input_type=_MTLSCONFIG, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='OpenSession', - full_name='immudb.schema.ImmuService.OpenSession', - index=7, - containing_service=None, - input_type=_OPENSESSIONREQUEST, - output_type=_OPENSESSIONRESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='CloseSession', - full_name='immudb.schema.ImmuService.CloseSession', - index=8, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='KeepAlive', - full_name='immudb.schema.ImmuService.KeepAlive', - index=9, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='NewTx', - full_name='immudb.schema.ImmuService.NewTx', - index=10, - containing_service=None, - input_type=_NEWTXREQUEST, - output_type=_NEWTXRESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Commit', - full_name='immudb.schema.ImmuService.Commit', - index=11, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_COMMITTEDSQLTX, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Rollback', - full_name='immudb.schema.ImmuService.Rollback', - index=12, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='TxSQLExec', - full_name='immudb.schema.ImmuService.TxSQLExec', - index=13, - containing_service=None, - input_type=_SQLEXECREQUEST, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='TxSQLQuery', - full_name='immudb.schema.ImmuService.TxSQLQuery', - index=14, - containing_service=None, - input_type=_SQLQUERYREQUEST, - output_type=_SQLQUERYRESULT, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Login', - full_name='immudb.schema.ImmuService.Login', - index=15, - containing_service=None, - input_type=_LOGINREQUEST, - output_type=_LOGINRESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Logout', - full_name='immudb.schema.ImmuService.Logout', - index=16, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Set', - full_name='immudb.schema.ImmuService.Set', - index=17, - containing_service=None, - input_type=_SETREQUEST, - output_type=_TXHEADER, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='VerifiableSet', - full_name='immudb.schema.ImmuService.VerifiableSet', - index=18, - containing_service=None, - input_type=_VERIFIABLESETREQUEST, - output_type=_VERIFIABLETX, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Get', - full_name='immudb.schema.ImmuService.Get', - index=19, - containing_service=None, - input_type=_KEYREQUEST, - output_type=_ENTRY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='VerifiableGet', - full_name='immudb.schema.ImmuService.VerifiableGet', - index=20, - containing_service=None, - input_type=_VERIFIABLEGETREQUEST, - output_type=_VERIFIABLEENTRY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Delete', - full_name='immudb.schema.ImmuService.Delete', - index=21, - containing_service=None, - input_type=_DELETEKEYSREQUEST, - output_type=_TXHEADER, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='GetAll', - full_name='immudb.schema.ImmuService.GetAll', - index=22, - containing_service=None, - input_type=_KEYLISTREQUEST, - output_type=_ENTRIES, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ExecAll', - full_name='immudb.schema.ImmuService.ExecAll', - index=23, - containing_service=None, - input_type=_EXECALLREQUEST, - output_type=_TXHEADER, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Scan', - full_name='immudb.schema.ImmuService.Scan', - index=24, - containing_service=None, - input_type=_SCANREQUEST, - output_type=_ENTRIES, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Count', - full_name='immudb.schema.ImmuService.Count', - index=25, - containing_service=None, - input_type=_KEYPREFIX, - output_type=_ENTRYCOUNT, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='CountAll', - full_name='immudb.schema.ImmuService.CountAll', - index=26, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_ENTRYCOUNT, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='TxById', - full_name='immudb.schema.ImmuService.TxById', - index=27, - containing_service=None, - input_type=_TXREQUEST, - output_type=_TX, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='VerifiableTxById', - full_name='immudb.schema.ImmuService.VerifiableTxById', - index=28, - containing_service=None, - input_type=_VERIFIABLETXREQUEST, - output_type=_VERIFIABLETX, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='TxScan', - full_name='immudb.schema.ImmuService.TxScan', - index=29, - containing_service=None, - input_type=_TXSCANREQUEST, - output_type=_TXLIST, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='History', - full_name='immudb.schema.ImmuService.History', - index=30, - containing_service=None, - input_type=_HISTORYREQUEST, - output_type=_ENTRIES, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='Health', - full_name='immudb.schema.ImmuService.Health', - index=31, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_HEALTHRESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='DatabaseHealth', - full_name='immudb.schema.ImmuService.DatabaseHealth', - index=32, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_DATABASEHEALTHRESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='CurrentState', - full_name='immudb.schema.ImmuService.CurrentState', - index=33, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_IMMUTABLESTATE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='SetReference', - full_name='immudb.schema.ImmuService.SetReference', - index=34, - containing_service=None, - input_type=_REFERENCEREQUEST, - output_type=_TXHEADER, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='VerifiableSetReference', - full_name='immudb.schema.ImmuService.VerifiableSetReference', - index=35, - containing_service=None, - input_type=_VERIFIABLEREFERENCEREQUEST, - output_type=_VERIFIABLETX, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ZAdd', - full_name='immudb.schema.ImmuService.ZAdd', - index=36, - containing_service=None, - input_type=_ZADDREQUEST, - output_type=_TXHEADER, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='VerifiableZAdd', - full_name='immudb.schema.ImmuService.VerifiableZAdd', - index=37, - containing_service=None, - input_type=_VERIFIABLEZADDREQUEST, - output_type=_VERIFIABLETX, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ZScan', - full_name='immudb.schema.ImmuService.ZScan', - index=38, - containing_service=None, - input_type=_ZSCANREQUEST, - output_type=_ZENTRIES, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='CreateDatabase', - full_name='immudb.schema.ImmuService.CreateDatabase', - index=39, - containing_service=None, - input_type=_DATABASE, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='CreateDatabaseWith', - full_name='immudb.schema.ImmuService.CreateDatabaseWith', - index=40, - containing_service=None, - input_type=_DATABASESETTINGS, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='CreateDatabaseV2', - full_name='immudb.schema.ImmuService.CreateDatabaseV2', - index=41, - containing_service=None, - input_type=_CREATEDATABASEREQUEST, - output_type=_CREATEDATABASERESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='LoadDatabase', - full_name='immudb.schema.ImmuService.LoadDatabase', - index=42, - containing_service=None, - input_type=_LOADDATABASEREQUEST, - output_type=_LOADDATABASERESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='UnloadDatabase', - full_name='immudb.schema.ImmuService.UnloadDatabase', - index=43, - containing_service=None, - input_type=_UNLOADDATABASEREQUEST, - output_type=_UNLOADDATABASERESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='DeleteDatabase', - full_name='immudb.schema.ImmuService.DeleteDatabase', - index=44, - containing_service=None, - input_type=_DELETEDATABASEREQUEST, - output_type=_DELETEDATABASERESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='DatabaseList', - full_name='immudb.schema.ImmuService.DatabaseList', - index=45, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_DATABASELISTRESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='DatabaseListV2', - full_name='immudb.schema.ImmuService.DatabaseListV2', - index=46, - containing_service=None, - input_type=_DATABASELISTREQUESTV2, - output_type=_DATABASELISTRESPONSEV2, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='UseDatabase', - full_name='immudb.schema.ImmuService.UseDatabase', - index=47, - containing_service=None, - input_type=_DATABASE, - output_type=_USEDATABASEREPLY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='UpdateDatabase', - full_name='immudb.schema.ImmuService.UpdateDatabase', - index=48, - containing_service=None, - input_type=_DATABASESETTINGS, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='UpdateDatabaseV2', - full_name='immudb.schema.ImmuService.UpdateDatabaseV2', - index=49, - containing_service=None, - input_type=_UPDATEDATABASEREQUEST, - output_type=_UPDATEDATABASERESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='GetDatabaseSettings', - full_name='immudb.schema.ImmuService.GetDatabaseSettings', - index=50, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_DATABASESETTINGS, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='GetDatabaseSettingsV2', - full_name='immudb.schema.ImmuService.GetDatabaseSettingsV2', - index=51, - containing_service=None, - input_type=_DATABASESETTINGSREQUEST, - output_type=_DATABASESETTINGSRESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='FlushIndex', - full_name='immudb.schema.ImmuService.FlushIndex', - index=52, - containing_service=None, - input_type=_FLUSHINDEXREQUEST, - output_type=_FLUSHINDEXRESPONSE, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='CompactIndex', - full_name='immudb.schema.ImmuService.CompactIndex', - index=53, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamGet', - full_name='immudb.schema.ImmuService.streamGet', - index=54, - containing_service=None, - input_type=_KEYREQUEST, - output_type=_CHUNK, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamSet', - full_name='immudb.schema.ImmuService.streamSet', - index=55, - containing_service=None, - input_type=_CHUNK, - output_type=_TXHEADER, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamVerifiableGet', - full_name='immudb.schema.ImmuService.streamVerifiableGet', - index=56, - containing_service=None, - input_type=_VERIFIABLEGETREQUEST, - output_type=_CHUNK, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamVerifiableSet', - full_name='immudb.schema.ImmuService.streamVerifiableSet', - index=57, - containing_service=None, - input_type=_CHUNK, - output_type=_VERIFIABLETX, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamScan', - full_name='immudb.schema.ImmuService.streamScan', - index=58, - containing_service=None, - input_type=_SCANREQUEST, - output_type=_CHUNK, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamZScan', - full_name='immudb.schema.ImmuService.streamZScan', - index=59, - containing_service=None, - input_type=_ZSCANREQUEST, - output_type=_CHUNK, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamHistory', - full_name='immudb.schema.ImmuService.streamHistory', - index=60, - containing_service=None, - input_type=_HISTORYREQUEST, - output_type=_CHUNK, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamExecAll', - full_name='immudb.schema.ImmuService.streamExecAll', - index=61, - containing_service=None, - input_type=_CHUNK, - output_type=_TXHEADER, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='exportTx', - full_name='immudb.schema.ImmuService.exportTx', - index=62, - containing_service=None, - input_type=_EXPORTTXREQUEST, - output_type=_CHUNK, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='replicateTx', - full_name='immudb.schema.ImmuService.replicateTx', - index=63, - containing_service=None, - input_type=_CHUNK, - output_type=_TXHEADER, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='SQLExec', - full_name='immudb.schema.ImmuService.SQLExec', - index=64, - containing_service=None, - input_type=_SQLEXECREQUEST, - output_type=_SQLEXECRESULT, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='SQLQuery', - full_name='immudb.schema.ImmuService.SQLQuery', - index=65, - containing_service=None, - input_type=_SQLQUERYREQUEST, - output_type=_SQLQUERYRESULT, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='ListTables', - full_name='immudb.schema.ImmuService.ListTables', - index=66, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_SQLQUERYRESULT, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='DescribeTable', - full_name='immudb.schema.ImmuService.DescribeTable', - index=67, - containing_service=None, - input_type=_TABLE, - output_type=_SQLQUERYRESULT, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='VerifiableSQLGet', - full_name='immudb.schema.ImmuService.VerifiableSQLGet', - index=68, - containing_service=None, - input_type=_VERIFIABLESQLGETREQUEST, - output_type=_VERIFIABLESQLENTRY, - serialized_options=None, - ), -]) -_sym_db.RegisterServiceDescriptor(_IMMUSERVICE) - -DESCRIPTOR.services_by_name['ImmuService'] = _IMMUSERVICE - +_IMMUSERVICE = DESCRIPTOR.services_by_name['ImmuService'] +if _descriptor._USE_C_DESCRIPTORS == False: + + DESCRIPTOR._options = None + DESCRIPTOR._serialized_options = b'Z+github.com/codenotary/immudb/pkg/api/schema' + _VERIFIABLESQLENTRY_COLNAMESBYIDENTRY._options = None + _VERIFIABLESQLENTRY_COLNAMESBYIDENTRY._serialized_options = b'8\001' + _VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY._options = None + _VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY._serialized_options = b'8\001' + _VERIFIABLESQLENTRY_COLTYPESBYIDENTRY._options = None + _VERIFIABLESQLENTRY_COLTYPESBYIDENTRY._serialized_options = b'8\001' + _VERIFIABLESQLENTRY_COLLENBYIDENTRY._options = None + _VERIFIABLESQLENTRY_COLLENBYIDENTRY._serialized_options = b'8\001' + _COMMITTEDSQLTX_LASTINSERTEDPKSENTRY._options = None + _COMMITTEDSQLTX_LASTINSERTEDPKSENTRY._serialized_options = b'8\001' + _COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY._options = None + _COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY._serialized_options = b'8\001' + _IMMUSERVICE.methods_by_name['ListUsers']._options = None + _IMMUSERVICE.methods_by_name['ListUsers']._serialized_options = b'\202\323\344\223\002\014\022\n/user/list' + _IMMUSERVICE.methods_by_name['CreateUser']._options = None + _IMMUSERVICE.methods_by_name['CreateUser']._serialized_options = b'\202\323\344\223\002\n\"\005/user:\001*' + _IMMUSERVICE.methods_by_name['ChangePassword']._options = None + _IMMUSERVICE.methods_by_name['ChangePassword']._serialized_options = b'\202\323\344\223\002\032\"\025/user/password/change:\001*' + _IMMUSERVICE.methods_by_name['ChangePermission']._options = None + _IMMUSERVICE.methods_by_name['ChangePermission']._serialized_options = b'\202\323\344\223\002\033\"\026/user/changepermission:\001*' + _IMMUSERVICE.methods_by_name['SetActiveUser']._options = None + _IMMUSERVICE.methods_by_name['SetActiveUser']._serialized_options = b'\202\323\344\223\002\030\"\023/user/setactiveUser:\001*' + _IMMUSERVICE.methods_by_name['UpdateAuthConfig']._options = None + _IMMUSERVICE.methods_by_name['UpdateAuthConfig']._serialized_options = b'\210\002\001' + _IMMUSERVICE.methods_by_name['UpdateMTLSConfig']._options = None + _IMMUSERVICE.methods_by_name['UpdateMTLSConfig']._serialized_options = b'\210\002\001' + _IMMUSERVICE.methods_by_name['Login']._options = None + _IMMUSERVICE.methods_by_name['Login']._serialized_options = b'\210\002\001\202\323\344\223\002\013\"\006/login:\001*' + _IMMUSERVICE.methods_by_name['Logout']._options = None + _IMMUSERVICE.methods_by_name['Logout']._serialized_options = b'\210\002\001\202\323\344\223\002\014\"\007/logout:\001*' + _IMMUSERVICE.methods_by_name['Set']._options = None + _IMMUSERVICE.methods_by_name['Set']._serialized_options = b'\202\323\344\223\002\014\"\007/db/set:\001*' + _IMMUSERVICE.methods_by_name['VerifiableSet']._options = None + _IMMUSERVICE.methods_by_name['VerifiableSet']._serialized_options = b'\202\323\344\223\002\027\"\022/db/verifiable/set:\001*' + _IMMUSERVICE.methods_by_name['Get']._options = None + _IMMUSERVICE.methods_by_name['Get']._serialized_options = b'\202\323\344\223\002\017\022\r/db/get/{key}' + _IMMUSERVICE.methods_by_name['VerifiableGet']._options = None + _IMMUSERVICE.methods_by_name['VerifiableGet']._serialized_options = b'\202\323\344\223\002\027\"\022/db/verifiable/get:\001*' + _IMMUSERVICE.methods_by_name['Delete']._options = None + _IMMUSERVICE.methods_by_name['Delete']._serialized_options = b'\202\323\344\223\002\017\"\n/db/delete:\001*' + _IMMUSERVICE.methods_by_name['GetAll']._options = None + _IMMUSERVICE.methods_by_name['GetAll']._serialized_options = b'\202\323\344\223\002\017\"\n/db/getall:\001*' + _IMMUSERVICE.methods_by_name['ExecAll']._options = None + _IMMUSERVICE.methods_by_name['ExecAll']._serialized_options = b'\202\323\344\223\002\020\"\013/db/execall:\001*' + _IMMUSERVICE.methods_by_name['Scan']._options = None + _IMMUSERVICE.methods_by_name['Scan']._serialized_options = b'\202\323\344\223\002\r\"\010/db/scan:\001*' + _IMMUSERVICE.methods_by_name['Count']._options = None + _IMMUSERVICE.methods_by_name['Count']._serialized_options = b'\202\323\344\223\002\024\022\022/db/count/{prefix}' + _IMMUSERVICE.methods_by_name['CountAll']._options = None + _IMMUSERVICE.methods_by_name['CountAll']._serialized_options = b'\202\323\344\223\002\016\022\014/db/countall' + _IMMUSERVICE.methods_by_name['TxById']._options = None + _IMMUSERVICE.methods_by_name['TxById']._serialized_options = b'\202\323\344\223\002\r\022\013/db/tx/{tx}' + _IMMUSERVICE.methods_by_name['VerifiableTxById']._options = None + _IMMUSERVICE.methods_by_name['VerifiableTxById']._serialized_options = b'\202\323\344\223\002\030\022\026/db/verifiable/tx/{tx}' + _IMMUSERVICE.methods_by_name['TxScan']._options = None + _IMMUSERVICE.methods_by_name['TxScan']._serialized_options = b'\202\323\344\223\002\013\"\006/db/tx:\001*' + _IMMUSERVICE.methods_by_name['History']._options = None + _IMMUSERVICE.methods_by_name['History']._serialized_options = b'\202\323\344\223\002\020\"\013/db/history:\001*' + _IMMUSERVICE.methods_by_name['ServerInfo']._options = None + _IMMUSERVICE.methods_by_name['ServerInfo']._serialized_options = b'\202\323\344\223\002\r\022\013/serverinfo' + _IMMUSERVICE.methods_by_name['Health']._options = None + _IMMUSERVICE.methods_by_name['Health']._serialized_options = b'\202\323\344\223\002\t\022\007/health' + _IMMUSERVICE.methods_by_name['DatabaseHealth']._options = None + _IMMUSERVICE.methods_by_name['DatabaseHealth']._serialized_options = b'\202\323\344\223\002\014\022\n/db/health' + _IMMUSERVICE.methods_by_name['CurrentState']._options = None + _IMMUSERVICE.methods_by_name['CurrentState']._serialized_options = b'\202\323\344\223\002\013\022\t/db/state' + _IMMUSERVICE.methods_by_name['SetReference']._options = None + _IMMUSERVICE.methods_by_name['SetReference']._serialized_options = b'\202\323\344\223\002\025\"\020/db/setreference:\001*' + _IMMUSERVICE.methods_by_name['VerifiableSetReference']._options = None + _IMMUSERVICE.methods_by_name['VerifiableSetReference']._serialized_options = b'\202\323\344\223\002 \"\033/db/verifiable/setreference:\001*' + _IMMUSERVICE.methods_by_name['ZAdd']._options = None + _IMMUSERVICE.methods_by_name['ZAdd']._serialized_options = b'\202\323\344\223\002\r\"\010/db/zadd:\001*' + _IMMUSERVICE.methods_by_name['VerifiableZAdd']._options = None + _IMMUSERVICE.methods_by_name['VerifiableZAdd']._serialized_options = b'\202\323\344\223\002\030\"\023/db/verifiable/zadd:\001*' + _IMMUSERVICE.methods_by_name['ZScan']._options = None + _IMMUSERVICE.methods_by_name['ZScan']._serialized_options = b'\202\323\344\223\002\016\"\t/db/zscan:\001*' + _IMMUSERVICE.methods_by_name['CreateDatabase']._options = None + _IMMUSERVICE.methods_by_name['CreateDatabase']._serialized_options = b'\210\002\001\202\323\344\223\002\017\"\n/db/create:\001*' + _IMMUSERVICE.methods_by_name['CreateDatabaseWith']._options = None + _IMMUSERVICE.methods_by_name['CreateDatabaseWith']._serialized_options = b'\210\002\001\202\323\344\223\002\023\"\016/db/createwith:\001*' + _IMMUSERVICE.methods_by_name['CreateDatabaseV2']._options = None + _IMMUSERVICE.methods_by_name['CreateDatabaseV2']._serialized_options = b'\202\323\344\223\002\022\"\r/db/create/v2:\001*' + _IMMUSERVICE.methods_by_name['LoadDatabase']._options = None + _IMMUSERVICE.methods_by_name['LoadDatabase']._serialized_options = b'\202\323\344\223\002\r\"\010/db/load:\001*' + _IMMUSERVICE.methods_by_name['UnloadDatabase']._options = None + _IMMUSERVICE.methods_by_name['UnloadDatabase']._serialized_options = b'\202\323\344\223\002\017\"\n/db/unload:\001*' + _IMMUSERVICE.methods_by_name['DeleteDatabase']._options = None + _IMMUSERVICE.methods_by_name['DeleteDatabase']._serialized_options = b'\202\323\344\223\002\017\"\n/db/delete:\001*' + _IMMUSERVICE.methods_by_name['DatabaseList']._options = None + _IMMUSERVICE.methods_by_name['DatabaseList']._serialized_options = b'\210\002\001\202\323\344\223\002\r\"\010/db/list:\001*' + _IMMUSERVICE.methods_by_name['DatabaseListV2']._options = None + _IMMUSERVICE.methods_by_name['DatabaseListV2']._serialized_options = b'\202\323\344\223\002\020\"\013/db/list/v2:\001*' + _IMMUSERVICE.methods_by_name['UseDatabase']._options = None + _IMMUSERVICE.methods_by_name['UseDatabase']._serialized_options = b'\202\323\344\223\002\030\022\026/db/use/{databaseName}' + _IMMUSERVICE.methods_by_name['UpdateDatabase']._options = None + _IMMUSERVICE.methods_by_name['UpdateDatabase']._serialized_options = b'\210\002\001\202\323\344\223\002\017\"\n/db/update:\001*' + _IMMUSERVICE.methods_by_name['UpdateDatabaseV2']._options = None + _IMMUSERVICE.methods_by_name['UpdateDatabaseV2']._serialized_options = b'\202\323\344\223\002\022\"\r/db/update/v2:\001*' + _IMMUSERVICE.methods_by_name['GetDatabaseSettings']._options = None + _IMMUSERVICE.methods_by_name['GetDatabaseSettings']._serialized_options = b'\210\002\001\202\323\344\223\002\021\"\014/db/settings:\001*' + _IMMUSERVICE.methods_by_name['GetDatabaseSettingsV2']._options = None + _IMMUSERVICE.methods_by_name['GetDatabaseSettingsV2']._serialized_options = b'\202\323\344\223\002\024\"\017/db/settings/v2:\001*' + _IMMUSERVICE.methods_by_name['FlushIndex']._options = None + _IMMUSERVICE.methods_by_name['FlushIndex']._serialized_options = b'\202\323\344\223\002\020\022\016/db/flushindex' + _IMMUSERVICE.methods_by_name['CompactIndex']._options = None + _IMMUSERVICE.methods_by_name['CompactIndex']._serialized_options = b'\202\323\344\223\002\022\022\020/db/compactindex' + _IMMUSERVICE.methods_by_name['SQLExec']._options = None + _IMMUSERVICE.methods_by_name['SQLExec']._serialized_options = b'\202\323\344\223\002\020\"\013/db/sqlexec:\001*' + _IMMUSERVICE.methods_by_name['SQLQuery']._options = None + _IMMUSERVICE.methods_by_name['SQLQuery']._serialized_options = b'\202\323\344\223\002\021\"\014/db/sqlquery:\001*' + _IMMUSERVICE.methods_by_name['ListTables']._options = None + _IMMUSERVICE.methods_by_name['ListTables']._serialized_options = b'\202\323\344\223\002\020\022\016/db/table/list' + _IMMUSERVICE.methods_by_name['DescribeTable']._options = None + _IMMUSERVICE.methods_by_name['DescribeTable']._serialized_options = b'\202\323\344\223\002\017\"\n/db/tables:\001*' + _IMMUSERVICE.methods_by_name['VerifiableSQLGet']._options = None + _IMMUSERVICE.methods_by_name['VerifiableSQLGet']._serialized_options = b'\202\323\344\223\002\032\"\025/db/verifiable/sqlget:\001*' + _ENTRYTYPEACTION._serialized_start=12968 + _ENTRYTYPEACTION._serialized_end=13043 + _PERMISSIONACTION._serialized_start=13045 + _PERMISSIONACTION._serialized_end=13086 + _TXMODE._serialized_start=13088 + _TXMODE._serialized_end=13140 + _KEY._serialized_start=120 + _KEY._serialized_end=138 + _PERMISSION._serialized_start=140 + _PERMISSION._serialized_end=190 + _USER._serialized_start=192 + _USER._serialized_end=314 + _USERLIST._serialized_start=316 + _USERLIST._serialized_end=362 + _CREATEUSERREQUEST._serialized_start=364 + _CREATEUSERREQUEST._serialized_end=453 + _USERREQUEST._serialized_start=455 + _USERREQUEST._serialized_end=482 + _CHANGEPASSWORDREQUEST._serialized_start=484 + _CHANGEPASSWORDREQUEST._serialized_end=563 + _LOGINREQUEST._serialized_start=565 + _LOGINREQUEST._serialized_end=611 + _LOGINRESPONSE._serialized_start=613 + _LOGINRESPONSE._serialized_end=660 + _AUTHCONFIG._serialized_start=662 + _AUTHCONFIG._serialized_end=688 + _MTLSCONFIG._serialized_start=690 + _MTLSCONFIG._serialized_end=719 + _OPENSESSIONREQUEST._serialized_start=721 + _OPENSESSIONREQUEST._serialized_end=799 + _OPENSESSIONRESPONSE._serialized_start=801 + _OPENSESSIONRESPONSE._serialized_end=861 + _PRECONDITION._serialized_start=864 + _PRECONDITION._serialized_end=1301 + _PRECONDITION_KEYMUSTEXISTPRECONDITION._serialized_start=1138 + _PRECONDITION_KEYMUSTEXISTPRECONDITION._serialized_end=1177 + _PRECONDITION_KEYMUSTNOTEXISTPRECONDITION._serialized_start=1179 + _PRECONDITION_KEYMUSTNOTEXISTPRECONDITION._serialized_end=1221 + _PRECONDITION_KEYNOTMODIFIEDAFTERTXPRECONDITION._serialized_start=1223 + _PRECONDITION_KEYNOTMODIFIEDAFTERTXPRECONDITION._serialized_end=1285 + _KEYVALUE._serialized_start=1303 + _KEYVALUE._serialized_end=1386 + _ENTRY._serialized_start=1389 + _ENTRY._serialized_end=1564 + _REFERENCE._serialized_start=1566 + _REFERENCE._serialized_end=1679 + _OP._serialized_start=1682 + _OP._serialized_end=1830 + _EXECALLREQUEST._serialized_start=1832 + _EXECALLREQUEST._serialized_end=1955 + _ENTRIES._serialized_start=1957 + _ENTRIES._serialized_end=2005 + _ZENTRY._serialized_start=2007 + _ZENTRY._serialized_end=2107 + _ZENTRIES._serialized_start=2109 + _ZENTRIES._serialized_end=2159 + _SCANREQUEST._serialized_start=2162 + _SCANREQUEST._serialized_end=2347 + _KEYPREFIX._serialized_start=2349 + _KEYPREFIX._serialized_end=2376 + _ENTRYCOUNT._serialized_start=2378 + _ENTRYCOUNT._serialized_end=2405 + _SIGNATURE._serialized_start=2407 + _SIGNATURE._serialized_end=2456 + _TXHEADER._serialized_start=2459 + _TXHEADER._serialized_end=2634 + _TXMETADATA._serialized_start=2636 + _TXMETADATA._serialized_end=2648 + _LINEARPROOF._serialized_start=2650 + _LINEARPROOF._serialized_end=2718 + _DUALPROOF._serialized_start=2721 + _DUALPROOF._serialized_end=2980 + _TX._serialized_start=2983 + _TX._serialized_end=3151 + _TXENTRY._serialized_start=3153 + _TXENTRY._serialized_end=3265 + _KVMETADATA._serialized_start=3267 + _KVMETADATA._serialized_end=3365 + _EXPIRATION._serialized_start=3367 + _EXPIRATION._serialized_end=3398 + _VERIFIABLETX._serialized_start=3401 + _VERIFIABLETX._serialized_end=3536 + _VERIFIABLEENTRY._serialized_start=3539 + _VERIFIABLEENTRY._serialized_end=3699 + _INCLUSIONPROOF._serialized_start=3701 + _INCLUSIONPROOF._serialized_end=3761 + _SETREQUEST._serialized_start=3763 + _SETREQUEST._serialized_end=3881 + _KEYREQUEST._serialized_start=3883 + _KEYREQUEST._serialized_end=3975 + _KEYLISTREQUEST._serialized_start=3977 + _KEYLISTREQUEST._serialized_end=4024 + _DELETEKEYSREQUEST._serialized_start=4026 + _DELETEKEYSREQUEST._serialized_end=4092 + _VERIFIABLESETREQUEST._serialized_start=4094 + _VERIFIABLESETREQUEST._serialized_end=4185 + _VERIFIABLEGETREQUEST._serialized_start=4187 + _VERIFIABLEGETREQUEST._serialized_end=4278 + _SERVERINFOREQUEST._serialized_start=4280 + _SERVERINFOREQUEST._serialized_end=4299 + _SERVERINFORESPONSE._serialized_start=4301 + _SERVERINFORESPONSE._serialized_end=4338 + _HEALTHRESPONSE._serialized_start=4340 + _HEALTHRESPONSE._serialized_end=4389 + _DATABASEHEALTHRESPONSE._serialized_start=4391 + _DATABASEHEALTHRESPONSE._serialized_end=4472 + _IMMUTABLESTATE._serialized_start=4474 + _IMMUTABLESTATE._serialized_end=4577 + _REFERENCEREQUEST._serialized_start=4580 + _REFERENCEREQUEST._serialized_end=4734 + _VERIFIABLEREFERENCEREQUEST._serialized_start=4736 + _VERIFIABLEREFERENCEREQUEST._serialized_end=4845 + _ZADDREQUEST._serialized_start=4847 + _ZADDREQUEST._serialized_end=4949 + _SCORE._serialized_start=4951 + _SCORE._serialized_end=4973 + _ZSCANREQUEST._serialized_start=4976 + _ZSCANREQUEST._serialized_end=5238 + _HISTORYREQUEST._serialized_start=5240 + _HISTORYREQUEST._serialized_end=5331 + _VERIFIABLEZADDREQUEST._serialized_start=5333 + _VERIFIABLEZADDREQUEST._serialized_end=5427 + _TXREQUEST._serialized_start=5430 + _TXREQUEST._serialized_end=5569 + _ENTRIESSPEC._serialized_start=5572 + _ENTRIESSPEC._serialized_end=5744 + _ENTRYTYPESPEC._serialized_start=5746 + _ENTRYTYPESPEC._serialized_end=5809 + _VERIFIABLETXREQUEST._serialized_start=5812 + _VERIFIABLETXREQUEST._serialized_end=5983 + _TXSCANREQUEST._serialized_start=5986 + _TXSCANREQUEST._serialized_end=6131 + _TXLIST._serialized_start=6133 + _TXLIST._serialized_end=6173 + _EXPORTTXREQUEST._serialized_start=6175 + _EXPORTTXREQUEST._serialized_end=6204 + _DATABASE._serialized_start=6206 + _DATABASE._serialized_end=6238 + _DATABASESETTINGS._serialized_start=6241 + _DATABASESETTINGS._serialized_end=6524 + _CREATEDATABASEREQUEST._serialized_start=6526 + _CREATEDATABASEREQUEST._serialized_end=6643 + _CREATEDATABASERESPONSE._serialized_start=6645 + _CREATEDATABASERESPONSE._serialized_end=6766 + _UPDATEDATABASEREQUEST._serialized_start=6768 + _UPDATEDATABASEREQUEST._serialized_end=6868 + _UPDATEDATABASERESPONSE._serialized_start=6870 + _UPDATEDATABASERESPONSE._serialized_end=6971 + _DATABASESETTINGSREQUEST._serialized_start=6973 + _DATABASESETTINGSREQUEST._serialized_end=6998 + _DATABASESETTINGSRESPONSE._serialized_start=7000 + _DATABASESETTINGSRESPONSE._serialized_end=7103 + _NULLABLEUINT32._serialized_start=7105 + _NULLABLEUINT32._serialized_end=7136 + _NULLABLEUINT64._serialized_start=7138 + _NULLABLEUINT64._serialized_end=7169 + _NULLABLEFLOAT._serialized_start=7171 + _NULLABLEFLOAT._serialized_end=7201 + _NULLABLEBOOL._serialized_start=7203 + _NULLABLEBOOL._serialized_end=7232 + _NULLABLESTRING._serialized_start=7234 + _NULLABLESTRING._serialized_end=7265 + _NULLABLEMILLISECONDS._serialized_start=7267 + _NULLABLEMILLISECONDS._serialized_end=7304 + _DATABASENULLABLESETTINGS._serialized_start=7307 + _DATABASENULLABLESETTINGS._serialized_end=8413 + _REPLICATIONNULLABLESETTINGS._serialized_start=8416 + _REPLICATIONNULLABLESETTINGS._serialized_end=8765 + _INDEXNULLABLESETTINGS._serialized_start=8768 + _INDEXNULLABLESETTINGS._serialized_end=9542 + _AHTNULLABLESETTINGS._serialized_start=9545 + _AHTNULLABLESETTINGS._serialized_end=9676 + _LOADDATABASEREQUEST._serialized_start=9678 + _LOADDATABASEREQUEST._serialized_end=9717 + _LOADDATABASERESPONSE._serialized_start=9719 + _LOADDATABASERESPONSE._serialized_end=9759 + _UNLOADDATABASEREQUEST._serialized_start=9761 + _UNLOADDATABASEREQUEST._serialized_end=9802 + _UNLOADDATABASERESPONSE._serialized_start=9804 + _UNLOADDATABASERESPONSE._serialized_end=9846 + _DELETEDATABASEREQUEST._serialized_start=9848 + _DELETEDATABASEREQUEST._serialized_end=9889 + _DELETEDATABASERESPONSE._serialized_start=9891 + _DELETEDATABASERESPONSE._serialized_end=9933 + _FLUSHINDEXREQUEST._serialized_start=9935 + _FLUSHINDEXREQUEST._serialized_end=9997 + _FLUSHINDEXRESPONSE._serialized_start=9999 + _FLUSHINDEXRESPONSE._serialized_end=10037 + _TABLE._serialized_start=10039 + _TABLE._serialized_end=10065 + _SQLGETREQUEST._serialized_start=10067 + _SQLGETREQUEST._serialized_end=10171 + _VERIFIABLESQLGETREQUEST._serialized_start=10173 + _VERIFIABLESQLGETREQUEST._serialized_end=10273 + _SQLENTRY._serialized_start=10275 + _SQLENTRY._serialized_end=10370 + _VERIFIABLESQLENTRY._serialized_start=10373 + _VERIFIABLESQLENTRY._serialized_end=11106 + _VERIFIABLESQLENTRY_COLNAMESBYIDENTRY._serialized_start=10892 + _VERIFIABLESQLENTRY_COLNAMESBYIDENTRY._serialized_end=10943 + _VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY._serialized_start=10945 + _VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY._serialized_end=10996 + _VERIFIABLESQLENTRY_COLTYPESBYIDENTRY._serialized_start=10998 + _VERIFIABLESQLENTRY_COLTYPESBYIDENTRY._serialized_end=11049 + _VERIFIABLESQLENTRY_COLLENBYIDENTRY._serialized_start=11051 + _VERIFIABLESQLENTRY_COLLENBYIDENTRY._serialized_end=11100 + _USEDATABASEREPLY._serialized_start=11108 + _USEDATABASEREPLY._serialized_end=11141 + _CHANGEPERMISSIONREQUEST._serialized_start=11144 + _CHANGEPERMISSIONREQUEST._serialized_end=11274 + _SETACTIVEUSERREQUEST._serialized_start=11276 + _SETACTIVEUSERREQUEST._serialized_end=11332 + _DATABASELISTRESPONSE._serialized_start=11334 + _DATABASELISTRESPONSE._serialized_end=11400 + _DATABASELISTREQUESTV2._serialized_start=11402 + _DATABASELISTREQUESTV2._serialized_end=11425 + _DATABASELISTRESPONSEV2._serialized_start=11427 + _DATABASELISTRESPONSEV2._serialized_end=11507 + _DATABASEWITHSETTINGS._serialized_start=11509 + _DATABASEWITHSETTINGS._serialized_end=11620 + _CHUNK._serialized_start=11622 + _CHUNK._serialized_end=11646 + _USESNAPSHOTREQUEST._serialized_start=11648 + _USESNAPSHOTREQUEST._serialized_end=11705 + _SQLEXECREQUEST._serialized_start=11707 + _SQLEXECREQUEST._serialized_end=11795 + _SQLQUERYREQUEST._serialized_start=11797 + _SQLQUERYREQUEST._serialized_end=11893 + _NAMEDPARAM._serialized_start=11895 + _NAMEDPARAM._serialized_end=11961 + _SQLEXECRESULT._serialized_start=11963 + _SQLEXECRESULT._serialized_end=12041 + _COMMITTEDSQLTX._serialized_start=12044 + _COMMITTEDSQLTX._serialized_end=12441 + _COMMITTEDSQLTX_LASTINSERTEDPKSENTRY._serialized_start=12280 + _COMMITTEDSQLTX_LASTINSERTEDPKSENTRY._serialized_end=12359 + _COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY._serialized_start=12361 + _COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY._serialized_end=12441 + _SQLQUERYRESULT._serialized_start=12443 + _SQLQUERYRESULT._serialized_end=12533 + _COLUMN._serialized_start=12535 + _COLUMN._serialized_end=12571 + _ROW._serialized_start=12573 + _ROW._serialized_end=12636 + _SQLVALUE._serialized_start=12639 + _SQLVALUE._serialized_end=12769 + _NEWTXREQUEST._serialized_start=12771 + _NEWTXREQUEST._serialized_end=12822 + _NEWTXRESPONSE._serialized_start=12824 + _NEWTXRESPONSE._serialized_end=12862 + _ERRORINFO._serialized_start=12864 + _ERRORINFO._serialized_end=12904 + _DEBUGINFO._serialized_start=12906 + _DEBUGINFO._serialized_end=12932 + _RETRYINFO._serialized_start=12934 + _RETRYINFO._serialized_end=12966 + _IMMUSERVICE._serialized_start=13143 + _IMMUSERVICE._serialized_end=19624 # @@protoc_insertion_point(module_scope) diff --git a/immudb/grpc/schema_pb2_grpc.py b/immudb/grpc/schema_pb2_grpc.py index e6fb84c..a43bd66 100644 --- a/immudb/grpc/schema_pb2_grpc.py +++ b/immudb/grpc/schema_pb2_grpc.py @@ -1,4 +1,5 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 @@ -6,1198 +7,2353 @@ class ImmuServiceStub(object): - """immudb gRPC & REST service - """ - - def __init__(self, channel): - """Constructor. - - Args: - channel: A grpc.Channel. + """immudb gRPC & REST service """ - self.ListUsers = channel.unary_unary( - '/immudb.schema.ImmuService/ListUsers', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=schema__pb2.UserList.FromString, - ) - self.CreateUser = channel.unary_unary( - '/immudb.schema.ImmuService/CreateUser', - request_serializer=schema__pb2.CreateUserRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.ChangePassword = channel.unary_unary( - '/immudb.schema.ImmuService/ChangePassword', - request_serializer=schema__pb2.ChangePasswordRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.ChangePermission = channel.unary_unary( - '/immudb.schema.ImmuService/ChangePermission', - request_serializer=schema__pb2.ChangePermissionRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.SetActiveUser = channel.unary_unary( - '/immudb.schema.ImmuService/SetActiveUser', - request_serializer=schema__pb2.SetActiveUserRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.UpdateAuthConfig = channel.unary_unary( - '/immudb.schema.ImmuService/UpdateAuthConfig', - request_serializer=schema__pb2.AuthConfig.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.UpdateMTLSConfig = channel.unary_unary( - '/immudb.schema.ImmuService/UpdateMTLSConfig', - request_serializer=schema__pb2.MTLSConfig.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.OpenSession = channel.unary_unary( - '/immudb.schema.ImmuService/OpenSession', - request_serializer=schema__pb2.OpenSessionRequest.SerializeToString, - response_deserializer=schema__pb2.OpenSessionResponse.FromString, - ) - self.CloseSession = channel.unary_unary( - '/immudb.schema.ImmuService/CloseSession', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.KeepAlive = channel.unary_unary( - '/immudb.schema.ImmuService/KeepAlive', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.NewTx = channel.unary_unary( - '/immudb.schema.ImmuService/NewTx', - request_serializer=schema__pb2.NewTxRequest.SerializeToString, - response_deserializer=schema__pb2.NewTxResponse.FromString, - ) - self.Commit = channel.unary_unary( - '/immudb.schema.ImmuService/Commit', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=schema__pb2.CommittedSQLTx.FromString, - ) - self.Rollback = channel.unary_unary( - '/immudb.schema.ImmuService/Rollback', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.TxSQLExec = channel.unary_unary( - '/immudb.schema.ImmuService/TxSQLExec', - request_serializer=schema__pb2.SQLExecRequest.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.TxSQLQuery = channel.unary_unary( - '/immudb.schema.ImmuService/TxSQLQuery', - request_serializer=schema__pb2.SQLQueryRequest.SerializeToString, - response_deserializer=schema__pb2.SQLQueryResult.FromString, - ) - self.Login = channel.unary_unary( - '/immudb.schema.ImmuService/Login', - request_serializer=schema__pb2.LoginRequest.SerializeToString, - response_deserializer=schema__pb2.LoginResponse.FromString, - ) - self.Logout = channel.unary_unary( - '/immudb.schema.ImmuService/Logout', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.Set = channel.unary_unary( - '/immudb.schema.ImmuService/Set', - request_serializer=schema__pb2.SetRequest.SerializeToString, - response_deserializer=schema__pb2.TxHeader.FromString, - ) - self.VerifiableSet = channel.unary_unary( - '/immudb.schema.ImmuService/VerifiableSet', - request_serializer=schema__pb2.VerifiableSetRequest.SerializeToString, - response_deserializer=schema__pb2.VerifiableTx.FromString, - ) - self.Get = channel.unary_unary( - '/immudb.schema.ImmuService/Get', - request_serializer=schema__pb2.KeyRequest.SerializeToString, - response_deserializer=schema__pb2.Entry.FromString, - ) - self.VerifiableGet = channel.unary_unary( - '/immudb.schema.ImmuService/VerifiableGet', - request_serializer=schema__pb2.VerifiableGetRequest.SerializeToString, - response_deserializer=schema__pb2.VerifiableEntry.FromString, - ) - self.Delete = channel.unary_unary( - '/immudb.schema.ImmuService/Delete', - request_serializer=schema__pb2.DeleteKeysRequest.SerializeToString, - response_deserializer=schema__pb2.TxHeader.FromString, - ) - self.GetAll = channel.unary_unary( - '/immudb.schema.ImmuService/GetAll', - request_serializer=schema__pb2.KeyListRequest.SerializeToString, - response_deserializer=schema__pb2.Entries.FromString, - ) - self.ExecAll = channel.unary_unary( - '/immudb.schema.ImmuService/ExecAll', - request_serializer=schema__pb2.ExecAllRequest.SerializeToString, - response_deserializer=schema__pb2.TxHeader.FromString, - ) - self.Scan = channel.unary_unary( - '/immudb.schema.ImmuService/Scan', - request_serializer=schema__pb2.ScanRequest.SerializeToString, - response_deserializer=schema__pb2.Entries.FromString, - ) - self.Count = channel.unary_unary( - '/immudb.schema.ImmuService/Count', - request_serializer=schema__pb2.KeyPrefix.SerializeToString, - response_deserializer=schema__pb2.EntryCount.FromString, - ) - self.CountAll = channel.unary_unary( - '/immudb.schema.ImmuService/CountAll', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=schema__pb2.EntryCount.FromString, - ) - self.TxById = channel.unary_unary( - '/immudb.schema.ImmuService/TxById', - request_serializer=schema__pb2.TxRequest.SerializeToString, - response_deserializer=schema__pb2.Tx.FromString, - ) - self.VerifiableTxById = channel.unary_unary( - '/immudb.schema.ImmuService/VerifiableTxById', - request_serializer=schema__pb2.VerifiableTxRequest.SerializeToString, - response_deserializer=schema__pb2.VerifiableTx.FromString, - ) - self.TxScan = channel.unary_unary( - '/immudb.schema.ImmuService/TxScan', - request_serializer=schema__pb2.TxScanRequest.SerializeToString, - response_deserializer=schema__pb2.TxList.FromString, - ) - self.History = channel.unary_unary( - '/immudb.schema.ImmuService/History', - request_serializer=schema__pb2.HistoryRequest.SerializeToString, - response_deserializer=schema__pb2.Entries.FromString, - ) - self.Health = channel.unary_unary( - '/immudb.schema.ImmuService/Health', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=schema__pb2.HealthResponse.FromString, - ) - self.DatabaseHealth = channel.unary_unary( - '/immudb.schema.ImmuService/DatabaseHealth', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=schema__pb2.DatabaseHealthResponse.FromString, - ) - self.CurrentState = channel.unary_unary( - '/immudb.schema.ImmuService/CurrentState', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=schema__pb2.ImmutableState.FromString, - ) - self.SetReference = channel.unary_unary( - '/immudb.schema.ImmuService/SetReference', - request_serializer=schema__pb2.ReferenceRequest.SerializeToString, - response_deserializer=schema__pb2.TxHeader.FromString, - ) - self.VerifiableSetReference = channel.unary_unary( - '/immudb.schema.ImmuService/VerifiableSetReference', - request_serializer=schema__pb2.VerifiableReferenceRequest.SerializeToString, - response_deserializer=schema__pb2.VerifiableTx.FromString, - ) - self.ZAdd = channel.unary_unary( - '/immudb.schema.ImmuService/ZAdd', - request_serializer=schema__pb2.ZAddRequest.SerializeToString, - response_deserializer=schema__pb2.TxHeader.FromString, - ) - self.VerifiableZAdd = channel.unary_unary( - '/immudb.schema.ImmuService/VerifiableZAdd', - request_serializer=schema__pb2.VerifiableZAddRequest.SerializeToString, - response_deserializer=schema__pb2.VerifiableTx.FromString, - ) - self.ZScan = channel.unary_unary( - '/immudb.schema.ImmuService/ZScan', - request_serializer=schema__pb2.ZScanRequest.SerializeToString, - response_deserializer=schema__pb2.ZEntries.FromString, - ) - self.CreateDatabase = channel.unary_unary( - '/immudb.schema.ImmuService/CreateDatabase', - request_serializer=schema__pb2.Database.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.CreateDatabaseWith = channel.unary_unary( - '/immudb.schema.ImmuService/CreateDatabaseWith', - request_serializer=schema__pb2.DatabaseSettings.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.CreateDatabaseV2 = channel.unary_unary( - '/immudb.schema.ImmuService/CreateDatabaseV2', - request_serializer=schema__pb2.CreateDatabaseRequest.SerializeToString, - response_deserializer=schema__pb2.CreateDatabaseResponse.FromString, - ) - self.LoadDatabase = channel.unary_unary( - '/immudb.schema.ImmuService/LoadDatabase', - request_serializer=schema__pb2.LoadDatabaseRequest.SerializeToString, - response_deserializer=schema__pb2.LoadDatabaseResponse.FromString, - ) - self.UnloadDatabase = channel.unary_unary( - '/immudb.schema.ImmuService/UnloadDatabase', - request_serializer=schema__pb2.UnloadDatabaseRequest.SerializeToString, - response_deserializer=schema__pb2.UnloadDatabaseResponse.FromString, - ) - self.DeleteDatabase = channel.unary_unary( - '/immudb.schema.ImmuService/DeleteDatabase', - request_serializer=schema__pb2.DeleteDatabaseRequest.SerializeToString, - response_deserializer=schema__pb2.DeleteDatabaseResponse.FromString, - ) - self.DatabaseList = channel.unary_unary( - '/immudb.schema.ImmuService/DatabaseList', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=schema__pb2.DatabaseListResponse.FromString, - ) - self.DatabaseListV2 = channel.unary_unary( - '/immudb.schema.ImmuService/DatabaseListV2', - request_serializer=schema__pb2.DatabaseListRequestV2.SerializeToString, - response_deserializer=schema__pb2.DatabaseListResponseV2.FromString, - ) - self.UseDatabase = channel.unary_unary( - '/immudb.schema.ImmuService/UseDatabase', - request_serializer=schema__pb2.Database.SerializeToString, - response_deserializer=schema__pb2.UseDatabaseReply.FromString, - ) - self.UpdateDatabase = channel.unary_unary( - '/immudb.schema.ImmuService/UpdateDatabase', - request_serializer=schema__pb2.DatabaseSettings.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.UpdateDatabaseV2 = channel.unary_unary( - '/immudb.schema.ImmuService/UpdateDatabaseV2', - request_serializer=schema__pb2.UpdateDatabaseRequest.SerializeToString, - response_deserializer=schema__pb2.UpdateDatabaseResponse.FromString, - ) - self.GetDatabaseSettings = channel.unary_unary( - '/immudb.schema.ImmuService/GetDatabaseSettings', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=schema__pb2.DatabaseSettings.FromString, - ) - self.GetDatabaseSettingsV2 = channel.unary_unary( - '/immudb.schema.ImmuService/GetDatabaseSettingsV2', - request_serializer=schema__pb2.DatabaseSettingsRequest.SerializeToString, - response_deserializer=schema__pb2.DatabaseSettingsResponse.FromString, - ) - self.FlushIndex = channel.unary_unary( - '/immudb.schema.ImmuService/FlushIndex', - request_serializer=schema__pb2.FlushIndexRequest.SerializeToString, - response_deserializer=schema__pb2.FlushIndexResponse.FromString, - ) - self.CompactIndex = channel.unary_unary( - '/immudb.schema.ImmuService/CompactIndex', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - ) - self.streamGet = channel.unary_stream( - '/immudb.schema.ImmuService/streamGet', - request_serializer=schema__pb2.KeyRequest.SerializeToString, - response_deserializer=schema__pb2.Chunk.FromString, - ) - self.streamSet = channel.stream_unary( - '/immudb.schema.ImmuService/streamSet', - request_serializer=schema__pb2.Chunk.SerializeToString, - response_deserializer=schema__pb2.TxHeader.FromString, - ) - self.streamVerifiableGet = channel.unary_stream( - '/immudb.schema.ImmuService/streamVerifiableGet', - request_serializer=schema__pb2.VerifiableGetRequest.SerializeToString, - response_deserializer=schema__pb2.Chunk.FromString, - ) - self.streamVerifiableSet = channel.stream_unary( - '/immudb.schema.ImmuService/streamVerifiableSet', - request_serializer=schema__pb2.Chunk.SerializeToString, - response_deserializer=schema__pb2.VerifiableTx.FromString, - ) - self.streamScan = channel.unary_stream( - '/immudb.schema.ImmuService/streamScan', - request_serializer=schema__pb2.ScanRequest.SerializeToString, - response_deserializer=schema__pb2.Chunk.FromString, - ) - self.streamZScan = channel.unary_stream( - '/immudb.schema.ImmuService/streamZScan', - request_serializer=schema__pb2.ZScanRequest.SerializeToString, - response_deserializer=schema__pb2.Chunk.FromString, - ) - self.streamHistory = channel.unary_stream( - '/immudb.schema.ImmuService/streamHistory', - request_serializer=schema__pb2.HistoryRequest.SerializeToString, - response_deserializer=schema__pb2.Chunk.FromString, - ) - self.streamExecAll = channel.stream_unary( - '/immudb.schema.ImmuService/streamExecAll', - request_serializer=schema__pb2.Chunk.SerializeToString, - response_deserializer=schema__pb2.TxHeader.FromString, - ) - self.exportTx = channel.unary_stream( - '/immudb.schema.ImmuService/exportTx', - request_serializer=schema__pb2.ExportTxRequest.SerializeToString, - response_deserializer=schema__pb2.Chunk.FromString, - ) - self.replicateTx = channel.stream_unary( - '/immudb.schema.ImmuService/replicateTx', - request_serializer=schema__pb2.Chunk.SerializeToString, - response_deserializer=schema__pb2.TxHeader.FromString, - ) - self.SQLExec = channel.unary_unary( - '/immudb.schema.ImmuService/SQLExec', - request_serializer=schema__pb2.SQLExecRequest.SerializeToString, - response_deserializer=schema__pb2.SQLExecResult.FromString, - ) - self.SQLQuery = channel.unary_unary( - '/immudb.schema.ImmuService/SQLQuery', - request_serializer=schema__pb2.SQLQueryRequest.SerializeToString, - response_deserializer=schema__pb2.SQLQueryResult.FromString, - ) - self.ListTables = channel.unary_unary( - '/immudb.schema.ImmuService/ListTables', - request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - response_deserializer=schema__pb2.SQLQueryResult.FromString, - ) - self.DescribeTable = channel.unary_unary( - '/immudb.schema.ImmuService/DescribeTable', - request_serializer=schema__pb2.Table.SerializeToString, - response_deserializer=schema__pb2.SQLQueryResult.FromString, - ) - self.VerifiableSQLGet = channel.unary_unary( - '/immudb.schema.ImmuService/VerifiableSQLGet', - request_serializer=schema__pb2.VerifiableSQLGetRequest.SerializeToString, - response_deserializer=schema__pb2.VerifiableSQLEntry.FromString, - ) + def __init__(self, channel): + """Constructor. + + Args: + channel: A grpc.Channel. + """ + self.ListUsers = channel.unary_unary( + '/immudb.schema.ImmuService/ListUsers', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=schema__pb2.UserList.FromString, + ) + self.CreateUser = channel.unary_unary( + '/immudb.schema.ImmuService/CreateUser', + request_serializer=schema__pb2.CreateUserRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.ChangePassword = channel.unary_unary( + '/immudb.schema.ImmuService/ChangePassword', + request_serializer=schema__pb2.ChangePasswordRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.ChangePermission = channel.unary_unary( + '/immudb.schema.ImmuService/ChangePermission', + request_serializer=schema__pb2.ChangePermissionRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.SetActiveUser = channel.unary_unary( + '/immudb.schema.ImmuService/SetActiveUser', + request_serializer=schema__pb2.SetActiveUserRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.UpdateAuthConfig = channel.unary_unary( + '/immudb.schema.ImmuService/UpdateAuthConfig', + request_serializer=schema__pb2.AuthConfig.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.UpdateMTLSConfig = channel.unary_unary( + '/immudb.schema.ImmuService/UpdateMTLSConfig', + request_serializer=schema__pb2.MTLSConfig.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.OpenSession = channel.unary_unary( + '/immudb.schema.ImmuService/OpenSession', + request_serializer=schema__pb2.OpenSessionRequest.SerializeToString, + response_deserializer=schema__pb2.OpenSessionResponse.FromString, + ) + self.CloseSession = channel.unary_unary( + '/immudb.schema.ImmuService/CloseSession', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.KeepAlive = channel.unary_unary( + '/immudb.schema.ImmuService/KeepAlive', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.NewTx = channel.unary_unary( + '/immudb.schema.ImmuService/NewTx', + request_serializer=schema__pb2.NewTxRequest.SerializeToString, + response_deserializer=schema__pb2.NewTxResponse.FromString, + ) + self.Commit = channel.unary_unary( + '/immudb.schema.ImmuService/Commit', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=schema__pb2.CommittedSQLTx.FromString, + ) + self.Rollback = channel.unary_unary( + '/immudb.schema.ImmuService/Rollback', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.TxSQLExec = channel.unary_unary( + '/immudb.schema.ImmuService/TxSQLExec', + request_serializer=schema__pb2.SQLExecRequest.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.TxSQLQuery = channel.unary_unary( + '/immudb.schema.ImmuService/TxSQLQuery', + request_serializer=schema__pb2.SQLQueryRequest.SerializeToString, + response_deserializer=schema__pb2.SQLQueryResult.FromString, + ) + self.Login = channel.unary_unary( + '/immudb.schema.ImmuService/Login', + request_serializer=schema__pb2.LoginRequest.SerializeToString, + response_deserializer=schema__pb2.LoginResponse.FromString, + ) + self.Logout = channel.unary_unary( + '/immudb.schema.ImmuService/Logout', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.Set = channel.unary_unary( + '/immudb.schema.ImmuService/Set', + request_serializer=schema__pb2.SetRequest.SerializeToString, + response_deserializer=schema__pb2.TxHeader.FromString, + ) + self.VerifiableSet = channel.unary_unary( + '/immudb.schema.ImmuService/VerifiableSet', + request_serializer=schema__pb2.VerifiableSetRequest.SerializeToString, + response_deserializer=schema__pb2.VerifiableTx.FromString, + ) + self.Get = channel.unary_unary( + '/immudb.schema.ImmuService/Get', + request_serializer=schema__pb2.KeyRequest.SerializeToString, + response_deserializer=schema__pb2.Entry.FromString, + ) + self.VerifiableGet = channel.unary_unary( + '/immudb.schema.ImmuService/VerifiableGet', + request_serializer=schema__pb2.VerifiableGetRequest.SerializeToString, + response_deserializer=schema__pb2.VerifiableEntry.FromString, + ) + self.Delete = channel.unary_unary( + '/immudb.schema.ImmuService/Delete', + request_serializer=schema__pb2.DeleteKeysRequest.SerializeToString, + response_deserializer=schema__pb2.TxHeader.FromString, + ) + self.GetAll = channel.unary_unary( + '/immudb.schema.ImmuService/GetAll', + request_serializer=schema__pb2.KeyListRequest.SerializeToString, + response_deserializer=schema__pb2.Entries.FromString, + ) + self.ExecAll = channel.unary_unary( + '/immudb.schema.ImmuService/ExecAll', + request_serializer=schema__pb2.ExecAllRequest.SerializeToString, + response_deserializer=schema__pb2.TxHeader.FromString, + ) + self.Scan = channel.unary_unary( + '/immudb.schema.ImmuService/Scan', + request_serializer=schema__pb2.ScanRequest.SerializeToString, + response_deserializer=schema__pb2.Entries.FromString, + ) + self.Count = channel.unary_unary( + '/immudb.schema.ImmuService/Count', + request_serializer=schema__pb2.KeyPrefix.SerializeToString, + response_deserializer=schema__pb2.EntryCount.FromString, + ) + self.CountAll = channel.unary_unary( + '/immudb.schema.ImmuService/CountAll', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=schema__pb2.EntryCount.FromString, + ) + self.TxById = channel.unary_unary( + '/immudb.schema.ImmuService/TxById', + request_serializer=schema__pb2.TxRequest.SerializeToString, + response_deserializer=schema__pb2.Tx.FromString, + ) + self.VerifiableTxById = channel.unary_unary( + '/immudb.schema.ImmuService/VerifiableTxById', + request_serializer=schema__pb2.VerifiableTxRequest.SerializeToString, + response_deserializer=schema__pb2.VerifiableTx.FromString, + ) + self.TxScan = channel.unary_unary( + '/immudb.schema.ImmuService/TxScan', + request_serializer=schema__pb2.TxScanRequest.SerializeToString, + response_deserializer=schema__pb2.TxList.FromString, + ) + self.History = channel.unary_unary( + '/immudb.schema.ImmuService/History', + request_serializer=schema__pb2.HistoryRequest.SerializeToString, + response_deserializer=schema__pb2.Entries.FromString, + ) + self.ServerInfo = channel.unary_unary( + '/immudb.schema.ImmuService/ServerInfo', + request_serializer=schema__pb2.ServerInfoRequest.SerializeToString, + response_deserializer=schema__pb2.ServerInfoResponse.FromString, + ) + self.Health = channel.unary_unary( + '/immudb.schema.ImmuService/Health', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=schema__pb2.HealthResponse.FromString, + ) + self.DatabaseHealth = channel.unary_unary( + '/immudb.schema.ImmuService/DatabaseHealth', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=schema__pb2.DatabaseHealthResponse.FromString, + ) + self.CurrentState = channel.unary_unary( + '/immudb.schema.ImmuService/CurrentState', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=schema__pb2.ImmutableState.FromString, + ) + self.SetReference = channel.unary_unary( + '/immudb.schema.ImmuService/SetReference', + request_serializer=schema__pb2.ReferenceRequest.SerializeToString, + response_deserializer=schema__pb2.TxHeader.FromString, + ) + self.VerifiableSetReference = channel.unary_unary( + '/immudb.schema.ImmuService/VerifiableSetReference', + request_serializer=schema__pb2.VerifiableReferenceRequest.SerializeToString, + response_deserializer=schema__pb2.VerifiableTx.FromString, + ) + self.ZAdd = channel.unary_unary( + '/immudb.schema.ImmuService/ZAdd', + request_serializer=schema__pb2.ZAddRequest.SerializeToString, + response_deserializer=schema__pb2.TxHeader.FromString, + ) + self.VerifiableZAdd = channel.unary_unary( + '/immudb.schema.ImmuService/VerifiableZAdd', + request_serializer=schema__pb2.VerifiableZAddRequest.SerializeToString, + response_deserializer=schema__pb2.VerifiableTx.FromString, + ) + self.ZScan = channel.unary_unary( + '/immudb.schema.ImmuService/ZScan', + request_serializer=schema__pb2.ZScanRequest.SerializeToString, + response_deserializer=schema__pb2.ZEntries.FromString, + ) + self.CreateDatabase = channel.unary_unary( + '/immudb.schema.ImmuService/CreateDatabase', + request_serializer=schema__pb2.Database.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.CreateDatabaseWith = channel.unary_unary( + '/immudb.schema.ImmuService/CreateDatabaseWith', + request_serializer=schema__pb2.DatabaseSettings.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.CreateDatabaseV2 = channel.unary_unary( + '/immudb.schema.ImmuService/CreateDatabaseV2', + request_serializer=schema__pb2.CreateDatabaseRequest.SerializeToString, + response_deserializer=schema__pb2.CreateDatabaseResponse.FromString, + ) + self.LoadDatabase = channel.unary_unary( + '/immudb.schema.ImmuService/LoadDatabase', + request_serializer=schema__pb2.LoadDatabaseRequest.SerializeToString, + response_deserializer=schema__pb2.LoadDatabaseResponse.FromString, + ) + self.UnloadDatabase = channel.unary_unary( + '/immudb.schema.ImmuService/UnloadDatabase', + request_serializer=schema__pb2.UnloadDatabaseRequest.SerializeToString, + response_deserializer=schema__pb2.UnloadDatabaseResponse.FromString, + ) + self.DeleteDatabase = channel.unary_unary( + '/immudb.schema.ImmuService/DeleteDatabase', + request_serializer=schema__pb2.DeleteDatabaseRequest.SerializeToString, + response_deserializer=schema__pb2.DeleteDatabaseResponse.FromString, + ) + self.DatabaseList = channel.unary_unary( + '/immudb.schema.ImmuService/DatabaseList', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=schema__pb2.DatabaseListResponse.FromString, + ) + self.DatabaseListV2 = channel.unary_unary( + '/immudb.schema.ImmuService/DatabaseListV2', + request_serializer=schema__pb2.DatabaseListRequestV2.SerializeToString, + response_deserializer=schema__pb2.DatabaseListResponseV2.FromString, + ) + self.UseDatabase = channel.unary_unary( + '/immudb.schema.ImmuService/UseDatabase', + request_serializer=schema__pb2.Database.SerializeToString, + response_deserializer=schema__pb2.UseDatabaseReply.FromString, + ) + self.UpdateDatabase = channel.unary_unary( + '/immudb.schema.ImmuService/UpdateDatabase', + request_serializer=schema__pb2.DatabaseSettings.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.UpdateDatabaseV2 = channel.unary_unary( + '/immudb.schema.ImmuService/UpdateDatabaseV2', + request_serializer=schema__pb2.UpdateDatabaseRequest.SerializeToString, + response_deserializer=schema__pb2.UpdateDatabaseResponse.FromString, + ) + self.GetDatabaseSettings = channel.unary_unary( + '/immudb.schema.ImmuService/GetDatabaseSettings', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=schema__pb2.DatabaseSettings.FromString, + ) + self.GetDatabaseSettingsV2 = channel.unary_unary( + '/immudb.schema.ImmuService/GetDatabaseSettingsV2', + request_serializer=schema__pb2.DatabaseSettingsRequest.SerializeToString, + response_deserializer=schema__pb2.DatabaseSettingsResponse.FromString, + ) + self.FlushIndex = channel.unary_unary( + '/immudb.schema.ImmuService/FlushIndex', + request_serializer=schema__pb2.FlushIndexRequest.SerializeToString, + response_deserializer=schema__pb2.FlushIndexResponse.FromString, + ) + self.CompactIndex = channel.unary_unary( + '/immudb.schema.ImmuService/CompactIndex', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + ) + self.streamGet = channel.unary_stream( + '/immudb.schema.ImmuService/streamGet', + request_serializer=schema__pb2.KeyRequest.SerializeToString, + response_deserializer=schema__pb2.Chunk.FromString, + ) + self.streamSet = channel.stream_unary( + '/immudb.schema.ImmuService/streamSet', + request_serializer=schema__pb2.Chunk.SerializeToString, + response_deserializer=schema__pb2.TxHeader.FromString, + ) + self.streamVerifiableGet = channel.unary_stream( + '/immudb.schema.ImmuService/streamVerifiableGet', + request_serializer=schema__pb2.VerifiableGetRequest.SerializeToString, + response_deserializer=schema__pb2.Chunk.FromString, + ) + self.streamVerifiableSet = channel.stream_unary( + '/immudb.schema.ImmuService/streamVerifiableSet', + request_serializer=schema__pb2.Chunk.SerializeToString, + response_deserializer=schema__pb2.VerifiableTx.FromString, + ) + self.streamScan = channel.unary_stream( + '/immudb.schema.ImmuService/streamScan', + request_serializer=schema__pb2.ScanRequest.SerializeToString, + response_deserializer=schema__pb2.Chunk.FromString, + ) + self.streamZScan = channel.unary_stream( + '/immudb.schema.ImmuService/streamZScan', + request_serializer=schema__pb2.ZScanRequest.SerializeToString, + response_deserializer=schema__pb2.Chunk.FromString, + ) + self.streamHistory = channel.unary_stream( + '/immudb.schema.ImmuService/streamHistory', + request_serializer=schema__pb2.HistoryRequest.SerializeToString, + response_deserializer=schema__pb2.Chunk.FromString, + ) + self.streamExecAll = channel.stream_unary( + '/immudb.schema.ImmuService/streamExecAll', + request_serializer=schema__pb2.Chunk.SerializeToString, + response_deserializer=schema__pb2.TxHeader.FromString, + ) + self.exportTx = channel.unary_stream( + '/immudb.schema.ImmuService/exportTx', + request_serializer=schema__pb2.ExportTxRequest.SerializeToString, + response_deserializer=schema__pb2.Chunk.FromString, + ) + self.replicateTx = channel.stream_unary( + '/immudb.schema.ImmuService/replicateTx', + request_serializer=schema__pb2.Chunk.SerializeToString, + response_deserializer=schema__pb2.TxHeader.FromString, + ) + self.SQLExec = channel.unary_unary( + '/immudb.schema.ImmuService/SQLExec', + request_serializer=schema__pb2.SQLExecRequest.SerializeToString, + response_deserializer=schema__pb2.SQLExecResult.FromString, + ) + self.SQLQuery = channel.unary_unary( + '/immudb.schema.ImmuService/SQLQuery', + request_serializer=schema__pb2.SQLQueryRequest.SerializeToString, + response_deserializer=schema__pb2.SQLQueryResult.FromString, + ) + self.ListTables = channel.unary_unary( + '/immudb.schema.ImmuService/ListTables', + request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + response_deserializer=schema__pb2.SQLQueryResult.FromString, + ) + self.DescribeTable = channel.unary_unary( + '/immudb.schema.ImmuService/DescribeTable', + request_serializer=schema__pb2.Table.SerializeToString, + response_deserializer=schema__pb2.SQLQueryResult.FromString, + ) + self.VerifiableSQLGet = channel.unary_unary( + '/immudb.schema.ImmuService/VerifiableSQLGet', + request_serializer=schema__pb2.VerifiableSQLGetRequest.SerializeToString, + response_deserializer=schema__pb2.VerifiableSQLEntry.FromString, + ) -class ImmuServiceServicer(object): - """immudb gRPC & REST service - """ - - def ListUsers(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CreateUser(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ChangePassword(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ChangePermission(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def SetActiveUser(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def UpdateAuthConfig(self, request, context): - """DEPRECATED - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - def UpdateMTLSConfig(self, request, context): - """DEPRECATED - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def OpenSession(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CloseSession(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def KeepAlive(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def NewTx(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Commit(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Rollback(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def TxSQLExec(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def TxSQLQuery(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Login(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Logout(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Set(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def VerifiableSet(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Get(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def VerifiableGet(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Delete(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetAll(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ExecAll(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Scan(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Count(self, request, context): - """NOT YET SUPPORTED +class ImmuServiceServicer(object): + """immudb gRPC & REST service """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - def CountAll(self, request, context): - """NOT YET SUPPORTED - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def TxById(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def VerifiableTxById(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def TxScan(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def History(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def Health(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def DatabaseHealth(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CurrentState(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def SetReference(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def VerifiableSetReference(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ZAdd(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def VerifiableZAdd(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ZScan(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CreateDatabase(self, request, context): - """DEPRECATED: kept for backward compatibility - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CreateDatabaseWith(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CreateDatabaseV2(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def LoadDatabase(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def UnloadDatabase(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def DeleteDatabase(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def DatabaseList(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def DatabaseListV2(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def UseDatabase(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def UpdateDatabase(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def UpdateDatabaseV2(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetDatabaseSettings(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def GetDatabaseSettingsV2(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def FlushIndex(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def CompactIndex(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def streamGet(self, request, context): - """Streams - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def streamSet(self, request_iterator, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def streamVerifiableGet(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def streamVerifiableSet(self, request_iterator, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def streamScan(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def streamZScan(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def streamHistory(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def streamExecAll(self, request_iterator, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def exportTx(self, request, context): - """Replication - """ - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def replicateTx(self, request_iterator, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def SQLExec(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def SQLQuery(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def ListTables(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def DescribeTable(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') - - def VerifiableSQLGet(self, request, context): - # missing associated documentation comment in .proto file - pass - context.set_code(grpc.StatusCode.UNIMPLEMENTED) - context.set_details('Method not implemented!') - raise NotImplementedError('Method not implemented!') + def ListUsers(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateUser(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ChangePassword(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ChangePermission(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetActiveUser(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateAuthConfig(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateMTLSConfig(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def OpenSession(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CloseSession(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def KeepAlive(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def NewTx(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Commit(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Rollback(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def TxSQLExec(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def TxSQLQuery(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Login(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Logout(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Set(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VerifiableSet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Get(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VerifiableGet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Delete(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetAll(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ExecAll(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Scan(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Count(self, request, context): + """NOT YET SUPPORTED + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CountAll(self, request, context): + """NOT YET SUPPORTED + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def TxById(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VerifiableTxById(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def TxScan(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def History(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ServerInfo(self, request, context): + """ServerInfo returns information about the server instance. + ServerInfoRequest is defined for future extensions. + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def Health(self, request, context): + """DEPRECATED: Use ServerInfo + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DatabaseHealth(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CurrentState(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SetReference(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VerifiableSetReference(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZAdd(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VerifiableZAdd(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ZScan(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateDatabase(self, request, context): + """DEPRECATED: Use CreateDatabaseV2 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateDatabaseWith(self, request, context): + """DEPRECATED: Use CreateDatabaseV2 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateDatabaseV2(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def LoadDatabase(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UnloadDatabase(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DeleteDatabase(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DatabaseList(self, request, context): + """DEPRECATED: Use DatabaseListV2 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DatabaseListV2(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UseDatabase(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateDatabase(self, request, context): + """DEPRECATED: Use UpdateDatabaseV2 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def UpdateDatabaseV2(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetDatabaseSettings(self, request, context): + """DEPRECATED: Use GetDatabaseSettingsV2 + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def GetDatabaseSettingsV2(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def FlushIndex(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CompactIndex(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def streamGet(self, request, context): + """Streams + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def streamSet(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def streamVerifiableGet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def streamVerifiableSet(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def streamScan(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def streamZScan(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def streamHistory(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def streamExecAll(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def exportTx(self, request, context): + """Replication + """ + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def replicateTx(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SQLExec(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def SQLQuery(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def ListTables(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def DescribeTable(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def VerifiableSQLGet(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') def add_ImmuServiceServicer_to_server(servicer, server): - rpc_method_handlers = { - 'ListUsers': grpc.unary_unary_rpc_method_handler( - servicer.ListUsers, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=schema__pb2.UserList.SerializeToString, - ), - 'CreateUser': grpc.unary_unary_rpc_method_handler( - servicer.CreateUser, - request_deserializer=schema__pb2.CreateUserRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'ChangePassword': grpc.unary_unary_rpc_method_handler( - servicer.ChangePassword, - request_deserializer=schema__pb2.ChangePasswordRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'ChangePermission': grpc.unary_unary_rpc_method_handler( - servicer.ChangePermission, - request_deserializer=schema__pb2.ChangePermissionRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'SetActiveUser': grpc.unary_unary_rpc_method_handler( - servicer.SetActiveUser, - request_deserializer=schema__pb2.SetActiveUserRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'UpdateAuthConfig': grpc.unary_unary_rpc_method_handler( - servicer.UpdateAuthConfig, - request_deserializer=schema__pb2.AuthConfig.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'UpdateMTLSConfig': grpc.unary_unary_rpc_method_handler( - servicer.UpdateMTLSConfig, - request_deserializer=schema__pb2.MTLSConfig.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'OpenSession': grpc.unary_unary_rpc_method_handler( - servicer.OpenSession, - request_deserializer=schema__pb2.OpenSessionRequest.FromString, - response_serializer=schema__pb2.OpenSessionResponse.SerializeToString, - ), - 'CloseSession': grpc.unary_unary_rpc_method_handler( - servicer.CloseSession, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'KeepAlive': grpc.unary_unary_rpc_method_handler( - servicer.KeepAlive, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'NewTx': grpc.unary_unary_rpc_method_handler( - servicer.NewTx, - request_deserializer=schema__pb2.NewTxRequest.FromString, - response_serializer=schema__pb2.NewTxResponse.SerializeToString, - ), - 'Commit': grpc.unary_unary_rpc_method_handler( - servicer.Commit, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=schema__pb2.CommittedSQLTx.SerializeToString, - ), - 'Rollback': grpc.unary_unary_rpc_method_handler( - servicer.Rollback, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'TxSQLExec': grpc.unary_unary_rpc_method_handler( - servicer.TxSQLExec, - request_deserializer=schema__pb2.SQLExecRequest.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'TxSQLQuery': grpc.unary_unary_rpc_method_handler( - servicer.TxSQLQuery, - request_deserializer=schema__pb2.SQLQueryRequest.FromString, - response_serializer=schema__pb2.SQLQueryResult.SerializeToString, - ), - 'Login': grpc.unary_unary_rpc_method_handler( - servicer.Login, - request_deserializer=schema__pb2.LoginRequest.FromString, - response_serializer=schema__pb2.LoginResponse.SerializeToString, - ), - 'Logout': grpc.unary_unary_rpc_method_handler( - servicer.Logout, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'Set': grpc.unary_unary_rpc_method_handler( - servicer.Set, - request_deserializer=schema__pb2.SetRequest.FromString, - response_serializer=schema__pb2.TxHeader.SerializeToString, - ), - 'VerifiableSet': grpc.unary_unary_rpc_method_handler( - servicer.VerifiableSet, - request_deserializer=schema__pb2.VerifiableSetRequest.FromString, - response_serializer=schema__pb2.VerifiableTx.SerializeToString, - ), - 'Get': grpc.unary_unary_rpc_method_handler( - servicer.Get, - request_deserializer=schema__pb2.KeyRequest.FromString, - response_serializer=schema__pb2.Entry.SerializeToString, - ), - 'VerifiableGet': grpc.unary_unary_rpc_method_handler( - servicer.VerifiableGet, - request_deserializer=schema__pb2.VerifiableGetRequest.FromString, - response_serializer=schema__pb2.VerifiableEntry.SerializeToString, - ), - 'Delete': grpc.unary_unary_rpc_method_handler( - servicer.Delete, - request_deserializer=schema__pb2.DeleteKeysRequest.FromString, - response_serializer=schema__pb2.TxHeader.SerializeToString, - ), - 'GetAll': grpc.unary_unary_rpc_method_handler( - servicer.GetAll, - request_deserializer=schema__pb2.KeyListRequest.FromString, - response_serializer=schema__pb2.Entries.SerializeToString, - ), - 'ExecAll': grpc.unary_unary_rpc_method_handler( - servicer.ExecAll, - request_deserializer=schema__pb2.ExecAllRequest.FromString, - response_serializer=schema__pb2.TxHeader.SerializeToString, - ), - 'Scan': grpc.unary_unary_rpc_method_handler( - servicer.Scan, - request_deserializer=schema__pb2.ScanRequest.FromString, - response_serializer=schema__pb2.Entries.SerializeToString, - ), - 'Count': grpc.unary_unary_rpc_method_handler( - servicer.Count, - request_deserializer=schema__pb2.KeyPrefix.FromString, - response_serializer=schema__pb2.EntryCount.SerializeToString, - ), - 'CountAll': grpc.unary_unary_rpc_method_handler( - servicer.CountAll, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=schema__pb2.EntryCount.SerializeToString, - ), - 'TxById': grpc.unary_unary_rpc_method_handler( - servicer.TxById, - request_deserializer=schema__pb2.TxRequest.FromString, - response_serializer=schema__pb2.Tx.SerializeToString, - ), - 'VerifiableTxById': grpc.unary_unary_rpc_method_handler( - servicer.VerifiableTxById, - request_deserializer=schema__pb2.VerifiableTxRequest.FromString, - response_serializer=schema__pb2.VerifiableTx.SerializeToString, - ), - 'TxScan': grpc.unary_unary_rpc_method_handler( - servicer.TxScan, - request_deserializer=schema__pb2.TxScanRequest.FromString, - response_serializer=schema__pb2.TxList.SerializeToString, - ), - 'History': grpc.unary_unary_rpc_method_handler( - servicer.History, - request_deserializer=schema__pb2.HistoryRequest.FromString, - response_serializer=schema__pb2.Entries.SerializeToString, - ), - 'Health': grpc.unary_unary_rpc_method_handler( - servicer.Health, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=schema__pb2.HealthResponse.SerializeToString, - ), - 'DatabaseHealth': grpc.unary_unary_rpc_method_handler( - servicer.DatabaseHealth, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=schema__pb2.DatabaseHealthResponse.SerializeToString, - ), - 'CurrentState': grpc.unary_unary_rpc_method_handler( - servicer.CurrentState, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=schema__pb2.ImmutableState.SerializeToString, - ), - 'SetReference': grpc.unary_unary_rpc_method_handler( - servicer.SetReference, - request_deserializer=schema__pb2.ReferenceRequest.FromString, - response_serializer=schema__pb2.TxHeader.SerializeToString, - ), - 'VerifiableSetReference': grpc.unary_unary_rpc_method_handler( - servicer.VerifiableSetReference, - request_deserializer=schema__pb2.VerifiableReferenceRequest.FromString, - response_serializer=schema__pb2.VerifiableTx.SerializeToString, - ), - 'ZAdd': grpc.unary_unary_rpc_method_handler( - servicer.ZAdd, - request_deserializer=schema__pb2.ZAddRequest.FromString, - response_serializer=schema__pb2.TxHeader.SerializeToString, - ), - 'VerifiableZAdd': grpc.unary_unary_rpc_method_handler( - servicer.VerifiableZAdd, - request_deserializer=schema__pb2.VerifiableZAddRequest.FromString, - response_serializer=schema__pb2.VerifiableTx.SerializeToString, - ), - 'ZScan': grpc.unary_unary_rpc_method_handler( - servicer.ZScan, - request_deserializer=schema__pb2.ZScanRequest.FromString, - response_serializer=schema__pb2.ZEntries.SerializeToString, - ), - 'CreateDatabase': grpc.unary_unary_rpc_method_handler( - servicer.CreateDatabase, - request_deserializer=schema__pb2.Database.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'CreateDatabaseWith': grpc.unary_unary_rpc_method_handler( - servicer.CreateDatabaseWith, - request_deserializer=schema__pb2.DatabaseSettings.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'CreateDatabaseV2': grpc.unary_unary_rpc_method_handler( - servicer.CreateDatabaseV2, - request_deserializer=schema__pb2.CreateDatabaseRequest.FromString, - response_serializer=schema__pb2.CreateDatabaseResponse.SerializeToString, - ), - 'LoadDatabase': grpc.unary_unary_rpc_method_handler( - servicer.LoadDatabase, - request_deserializer=schema__pb2.LoadDatabaseRequest.FromString, - response_serializer=schema__pb2.LoadDatabaseResponse.SerializeToString, - ), - 'UnloadDatabase': grpc.unary_unary_rpc_method_handler( - servicer.UnloadDatabase, - request_deserializer=schema__pb2.UnloadDatabaseRequest.FromString, - response_serializer=schema__pb2.UnloadDatabaseResponse.SerializeToString, - ), - 'DeleteDatabase': grpc.unary_unary_rpc_method_handler( - servicer.DeleteDatabase, - request_deserializer=schema__pb2.DeleteDatabaseRequest.FromString, - response_serializer=schema__pb2.DeleteDatabaseResponse.SerializeToString, - ), - 'DatabaseList': grpc.unary_unary_rpc_method_handler( - servicer.DatabaseList, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=schema__pb2.DatabaseListResponse.SerializeToString, - ), - 'DatabaseListV2': grpc.unary_unary_rpc_method_handler( - servicer.DatabaseListV2, - request_deserializer=schema__pb2.DatabaseListRequestV2.FromString, - response_serializer=schema__pb2.DatabaseListResponseV2.SerializeToString, - ), - 'UseDatabase': grpc.unary_unary_rpc_method_handler( - servicer.UseDatabase, - request_deserializer=schema__pb2.Database.FromString, - response_serializer=schema__pb2.UseDatabaseReply.SerializeToString, - ), - 'UpdateDatabase': grpc.unary_unary_rpc_method_handler( - servicer.UpdateDatabase, - request_deserializer=schema__pb2.DatabaseSettings.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'UpdateDatabaseV2': grpc.unary_unary_rpc_method_handler( - servicer.UpdateDatabaseV2, - request_deserializer=schema__pb2.UpdateDatabaseRequest.FromString, - response_serializer=schema__pb2.UpdateDatabaseResponse.SerializeToString, - ), - 'GetDatabaseSettings': grpc.unary_unary_rpc_method_handler( - servicer.GetDatabaseSettings, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=schema__pb2.DatabaseSettings.SerializeToString, - ), - 'GetDatabaseSettingsV2': grpc.unary_unary_rpc_method_handler( - servicer.GetDatabaseSettingsV2, - request_deserializer=schema__pb2.DatabaseSettingsRequest.FromString, - response_serializer=schema__pb2.DatabaseSettingsResponse.SerializeToString, - ), - 'FlushIndex': grpc.unary_unary_rpc_method_handler( - servicer.FlushIndex, - request_deserializer=schema__pb2.FlushIndexRequest.FromString, - response_serializer=schema__pb2.FlushIndexResponse.SerializeToString, - ), - 'CompactIndex': grpc.unary_unary_rpc_method_handler( - servicer.CompactIndex, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, - ), - 'streamGet': grpc.unary_stream_rpc_method_handler( - servicer.streamGet, - request_deserializer=schema__pb2.KeyRequest.FromString, - response_serializer=schema__pb2.Chunk.SerializeToString, - ), - 'streamSet': grpc.stream_unary_rpc_method_handler( - servicer.streamSet, - request_deserializer=schema__pb2.Chunk.FromString, - response_serializer=schema__pb2.TxHeader.SerializeToString, - ), - 'streamVerifiableGet': grpc.unary_stream_rpc_method_handler( - servicer.streamVerifiableGet, - request_deserializer=schema__pb2.VerifiableGetRequest.FromString, - response_serializer=schema__pb2.Chunk.SerializeToString, - ), - 'streamVerifiableSet': grpc.stream_unary_rpc_method_handler( - servicer.streamVerifiableSet, - request_deserializer=schema__pb2.Chunk.FromString, - response_serializer=schema__pb2.VerifiableTx.SerializeToString, - ), - 'streamScan': grpc.unary_stream_rpc_method_handler( - servicer.streamScan, - request_deserializer=schema__pb2.ScanRequest.FromString, - response_serializer=schema__pb2.Chunk.SerializeToString, - ), - 'streamZScan': grpc.unary_stream_rpc_method_handler( - servicer.streamZScan, - request_deserializer=schema__pb2.ZScanRequest.FromString, - response_serializer=schema__pb2.Chunk.SerializeToString, - ), - 'streamHistory': grpc.unary_stream_rpc_method_handler( - servicer.streamHistory, - request_deserializer=schema__pb2.HistoryRequest.FromString, - response_serializer=schema__pb2.Chunk.SerializeToString, - ), - 'streamExecAll': grpc.stream_unary_rpc_method_handler( - servicer.streamExecAll, - request_deserializer=schema__pb2.Chunk.FromString, - response_serializer=schema__pb2.TxHeader.SerializeToString, - ), - 'exportTx': grpc.unary_stream_rpc_method_handler( - servicer.exportTx, - request_deserializer=schema__pb2.ExportTxRequest.FromString, - response_serializer=schema__pb2.Chunk.SerializeToString, - ), - 'replicateTx': grpc.stream_unary_rpc_method_handler( - servicer.replicateTx, - request_deserializer=schema__pb2.Chunk.FromString, - response_serializer=schema__pb2.TxHeader.SerializeToString, - ), - 'SQLExec': grpc.unary_unary_rpc_method_handler( - servicer.SQLExec, - request_deserializer=schema__pb2.SQLExecRequest.FromString, - response_serializer=schema__pb2.SQLExecResult.SerializeToString, - ), - 'SQLQuery': grpc.unary_unary_rpc_method_handler( - servicer.SQLQuery, - request_deserializer=schema__pb2.SQLQueryRequest.FromString, - response_serializer=schema__pb2.SQLQueryResult.SerializeToString, - ), - 'ListTables': grpc.unary_unary_rpc_method_handler( - servicer.ListTables, - request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, - response_serializer=schema__pb2.SQLQueryResult.SerializeToString, - ), - 'DescribeTable': grpc.unary_unary_rpc_method_handler( - servicer.DescribeTable, - request_deserializer=schema__pb2.Table.FromString, - response_serializer=schema__pb2.SQLQueryResult.SerializeToString, - ), - 'VerifiableSQLGet': grpc.unary_unary_rpc_method_handler( - servicer.VerifiableSQLGet, - request_deserializer=schema__pb2.VerifiableSQLGetRequest.FromString, - response_serializer=schema__pb2.VerifiableSQLEntry.SerializeToString, - ), - } - generic_handler = grpc.method_handlers_generic_handler( - 'immudb.schema.ImmuService', rpc_method_handlers) - server.add_generic_rpc_handlers((generic_handler,)) + rpc_method_handlers = { + 'ListUsers': grpc.unary_unary_rpc_method_handler( + servicer.ListUsers, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=schema__pb2.UserList.SerializeToString, + ), + 'CreateUser': grpc.unary_unary_rpc_method_handler( + servicer.CreateUser, + request_deserializer=schema__pb2.CreateUserRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'ChangePassword': grpc.unary_unary_rpc_method_handler( + servicer.ChangePassword, + request_deserializer=schema__pb2.ChangePasswordRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'ChangePermission': grpc.unary_unary_rpc_method_handler( + servicer.ChangePermission, + request_deserializer=schema__pb2.ChangePermissionRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'SetActiveUser': grpc.unary_unary_rpc_method_handler( + servicer.SetActiveUser, + request_deserializer=schema__pb2.SetActiveUserRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'UpdateAuthConfig': grpc.unary_unary_rpc_method_handler( + servicer.UpdateAuthConfig, + request_deserializer=schema__pb2.AuthConfig.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'UpdateMTLSConfig': grpc.unary_unary_rpc_method_handler( + servicer.UpdateMTLSConfig, + request_deserializer=schema__pb2.MTLSConfig.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'OpenSession': grpc.unary_unary_rpc_method_handler( + servicer.OpenSession, + request_deserializer=schema__pb2.OpenSessionRequest.FromString, + response_serializer=schema__pb2.OpenSessionResponse.SerializeToString, + ), + 'CloseSession': grpc.unary_unary_rpc_method_handler( + servicer.CloseSession, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'KeepAlive': grpc.unary_unary_rpc_method_handler( + servicer.KeepAlive, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'NewTx': grpc.unary_unary_rpc_method_handler( + servicer.NewTx, + request_deserializer=schema__pb2.NewTxRequest.FromString, + response_serializer=schema__pb2.NewTxResponse.SerializeToString, + ), + 'Commit': grpc.unary_unary_rpc_method_handler( + servicer.Commit, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=schema__pb2.CommittedSQLTx.SerializeToString, + ), + 'Rollback': grpc.unary_unary_rpc_method_handler( + servicer.Rollback, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'TxSQLExec': grpc.unary_unary_rpc_method_handler( + servicer.TxSQLExec, + request_deserializer=schema__pb2.SQLExecRequest.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'TxSQLQuery': grpc.unary_unary_rpc_method_handler( + servicer.TxSQLQuery, + request_deserializer=schema__pb2.SQLQueryRequest.FromString, + response_serializer=schema__pb2.SQLQueryResult.SerializeToString, + ), + 'Login': grpc.unary_unary_rpc_method_handler( + servicer.Login, + request_deserializer=schema__pb2.LoginRequest.FromString, + response_serializer=schema__pb2.LoginResponse.SerializeToString, + ), + 'Logout': grpc.unary_unary_rpc_method_handler( + servicer.Logout, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'Set': grpc.unary_unary_rpc_method_handler( + servicer.Set, + request_deserializer=schema__pb2.SetRequest.FromString, + response_serializer=schema__pb2.TxHeader.SerializeToString, + ), + 'VerifiableSet': grpc.unary_unary_rpc_method_handler( + servicer.VerifiableSet, + request_deserializer=schema__pb2.VerifiableSetRequest.FromString, + response_serializer=schema__pb2.VerifiableTx.SerializeToString, + ), + 'Get': grpc.unary_unary_rpc_method_handler( + servicer.Get, + request_deserializer=schema__pb2.KeyRequest.FromString, + response_serializer=schema__pb2.Entry.SerializeToString, + ), + 'VerifiableGet': grpc.unary_unary_rpc_method_handler( + servicer.VerifiableGet, + request_deserializer=schema__pb2.VerifiableGetRequest.FromString, + response_serializer=schema__pb2.VerifiableEntry.SerializeToString, + ), + 'Delete': grpc.unary_unary_rpc_method_handler( + servicer.Delete, + request_deserializer=schema__pb2.DeleteKeysRequest.FromString, + response_serializer=schema__pb2.TxHeader.SerializeToString, + ), + 'GetAll': grpc.unary_unary_rpc_method_handler( + servicer.GetAll, + request_deserializer=schema__pb2.KeyListRequest.FromString, + response_serializer=schema__pb2.Entries.SerializeToString, + ), + 'ExecAll': grpc.unary_unary_rpc_method_handler( + servicer.ExecAll, + request_deserializer=schema__pb2.ExecAllRequest.FromString, + response_serializer=schema__pb2.TxHeader.SerializeToString, + ), + 'Scan': grpc.unary_unary_rpc_method_handler( + servicer.Scan, + request_deserializer=schema__pb2.ScanRequest.FromString, + response_serializer=schema__pb2.Entries.SerializeToString, + ), + 'Count': grpc.unary_unary_rpc_method_handler( + servicer.Count, + request_deserializer=schema__pb2.KeyPrefix.FromString, + response_serializer=schema__pb2.EntryCount.SerializeToString, + ), + 'CountAll': grpc.unary_unary_rpc_method_handler( + servicer.CountAll, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=schema__pb2.EntryCount.SerializeToString, + ), + 'TxById': grpc.unary_unary_rpc_method_handler( + servicer.TxById, + request_deserializer=schema__pb2.TxRequest.FromString, + response_serializer=schema__pb2.Tx.SerializeToString, + ), + 'VerifiableTxById': grpc.unary_unary_rpc_method_handler( + servicer.VerifiableTxById, + request_deserializer=schema__pb2.VerifiableTxRequest.FromString, + response_serializer=schema__pb2.VerifiableTx.SerializeToString, + ), + 'TxScan': grpc.unary_unary_rpc_method_handler( + servicer.TxScan, + request_deserializer=schema__pb2.TxScanRequest.FromString, + response_serializer=schema__pb2.TxList.SerializeToString, + ), + 'History': grpc.unary_unary_rpc_method_handler( + servicer.History, + request_deserializer=schema__pb2.HistoryRequest.FromString, + response_serializer=schema__pb2.Entries.SerializeToString, + ), + 'ServerInfo': grpc.unary_unary_rpc_method_handler( + servicer.ServerInfo, + request_deserializer=schema__pb2.ServerInfoRequest.FromString, + response_serializer=schema__pb2.ServerInfoResponse.SerializeToString, + ), + 'Health': grpc.unary_unary_rpc_method_handler( + servicer.Health, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=schema__pb2.HealthResponse.SerializeToString, + ), + 'DatabaseHealth': grpc.unary_unary_rpc_method_handler( + servicer.DatabaseHealth, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=schema__pb2.DatabaseHealthResponse.SerializeToString, + ), + 'CurrentState': grpc.unary_unary_rpc_method_handler( + servicer.CurrentState, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=schema__pb2.ImmutableState.SerializeToString, + ), + 'SetReference': grpc.unary_unary_rpc_method_handler( + servicer.SetReference, + request_deserializer=schema__pb2.ReferenceRequest.FromString, + response_serializer=schema__pb2.TxHeader.SerializeToString, + ), + 'VerifiableSetReference': grpc.unary_unary_rpc_method_handler( + servicer.VerifiableSetReference, + request_deserializer=schema__pb2.VerifiableReferenceRequest.FromString, + response_serializer=schema__pb2.VerifiableTx.SerializeToString, + ), + 'ZAdd': grpc.unary_unary_rpc_method_handler( + servicer.ZAdd, + request_deserializer=schema__pb2.ZAddRequest.FromString, + response_serializer=schema__pb2.TxHeader.SerializeToString, + ), + 'VerifiableZAdd': grpc.unary_unary_rpc_method_handler( + servicer.VerifiableZAdd, + request_deserializer=schema__pb2.VerifiableZAddRequest.FromString, + response_serializer=schema__pb2.VerifiableTx.SerializeToString, + ), + 'ZScan': grpc.unary_unary_rpc_method_handler( + servicer.ZScan, + request_deserializer=schema__pb2.ZScanRequest.FromString, + response_serializer=schema__pb2.ZEntries.SerializeToString, + ), + 'CreateDatabase': grpc.unary_unary_rpc_method_handler( + servicer.CreateDatabase, + request_deserializer=schema__pb2.Database.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'CreateDatabaseWith': grpc.unary_unary_rpc_method_handler( + servicer.CreateDatabaseWith, + request_deserializer=schema__pb2.DatabaseSettings.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'CreateDatabaseV2': grpc.unary_unary_rpc_method_handler( + servicer.CreateDatabaseV2, + request_deserializer=schema__pb2.CreateDatabaseRequest.FromString, + response_serializer=schema__pb2.CreateDatabaseResponse.SerializeToString, + ), + 'LoadDatabase': grpc.unary_unary_rpc_method_handler( + servicer.LoadDatabase, + request_deserializer=schema__pb2.LoadDatabaseRequest.FromString, + response_serializer=schema__pb2.LoadDatabaseResponse.SerializeToString, + ), + 'UnloadDatabase': grpc.unary_unary_rpc_method_handler( + servicer.UnloadDatabase, + request_deserializer=schema__pb2.UnloadDatabaseRequest.FromString, + response_serializer=schema__pb2.UnloadDatabaseResponse.SerializeToString, + ), + 'DeleteDatabase': grpc.unary_unary_rpc_method_handler( + servicer.DeleteDatabase, + request_deserializer=schema__pb2.DeleteDatabaseRequest.FromString, + response_serializer=schema__pb2.DeleteDatabaseResponse.SerializeToString, + ), + 'DatabaseList': grpc.unary_unary_rpc_method_handler( + servicer.DatabaseList, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=schema__pb2.DatabaseListResponse.SerializeToString, + ), + 'DatabaseListV2': grpc.unary_unary_rpc_method_handler( + servicer.DatabaseListV2, + request_deserializer=schema__pb2.DatabaseListRequestV2.FromString, + response_serializer=schema__pb2.DatabaseListResponseV2.SerializeToString, + ), + 'UseDatabase': grpc.unary_unary_rpc_method_handler( + servicer.UseDatabase, + request_deserializer=schema__pb2.Database.FromString, + response_serializer=schema__pb2.UseDatabaseReply.SerializeToString, + ), + 'UpdateDatabase': grpc.unary_unary_rpc_method_handler( + servicer.UpdateDatabase, + request_deserializer=schema__pb2.DatabaseSettings.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'UpdateDatabaseV2': grpc.unary_unary_rpc_method_handler( + servicer.UpdateDatabaseV2, + request_deserializer=schema__pb2.UpdateDatabaseRequest.FromString, + response_serializer=schema__pb2.UpdateDatabaseResponse.SerializeToString, + ), + 'GetDatabaseSettings': grpc.unary_unary_rpc_method_handler( + servicer.GetDatabaseSettings, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=schema__pb2.DatabaseSettings.SerializeToString, + ), + 'GetDatabaseSettingsV2': grpc.unary_unary_rpc_method_handler( + servicer.GetDatabaseSettingsV2, + request_deserializer=schema__pb2.DatabaseSettingsRequest.FromString, + response_serializer=schema__pb2.DatabaseSettingsResponse.SerializeToString, + ), + 'FlushIndex': grpc.unary_unary_rpc_method_handler( + servicer.FlushIndex, + request_deserializer=schema__pb2.FlushIndexRequest.FromString, + response_serializer=schema__pb2.FlushIndexResponse.SerializeToString, + ), + 'CompactIndex': grpc.unary_unary_rpc_method_handler( + servicer.CompactIndex, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + ), + 'streamGet': grpc.unary_stream_rpc_method_handler( + servicer.streamGet, + request_deserializer=schema__pb2.KeyRequest.FromString, + response_serializer=schema__pb2.Chunk.SerializeToString, + ), + 'streamSet': grpc.stream_unary_rpc_method_handler( + servicer.streamSet, + request_deserializer=schema__pb2.Chunk.FromString, + response_serializer=schema__pb2.TxHeader.SerializeToString, + ), + 'streamVerifiableGet': grpc.unary_stream_rpc_method_handler( + servicer.streamVerifiableGet, + request_deserializer=schema__pb2.VerifiableGetRequest.FromString, + response_serializer=schema__pb2.Chunk.SerializeToString, + ), + 'streamVerifiableSet': grpc.stream_unary_rpc_method_handler( + servicer.streamVerifiableSet, + request_deserializer=schema__pb2.Chunk.FromString, + response_serializer=schema__pb2.VerifiableTx.SerializeToString, + ), + 'streamScan': grpc.unary_stream_rpc_method_handler( + servicer.streamScan, + request_deserializer=schema__pb2.ScanRequest.FromString, + response_serializer=schema__pb2.Chunk.SerializeToString, + ), + 'streamZScan': grpc.unary_stream_rpc_method_handler( + servicer.streamZScan, + request_deserializer=schema__pb2.ZScanRequest.FromString, + response_serializer=schema__pb2.Chunk.SerializeToString, + ), + 'streamHistory': grpc.unary_stream_rpc_method_handler( + servicer.streamHistory, + request_deserializer=schema__pb2.HistoryRequest.FromString, + response_serializer=schema__pb2.Chunk.SerializeToString, + ), + 'streamExecAll': grpc.stream_unary_rpc_method_handler( + servicer.streamExecAll, + request_deserializer=schema__pb2.Chunk.FromString, + response_serializer=schema__pb2.TxHeader.SerializeToString, + ), + 'exportTx': grpc.unary_stream_rpc_method_handler( + servicer.exportTx, + request_deserializer=schema__pb2.ExportTxRequest.FromString, + response_serializer=schema__pb2.Chunk.SerializeToString, + ), + 'replicateTx': grpc.stream_unary_rpc_method_handler( + servicer.replicateTx, + request_deserializer=schema__pb2.Chunk.FromString, + response_serializer=schema__pb2.TxHeader.SerializeToString, + ), + 'SQLExec': grpc.unary_unary_rpc_method_handler( + servicer.SQLExec, + request_deserializer=schema__pb2.SQLExecRequest.FromString, + response_serializer=schema__pb2.SQLExecResult.SerializeToString, + ), + 'SQLQuery': grpc.unary_unary_rpc_method_handler( + servicer.SQLQuery, + request_deserializer=schema__pb2.SQLQueryRequest.FromString, + response_serializer=schema__pb2.SQLQueryResult.SerializeToString, + ), + 'ListTables': grpc.unary_unary_rpc_method_handler( + servicer.ListTables, + request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString, + response_serializer=schema__pb2.SQLQueryResult.SerializeToString, + ), + 'DescribeTable': grpc.unary_unary_rpc_method_handler( + servicer.DescribeTable, + request_deserializer=schema__pb2.Table.FromString, + response_serializer=schema__pb2.SQLQueryResult.SerializeToString, + ), + 'VerifiableSQLGet': grpc.unary_unary_rpc_method_handler( + servicer.VerifiableSQLGet, + request_deserializer=schema__pb2.VerifiableSQLGetRequest.FromString, + response_serializer=schema__pb2.VerifiableSQLEntry.SerializeToString, + ), + } + generic_handler = grpc.method_handlers_generic_handler( + 'immudb.schema.ImmuService', rpc_method_handlers) + server.add_generic_rpc_handlers((generic_handler,)) + + + # This class is part of an EXPERIMENTAL API. +class ImmuService(object): + """immudb gRPC & REST service + """ + + @staticmethod + def ListUsers(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/ListUsers', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + schema__pb2.UserList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateUser(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/CreateUser', + schema__pb2.CreateUserRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ChangePassword(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/ChangePassword', + schema__pb2.ChangePasswordRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ChangePermission(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/ChangePermission', + schema__pb2.ChangePermissionRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetActiveUser(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/SetActiveUser', + schema__pb2.SetActiveUserRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateAuthConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/UpdateAuthConfig', + schema__pb2.AuthConfig.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateMTLSConfig(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/UpdateMTLSConfig', + schema__pb2.MTLSConfig.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def OpenSession(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/OpenSession', + schema__pb2.OpenSessionRequest.SerializeToString, + schema__pb2.OpenSessionResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CloseSession(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/CloseSession', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def KeepAlive(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/KeepAlive', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def NewTx(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/NewTx', + schema__pb2.NewTxRequest.SerializeToString, + schema__pb2.NewTxResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Commit(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/Commit', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + schema__pb2.CommittedSQLTx.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Rollback(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/Rollback', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def TxSQLExec(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/TxSQLExec', + schema__pb2.SQLExecRequest.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def TxSQLQuery(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/TxSQLQuery', + schema__pb2.SQLQueryRequest.SerializeToString, + schema__pb2.SQLQueryResult.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Login(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/Login', + schema__pb2.LoginRequest.SerializeToString, + schema__pb2.LoginResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Logout(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/Logout', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Set(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/Set', + schema__pb2.SetRequest.SerializeToString, + schema__pb2.TxHeader.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def VerifiableSet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/VerifiableSet', + schema__pb2.VerifiableSetRequest.SerializeToString, + schema__pb2.VerifiableTx.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Get(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/Get', + schema__pb2.KeyRequest.SerializeToString, + schema__pb2.Entry.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def VerifiableGet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/VerifiableGet', + schema__pb2.VerifiableGetRequest.SerializeToString, + schema__pb2.VerifiableEntry.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Delete(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/Delete', + schema__pb2.DeleteKeysRequest.SerializeToString, + schema__pb2.TxHeader.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetAll(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/GetAll', + schema__pb2.KeyListRequest.SerializeToString, + schema__pb2.Entries.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ExecAll(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/ExecAll', + schema__pb2.ExecAllRequest.SerializeToString, + schema__pb2.TxHeader.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Scan(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/Scan', + schema__pb2.ScanRequest.SerializeToString, + schema__pb2.Entries.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Count(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/Count', + schema__pb2.KeyPrefix.SerializeToString, + schema__pb2.EntryCount.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CountAll(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/CountAll', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + schema__pb2.EntryCount.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def TxById(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/TxById', + schema__pb2.TxRequest.SerializeToString, + schema__pb2.Tx.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def VerifiableTxById(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/VerifiableTxById', + schema__pb2.VerifiableTxRequest.SerializeToString, + schema__pb2.VerifiableTx.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def TxScan(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/TxScan', + schema__pb2.TxScanRequest.SerializeToString, + schema__pb2.TxList.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def History(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/History', + schema__pb2.HistoryRequest.SerializeToString, + schema__pb2.Entries.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ServerInfo(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/ServerInfo', + schema__pb2.ServerInfoRequest.SerializeToString, + schema__pb2.ServerInfoResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def Health(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/Health', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + schema__pb2.HealthResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DatabaseHealth(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/DatabaseHealth', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + schema__pb2.DatabaseHealthResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CurrentState(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/CurrentState', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + schema__pb2.ImmutableState.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SetReference(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/SetReference', + schema__pb2.ReferenceRequest.SerializeToString, + schema__pb2.TxHeader.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def VerifiableSetReference(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/VerifiableSetReference', + schema__pb2.VerifiableReferenceRequest.SerializeToString, + schema__pb2.VerifiableTx.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ZAdd(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/ZAdd', + schema__pb2.ZAddRequest.SerializeToString, + schema__pb2.TxHeader.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def VerifiableZAdd(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/VerifiableZAdd', + schema__pb2.VerifiableZAddRequest.SerializeToString, + schema__pb2.VerifiableTx.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ZScan(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/ZScan', + schema__pb2.ZScanRequest.SerializeToString, + schema__pb2.ZEntries.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateDatabase(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/CreateDatabase', + schema__pb2.Database.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateDatabaseWith(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/CreateDatabaseWith', + schema__pb2.DatabaseSettings.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateDatabaseV2(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/CreateDatabaseV2', + schema__pb2.CreateDatabaseRequest.SerializeToString, + schema__pb2.CreateDatabaseResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def LoadDatabase(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/LoadDatabase', + schema__pb2.LoadDatabaseRequest.SerializeToString, + schema__pb2.LoadDatabaseResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UnloadDatabase(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/UnloadDatabase', + schema__pb2.UnloadDatabaseRequest.SerializeToString, + schema__pb2.UnloadDatabaseResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DeleteDatabase(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/DeleteDatabase', + schema__pb2.DeleteDatabaseRequest.SerializeToString, + schema__pb2.DeleteDatabaseResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DatabaseList(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/DatabaseList', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + schema__pb2.DatabaseListResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DatabaseListV2(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/DatabaseListV2', + schema__pb2.DatabaseListRequestV2.SerializeToString, + schema__pb2.DatabaseListResponseV2.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UseDatabase(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/UseDatabase', + schema__pb2.Database.SerializeToString, + schema__pb2.UseDatabaseReply.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateDatabase(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/UpdateDatabase', + schema__pb2.DatabaseSettings.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def UpdateDatabaseV2(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/UpdateDatabaseV2', + schema__pb2.UpdateDatabaseRequest.SerializeToString, + schema__pb2.UpdateDatabaseResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetDatabaseSettings(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/GetDatabaseSettings', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + schema__pb2.DatabaseSettings.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def GetDatabaseSettingsV2(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/GetDatabaseSettingsV2', + schema__pb2.DatabaseSettingsRequest.SerializeToString, + schema__pb2.DatabaseSettingsResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def FlushIndex(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/FlushIndex', + schema__pb2.FlushIndexRequest.SerializeToString, + schema__pb2.FlushIndexResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CompactIndex(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/CompactIndex', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + google_dot_protobuf_dot_empty__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def streamGet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/immudb.schema.ImmuService/streamGet', + schema__pb2.KeyRequest.SerializeToString, + schema__pb2.Chunk.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def streamSet(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/immudb.schema.ImmuService/streamSet', + schema__pb2.Chunk.SerializeToString, + schema__pb2.TxHeader.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def streamVerifiableGet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/immudb.schema.ImmuService/streamVerifiableGet', + schema__pb2.VerifiableGetRequest.SerializeToString, + schema__pb2.Chunk.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def streamVerifiableSet(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/immudb.schema.ImmuService/streamVerifiableSet', + schema__pb2.Chunk.SerializeToString, + schema__pb2.VerifiableTx.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def streamScan(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/immudb.schema.ImmuService/streamScan', + schema__pb2.ScanRequest.SerializeToString, + schema__pb2.Chunk.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def streamZScan(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/immudb.schema.ImmuService/streamZScan', + schema__pb2.ZScanRequest.SerializeToString, + schema__pb2.Chunk.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def streamHistory(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/immudb.schema.ImmuService/streamHistory', + schema__pb2.HistoryRequest.SerializeToString, + schema__pb2.Chunk.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def streamExecAll(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/immudb.schema.ImmuService/streamExecAll', + schema__pb2.Chunk.SerializeToString, + schema__pb2.TxHeader.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def exportTx(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_stream(request, target, '/immudb.schema.ImmuService/exportTx', + schema__pb2.ExportTxRequest.SerializeToString, + schema__pb2.Chunk.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def replicateTx(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/immudb.schema.ImmuService/replicateTx', + schema__pb2.Chunk.SerializeToString, + schema__pb2.TxHeader.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SQLExec(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/SQLExec', + schema__pb2.SQLExecRequest.SerializeToString, + schema__pb2.SQLExecResult.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def SQLQuery(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/SQLQuery', + schema__pb2.SQLQueryRequest.SerializeToString, + schema__pb2.SQLQueryResult.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def ListTables(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/ListTables', + google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString, + schema__pb2.SQLQueryResult.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def DescribeTable(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/DescribeTable', + schema__pb2.Table.SerializeToString, + schema__pb2.SQLQueryResult.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def VerifiableSQLGet(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/immudb.schema.ImmuService/VerifiableSQLGet', + schema__pb2.VerifiableSQLGetRequest.SerializeToString, + schema__pb2.VerifiableSQLEntry.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/immudb/handler/listUsers.py b/immudb/handler/listUsers.py index cd5a04e..90eb8b2 100644 --- a/immudb/handler/listUsers.py +++ b/immudb/handler/listUsers.py @@ -23,7 +23,7 @@ class listUsersResponse: userlist: schema_pb2.UserList -def call(service: schema_pb2_grpc.ImmuServiceStub, request: None): +def call(service: schema_pb2_grpc.ImmuServiceStub): NoRequest = Empty() msg = service.ListUsers(NoRequest) return listUsersResponse( diff --git a/immudb/handler/verifiedGet.py b/immudb/handler/verifiedGet.py index 0d84b8e..fbb0522 100644 --- a/immudb/handler/verifiedGet.py +++ b/immudb/handler/verifiedGet.py @@ -20,9 +20,6 @@ import immudb.schema as schema -import sys - - def call(service: schema_pb2_grpc.ImmuServiceStub, rs: RootService, requestkey: bytes, atTx: int = None, verifying_key=None, sinceTx: int = None, atRevision: int = None): state = rs.get() req = schema_pb2.VerifiableGetRequest( diff --git a/immudb/handler/verifiedSQLGet.py b/immudb/handler/verifiedSQLGet.py new file mode 100644 index 0000000..b520bfa --- /dev/null +++ b/immudb/handler/verifiedSQLGet.py @@ -0,0 +1,128 @@ +# Copyright 2022 CodeNotary, Inc. All rights reserved. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from immudb.embedded import store +from immudb.grpc import schema_pb2 +from immudb.grpc import schema_pb2_grpc +from immudb.rootService import RootService, State +from immudb.exceptions import ErrCorruptedData +import immudb.schema as schema +from typing import List +from immudb import datatypesv2 +from immudb.dataconverter import convertResponse + + +def call(service: schema_pb2_grpc.ImmuServiceStub, rs: RootService, table: str, primaryKeys: List[datatypesv2.PrimaryKey], atTx: int, sinceTx: int, verifying_key=None): + state = rs.get() + pkValues = [pk._getGRPC() for pk in primaryKeys] + req = schema_pb2.VerifiableSQLGetRequest( + sqlGetRequest=schema_pb2.SQLGetRequest( + table=table, + pkValues=pkValues, + atTx=atTx, + sinceTx=sinceTx + ), + proveSinceTx=state.txId + ) + ventry = service.VerifiableSQLGet(req) + entrySpecDigest = store.EntrySpecDigestFor( + int(ventry.verifiableTx.tx.header.version)) + inclusionProof = schema.InclusionProofFromProto(ventry.inclusionProof) + dualProof = schema.DualProofFromProto(ventry.verifiableTx.dualProof) + if len(ventry.ColNamesById) == 0: + raise ErrCorruptedData + + dbID = ventry.DatabaseId + tableID = ventry.TableId + valbuf = b'' + for index in range(len(primaryKeys)): + pkCurrent = primaryKeys[index] + pkID = ventry.PKIDs[index] + pkType = ventry.ColTypesById[pkID] + pkLen = ventry.ColLenById[pkID] + pkEncval = store.encodeAsKey(pkCurrent.value, pkCurrent, int(pkLen)) + valbuf += pkEncval + + pkKey = store.sqlMapKey(b'\x02', 'R.', [ + store.encodeID(dbID), store.encodeID( + tableID), store.encodeID(0), valbuf + ]) + vTx = ventry.sqlEntry.tx + e = store.EntrySpec(key=pkKey, value=ventry.sqlEntry.value, md=None) + + if state.txId <= vTx: + eh = schema.DigestFromProto( + ventry.verifiableTx.dualProof.targetTxHeader.eH) + sourceid = state.txId + sourcealh = schema.DigestFromProto(state.txHash) + targetid = vTx + targetalh = dualProof.targetTxHeader.Alh() + else: + eh = schema.DigestFromProto( + ventry.verifiableTx.dualProof.sourceTxHeader.eH) + sourceid = vTx + sourcealh = dualProof.sourceTxHeader.Alh() + targetid = state.txId + targetalh = schema.DigestFromProto(state.txHash) + + verifies = store.VerifyInclusion(inclusionProof, entrySpecDigest(e), eh) + if not verifies: + raise ErrCorruptedData + + if state.txId > 0: + verifies = store.VerifyDualProof( + dualProof, + sourceid, + targetid, + sourcealh, + targetalh) + if not verifies: + raise ErrCorruptedData + newstate = State( + db=state.db, + txId=targetid, + txHash=targetalh, + publicKey=ventry.verifiableTx.signature.publicKey, + signature=ventry.verifiableTx.signature.signature, + ) + if verifying_key != None: + newstate.Verify(verifying_key) + rs.set(newstate) + + simpleList = [x for x in ventry.PKIDs] + ColNamesById = dict() + for key in ventry.ColNamesById: + ColNamesById[key] = ventry.ColNamesById[key] + ColIdsByName = dict() + for key in ventry.ColIdsByName: + ColIdsByName[key] = ventry.ColIdsByName[key] + ColTypesById = dict() + for key in ventry.ColTypesById: + ColTypesById[key] = ventry.ColTypesById[key] + ColLenById = dict() + for key in ventry.ColLenById: + ColLenById[key] = ventry.ColLenById[key] + return datatypesv2.VerifiableSQLEntry( + sqlEntry=datatypesv2.SQLEntry( + tx=ventry.sqlEntry.tx, key=ventry.sqlEntry.key, value=ventry.sqlEntry.value), + verifiableTx=convertResponse(ventry.verifiableTx), + inclusionProof=datatypesv2.InclusionProof( + leaf=inclusionProof.leaf, width=inclusionProof.width, terms=inclusionProof.terms), + DatabaseId=dbID, + TableId=tableID, + PKIDs=simpleList, + ColNamesById=ColNamesById, + ColIdsByName=ColIdsByName, + ColTypesById=ColTypesById, + ColLenById=ColLenById, + verified=True + ) diff --git a/immudb/handler/verifiedtxbyid.py b/immudb/handler/verifiedtxbyid.py index 482ecbe..0a15ac6 100644 --- a/immudb/handler/verifiedtxbyid.py +++ b/immudb/handler/verifiedtxbyid.py @@ -20,18 +20,7 @@ import immudb.schema as schema -def call(service: schema_pb2_grpc.ImmuServiceStub, rs: RootService, tx: int, verifying_key=None): - state = rs.get() - request = schema_pb2.VerifiableTxRequest( - tx=tx, - proveSinceTx=state.txId - ) - try: - vtx = service.VerifiableTxById(request) - except Exception as e: - if hasattr(e, 'details') and e.details() == 'tx not found': - return None - raise e +def verify(vtx, state, verifying_key, rs): dualProof = schema.DualProofFromProto(vtx.dualProof) if state.txId <= vtx.tx.header.id: sourceid = state.txId @@ -66,3 +55,18 @@ def call(service: schema_pb2_grpc.ImmuServiceStub, rs: RootService, tx: int, ver for t in vtx.tx.entries: ret.append(t.key[1:]) return ret + + +def call(service: schema_pb2_grpc.ImmuServiceStub, rs: RootService, tx: int, verifying_key=None): + state = rs.get() + request = schema_pb2.VerifiableTxRequest( + tx=tx, + proveSinceTx=state.txId + ) + try: + vtx = service.VerifiableTxById(request) + except Exception as e: + if hasattr(e, 'details') and e.details() == 'tx not found': + return None + raise e + return verify(vtx, state, verifying_key, rs) diff --git a/immudb/streamsutils.py b/immudb/streamsutils.py new file mode 100644 index 0000000..449dbd5 --- /dev/null +++ b/immudb/streamsutils.py @@ -0,0 +1,286 @@ + +from dataclasses import dataclass +import struct +from this import s +from .grpc.schema_pb2 import VerifiableTx, Entry +from .grpc.schema_pb2 import InclusionProof + + +@dataclass +class KeyHeader: + key: bytes + length: int + refKey: bytes = None + refKeyTx: int = None + tx: int = None + + def getInBytes(self): + return self.length.to_bytes(8, 'big') + self.key + + +@dataclass +class ProvenSinceHeader: + provenSinceTx: int + + def getInBytes(self): + toBytes = self.provenSinceTx.to_bytes(8, 'big') + length2 = int.to_bytes(8, 8, 'big') + return length2 + toBytes + + +@dataclass +class SetHeader: + set: bytes + length: int + + def getInBytes(self): + return self.length.to_bytes(8, 'big') + self.set + + +@dataclass +class ScoreHeader: + score: float + + +@dataclass +class AtTXHeader: + seenAtTx: int + + +@dataclass +class ValueChunkHeader: + chunk: bytes + length: int + + def getInBytes(self): + return self.length.to_bytes(8, 'big') + self.chunk + + +@dataclass +class ValueChunk: + chunk: bytes + left: int + + +@dataclass +class FullKeyValue: + key: bytes + value: bytes + + +class VerifiedGetStreamReader: + def __init__(self, stream): + self.streamToRead = stream + self.reader = self.headerReader + self.valueLength = -1 + self.left = -1 + + def parseVerifiableTx(self, header): + verifiable = VerifiableTx() + verifiable.ParseFromString(header[8:]) + return verifiable + + def parseInclusionProof(self, header): + inclusion = InclusionProof() + inclusion.ParseFromString(header[8:]) + return inclusion + + def parseHeader(self, header: bytes): + length = int.from_bytes(header[0:8], byteorder='big') + en = Entry() + en.ParseFromString(header[8:]) + refkey = en.referencedBy.key + if refkey == b'': + refkey = None + return KeyHeader(length=length, key=en.key, refKey=refkey, refKeyTx=en.referencedBy.tx, tx=en.tx) + + def parseValueHeader(self, header: bytes): + length = int.from_bytes(header[0:8], byteorder='big') + self.valueLength = length + self.left = self.valueLength - len(header[8:]) + return ValueChunk(chunk=header[8:], left=self.left) + + def chunks(self): + for chunk in self.streamToRead: + yield self.reader(chunk) + + def headerReader(self, chunk): + self.reader = self.verifiableTxReader + return self.parseHeader(chunk.content) + + def valueHeaderReader(self, chunk): + self.reader = self.valueReader + readed = self.parseValueHeader(chunk.content) + if (self.left == 0): + self.reader = self.headerReader + return readed + + def valueReader(self, chunk): + self.left = self.left - len(chunk.content) + readed = ValueChunk(chunk=chunk.content, left=self.left) + if (self.left == 0): + self.reader = self.headerReader + return readed + + def verifiableTxReader(self, chunk): + self.reader = self.inclusionProofReader + return self.parseVerifiableTx(chunk.content) + + def inclusionProofReader(self, chunk): + self.reader = self.valueHeaderReader + return self.parseInclusionProof(chunk.content) + + +class StreamReader: + def __init__(self, stream): + self.streamToRead = stream + self.reader = self.headerReader + self.valueLength = -1 + self.left = -1 + + def parseHeader(self, header: bytes): + length = int.from_bytes(header[0:8], byteorder='big') + return KeyHeader(length=length, key=header[8:]) + + def parseValueHeader(self, header: bytes): + length = int.from_bytes(header[0:8], byteorder='big') + self.valueLength = length + self.left = self.valueLength - len(header[8:]) + return ValueChunk(chunk=header[8:], left=self.left) + + def chunks(self): + for chunk in self.streamToRead: + yield self.reader(chunk) + + def headerReader(self, chunk): + self.reader = self.valueHeaderReader + return self.parseHeader(chunk.content) + + def valueHeaderReader(self, chunk): + self.reader = self.valueReader + readed = self.parseValueHeader(chunk.content) + if (self.left == 0): + self.reader = self.headerReader + return readed + + def valueReader(self, chunk): + self.left = self.left - len(chunk.content) + readed = ValueChunk(chunk=chunk.content, left=self.left) + if (self.left == 0): + self.reader = self.headerReader + return readed + + +class ZScanStreamReader: + def __init__(self, stream): + self.streamToRead = stream + self.reader = self.setHeaderReader + self.valueLength = -1 + self.left = -1 + + def parseHeader(self, header: bytes): + length = int.from_bytes(header[0:8], byteorder='big') + return KeyHeader(length=length, key=header[8:]) + + def parseSetHeader(self, header: bytes): + length = int.from_bytes(header[0:8], byteorder='big') + return SetHeader(length=length, set=header[8:]) + + def parseValueHeader(self, header: bytes): + length = int.from_bytes(header[0:8], byteorder='big') + self.valueLength = length + self.left = self.valueLength - len(header[8:]) + return ValueChunk(chunk=header[8:], left=self.left) + + def parseScoreValueHeader(self, header: bytes): + length = int.from_bytes(header[0:8], byteorder='big') + loadedScore = struct.unpack('>d', header[8: 8 + length])[0] + return ScoreHeader(score=loadedScore) + + def parseAtTXHeader(self, header: bytes): + length = int.from_bytes(header[0:8], byteorder='big') + atTx = int.from_bytes(header[8:8 + length], byteorder='big') + return AtTXHeader(seenAtTx=atTx) + + def chunks(self): + for chunk in self.streamToRead: + yield self.reader(chunk) + + def headerReader(self, chunk): + self.reader = self.scoreValueHeaderReader + return self.parseHeader(chunk.content) + + def setHeaderReader(self, chunk): + self.reader = self.headerReader + return self.parseSetHeader(chunk.content) + + def scoreValueHeaderReader(self, chunk): + self.reader = self.atTXHeaderReader + readed = self.parseScoreValueHeader(chunk.content) + return readed + + def atTXHeaderReader(self, chunk): + self.reader = self.valueHeaderReader + readed = self.parseAtTXHeader(chunk.content) + return readed + + def valueHeaderReader(self, chunk): + self.reader = self.valueReader + readed = self.parseValueHeader(chunk.content) + if (self.left == 0): + self.reader = self.setHeaderReader + return readed + + def valueReader(self, chunk): + self.left = self.left - len(chunk.content) + readed = ValueChunk(chunk=chunk.content, left=self.left) + if (self.left == 0): + self.reader = self.setHeaderReader + return readed + + +class BufferedStreamReader: + def __init__(self, chunksGenerator, valueHeader: ValueChunk, stream): + self.chunksGenerator = chunksGenerator + self.size = valueHeader.left + len(valueHeader.chunk) + self.currentChunk = valueHeader.chunk + self.readed = 0 + self.currentChunkOffset = 0 + self.currentChunkLength = len(self.currentChunk) + self.stream = stream + + def __len__(self): + return self.size + + def _read_new_chunk(self): + nextChunk = next(self.chunksGenerator, None) + if (not nextChunk): + self.currentChunk = None + return + self.currentChunk = nextChunk.chunk + self.currentChunkOffset = 0 + self.currentChunkLength = len(self.currentChunk) + + def read(self, length: int = None) -> bytes: + if length == None: + length = self.size + if (self.readed >= self.size): + return None + if (self.readed + length >= self.size): + length = self.size - self.readed + bytesToReturn = self.currentChunk[self.currentChunkOffset: self.currentChunkOffset + length] + self.currentChunkOffset = self.currentChunkOffset + length + while (len(bytesToReturn) < length): + self._read_new_chunk() + if self.currentChunk == None: + self.readed = self.readed + len(bytesToReturn) + return bytesToReturn + self.currentChunkOffset = length - len(bytesToReturn) + bytesToReturn = bytesToReturn + \ + self.currentChunk[0:self.currentChunkOffset] + + self.readed = self.readed + length + return bytesToReturn + + def close(self): + self.stream.cancel() diff --git a/requirements-dev.txt b/requirements-dev.txt index a02f4e4..a3fe9b8 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,5 @@ -r requirements.txt pytest>=4.6.9 -grpcio-tools==1.26.0 \ No newline at end of file +grpcio-tools==1.48.1 +pytz==2022.1 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 78c9db0..28e69e0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ -grpcio>=1.31.0 -protobuf>=3.13.0,<4.0.0 +grpcio==1.48.1 +protobuf>=3.12.0<3.20.x google-api==0.1.12 -google-api-core==1.22.1 -ecdsa>=0.16.1 +googleapis-common-protos==1.56.4 +google-api-core==2.10.0 +ecdsa>=0.18.0 \ No newline at end of file diff --git a/setup.py b/setup.py index cc8e69d..4568112 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ long_description = fh.read() setup(name='immudb-py', - version='1.3.2', + version='1.4.0', license="Apache License Version 2.0", description='Python SDK for Immudb', long_description=long_description, diff --git a/tests/conftest.py b/tests/conftest.py index 06743e6..f3d80ce 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,7 +15,7 @@ # See .github/workflows/ci.yml for the automated tests -TESTURLS = ["localhost:3322", "localhost:3333", "localhost:3344"] +TESTURLS = ["localhost:3322", "localhost:3333", "localhost:3344", "localhost:3355"] @pytest.fixture(scope="module") diff --git a/tests/immu/test_convert_to_grpc.py b/tests/immu/test_convert_to_grpc.py new file mode 100644 index 0000000..f1927fc --- /dev/null +++ b/tests/immu/test_convert_to_grpc.py @@ -0,0 +1,42 @@ +from immudb import grpc +import immudb.datatypesv2 as datatypesv2 +from immudb.grpc.schema_pb2 import Key, ExecAllRequest +from immudb.dataconverter import convertResponse +import immudb.grpc.schema_pb2 as schema + +def test_converting_to_grpc(): + + key = datatypesv2.Key(key = b"tet") + grpcForm = key._getGRPC() + assert type(grpcForm) == Key + assert grpcForm.key == b'tet' + + converted = convertResponse(grpcForm) + assert converted.key == b'tet' + + mustExist = datatypesv2.KeyMustExistPrecondition(key = b'tet') + precondition = datatypesv2.Precondition(mustExist, None, None) + op = datatypesv2.Op(datatypesv2.KeyValue(b'test', b'bbb', None)) + ww = datatypesv2.ExecAllRequest([op], False, [precondition]) + assert isinstance(ww._getGRPC(), ExecAllRequest) + + assert datatypesv2.NullableBool(None)._getGRPC() == None + assert datatypesv2.NullableBool(True)._getGRPC() == schema.NullableBool(value = True) + + assert datatypesv2.NullableFloat(None)._getGRPC() == None + assert datatypesv2.NullableFloat(0.123)._getGRPC() == schema.NullableFloat(value = 0.123) + + assert datatypesv2.NullableMilliseconds(None)._getGRPC() == None + assert datatypesv2.NullableMilliseconds(123123)._getGRPC() == schema.NullableMilliseconds(value = 123123) + + assert datatypesv2.NullableString(None)._getGRPC() == None + assert datatypesv2.NullableString("")._getGRPC() == schema.NullableString(value = "") + + assert datatypesv2.NullableUint32(None)._getGRPC() == None + assert datatypesv2.NullableUint32(0)._getGRPC() == schema.NullableUint32(value = 0) + + assert datatypesv2.NullableUint64(None)._getGRPC() == None + assert datatypesv2.NullableUint64(0)._getGRPC() == schema.NullableUint64(value = 0) + + + diff --git a/tests/immu/test_create_load_database_v2.py b/tests/immu/test_create_load_database_v2.py new file mode 100644 index 0000000..904af88 --- /dev/null +++ b/tests/immu/test_create_load_database_v2.py @@ -0,0 +1,165 @@ +from grpc import RpcError +from immudb import ImmudbClient +from immudb.datatypesv2 import CreateDatabaseRequest, DatabaseNullableSettings, DatabaseSettingsV2, NullableUint32, NullableBool +import uuid +import pytest +from tests.immuTestClient import ImmuTestClient + + +def test_create_database_v2(wrappedClient: ImmuTestClient): + client = wrappedClient.client + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + pytest.skip("Immudb version too low") + name = str(uuid.uuid4()).replace('-', '') + settings = DatabaseSettingsV2( + maxKeyLen=32 + ) + resp = client.createDatabaseV2(name, settings, False) + assert resp.settings.maxKeyLen == 32 + + client.useDatabase(name.encode("utf-8")) + client.set(('x' * 31).encode("utf-8"), b'x') + + with pytest.raises(RpcError): + client.set(('x' * 32).encode("utf-8"), b'x') + + + name = str(uuid.uuid4()).replace('-', '') + settings = DatabaseSettingsV2( + maxKeyLen=32 + ) + client.createDatabaseV2(name, settings, False) + + client.useDatabase(name.encode("utf-8")) + client.set(('x' * 31).encode("utf-8"), b'x') + + with pytest.raises(RpcError): + client.set(('x' * 32).encode("utf-8"), b'x') + +def test_update_database_v2(wrappedClient: ImmuTestClient): + client = wrappedClient.client + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + pytest.skip("Immudb version too low") + name = str(uuid.uuid4()).replace('-', '') + settings = DatabaseNullableSettings( + maxKeyLen=NullableUint32(32) + ) + client.createDatabaseV2(name, settings, False) + + client.useDatabase(name.encode("utf-8")) + client.set(('x' * 31).encode("utf-8"), b'x') + + with pytest.raises(RpcError): + client.set(('x' * 32).encode("utf-8"), b'x') + + settings = DatabaseSettingsV2( + autoload=False + ) + resp = client.updateDatabaseV2(name, settings) + assert resp.settings.autoload == False + + resp = client.databaseListV2() + foundDb = False + + for database in resp.databases: + if database.settings.maxKeyLen == 32 and database.name == name and not database.settings.autoload: + foundDb = True + + assert foundDb == True + + settings = DatabaseSettingsV2( + autoload=True + ) + resp = client.updateDatabaseV2(name, settings) + assert resp.settings.autoload == True + + resp = client.databaseListV2() + foundDb = False + for database in resp.databases: + if database.settings.maxKeyLen == 32 and database.name == name and database.settings.autoload: + foundDb = True + + assert foundDb == True + +def test_list_databases_v2(wrappedClient: ImmuTestClient): + client = wrappedClient.client + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + pytest.skip("Immudb version too low") + name = str(uuid.uuid4()).replace('-', '') + settings = DatabaseSettingsV2( + maxKeyLen=32 + ) + client.createDatabaseV2(name, settings, True) + resp = client.databaseListV2() + foundDb = False + for database in resp.databases: + if database.settings.maxKeyLen == 32 and database.name == name: + foundDb = True + + assert foundDb == True + + name = str(uuid.uuid4()).replace('-', '') + settings = DatabaseSettingsV2( + maxKeyLen=32 + ) + client.createDatabaseV2(name, settings, True) + resp = client.databaseListV2() + foundDb = False + for database in resp.databases: + if database.settings.maxKeyLen == 32 and database.name == name: + foundDb = True + + assert foundDb == True + +def test_load_unload_database(wrappedClient: ImmuTestClient): + client = wrappedClient.client + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + pytest.skip("Immudb version too low") + name = str(uuid.uuid4()).replace('-', '') + settings = DatabaseSettingsV2( + maxKeyLen=32 + ) + client.createDatabaseV2(name, settings, True) + resp = client.unloadDatabase(name) + assert resp.database == name + with pytest.raises(RpcError): + client.useDatabase(resp.database) + + resp = client.loadDatabase(name) + assert resp.database == name + client.useDatabase(resp.database) + +def test_delete_database(wrappedClient: ImmuTestClient): + client = wrappedClient.client + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + pytest.skip("Immudb version too low") + name = str(uuid.uuid4()).replace('-', '') + settings = DatabaseSettingsV2( + maxKeyLen=32 + ) + client.createDatabaseV2(name, settings, True) + client.useDatabase(name) + resp = client.unloadDatabase(name) + assert resp.database == name + resp = client.deleteDatabase(name) + assert resp.database == name + with pytest.raises(RpcError): + client.useDatabase(name) + with pytest.raises(RpcError): + resp = client.set(b"x", b"y") + +def test_get_database_settings_v2(wrappedClient: ImmuTestClient): + client = wrappedClient.client + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + pytest.skip("Immudb version too low") + name = str(uuid.uuid4()).replace('-', '') + settings = DatabaseSettingsV2( + maxKeyLen=32 + ) + client.createDatabaseV2(name, settings, True) + client.useDatabase(name) + settings = client.getDatabaseSettingsV2() + assert settings.database == name + assert settings.settings.maxKeyLen == 32 + + diff --git a/tests/immu/test_database_health.py b/tests/immu/test_database_health.py new file mode 100644 index 0000000..a57ad6a --- /dev/null +++ b/tests/immu/test_database_health.py @@ -0,0 +1,17 @@ +from immudb import ImmudbClient +import datetime +from tests.immuTestClient import ImmuTestClient +import pytest + +def test_database_health(wrappedClient: ImmuTestClient): + client = wrappedClient.client + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + pytest.skip("Immudb version too low") + timeNow = datetime.datetime.now() + client.login("immudb", "immudb", "defaultdb") + client.set(b"x", b"y") + response1 = client.databaseHealth() + assert response1.lastRequestCompletedAt > 0 + timeparsed = datetime.datetime.fromtimestamp(response1.lastRequestCompletedAt/1000) + assert "pendingRequests" in response1.__dict__ + assert timeparsed > timeNow \ No newline at end of file diff --git a/tests/immu/test_export_tx.py b/tests/immu/test_export_tx.py new file mode 100644 index 0000000..696eba0 --- /dev/null +++ b/tests/immu/test_export_tx.py @@ -0,0 +1,38 @@ +import uuid +from immudb import ImmudbClient, datatypesv2 +import uuid +import time +from tests.immuTestClient import ImmuTestClient +import pytest + +def test_export_tx_replicate_tx(wrappedClient: ImmudbClient): + client = wrappedClient.client + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + pytest.skip("Immudb version too low") + newuuid1 = str(uuid.uuid4()).replace("-", "") + client.createDatabaseV2(newuuid1, settings = datatypesv2.DatabaseSettingsV2( + ), ifNotExists=False) + + newuuid2 = str(uuid.uuid4()).replace("-", "") + client.createDatabaseV2(newuuid2, settings = datatypesv2.DatabaseSettingsV2( + replicationSettings=datatypesv2.ReplicationSettings( + replica = True, + ) + ), ifNotExists=False) + client.useDatabase(newuuid1) + tx = client.set(b'kisz123123kaaaa', b'1') + tx = client.set(b'kisz123123kaaaa', b'2') + tx = client.set(b'kisz123123kaaaa', b'3') + tx = client.set(b'kisz123123kaaaa', b'4') + tx = client.set(b'kisz123123kaaaa', b'5') + for index in range(1, tx.id + 1): + resp = client.exportTx(index) + client.useDatabase(newuuid2) + txHeader = client.replicateTx(resp) + assert txHeader.id > 0 + assert txHeader.nentries == 1 + if(index > 1): # First transaction is not db set + assert client.get(b'kisz123123kaaaa').value.decode("utf-8") == str(index - 1) + client.useDatabase(newuuid1) + client.useDatabase(newuuid2) + assert client.get(b'kisz123123kaaaa').value == b'5' \ No newline at end of file diff --git a/tests/immu/test_flush_index.py b/tests/immu/test_flush_index.py new file mode 100644 index 0000000..5624a76 --- /dev/null +++ b/tests/immu/test_flush_index.py @@ -0,0 +1,16 @@ +from grpc import RpcError +from immudb import ImmudbClient +import pytest +from tests.immuTestClient import ImmuTestClient + +def test_flush_index(wrappedClient: ImmuTestClient): + client = wrappedClient.client + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + pytest.skip("Immudb version too low") + response1 = client.flushIndex(10.0, True) + assert response1.database == "defaultdb" + with pytest.raises(RpcError): + response1 = client.flushIndex(101.0, True) + + with pytest.raises(RpcError): + response1 = client.flushIndex(-1, True) \ No newline at end of file diff --git a/tests/immu/test_kvmetadata.py b/tests/immu/test_kvmetadata.py index af52c96..5b3b0ee 100644 --- a/tests/immu/test_kvmetadata.py +++ b/tests/immu/test_kvmetadata.py @@ -33,15 +33,15 @@ def test_kvmetadataproof(self, wrappedClient: ImmuTestClient): metadata.ExpiresAt(expiresAt) metadata.AsNonIndexable(True) - resp = verifiedSet.call(wrappedClient.client._ImmudbClient__stub, - wrappedClient.client._ImmudbClient__rs, key.encode("utf8"), value.encode("utf8"), metadata=metadata) + resp = verifiedSet.call(wrappedClient.client._stub, + wrappedClient.client._rs, key.encode("utf8"), value.encode("utf8"), metadata=metadata) assert resp.verified == True metadata.AsDeleted(True) with pytest.raises(ErrCorruptedData): - resp = verifiedSet.call(wrappedClient.client._ImmudbClient__stub, - wrappedClient.client._ImmudbClient__rs, key.encode("utf8"), value.encode("utf8"), metadata=metadata) + resp = verifiedSet.call(wrappedClient.client._stub, + wrappedClient.client._rs, key.encode("utf8"), value.encode("utf8"), metadata=metadata) else: pytest.skip() diff --git a/tests/immu/test_max_grpc_size.py b/tests/immu/test_max_grpc_size.py new file mode 100644 index 0000000..16b4717 --- /dev/null +++ b/tests/immu/test_max_grpc_size.py @@ -0,0 +1,19 @@ +from grpc import RpcError +from immudb import ImmudbClient +import pytest +from immudb.streamsutils import KeyHeader + + + +def test_stream_get_full(client: ImmudbClient): + key = ('a' * 512).encode('utf-8') + client.set(key, (('x' * 33544432)).encode("utf-8")) + with pytest.raises(RpcError): + client.get(key) # Error because length too big - client side + + client = ImmudbClient(client._url, rs = client._rs, max_grpc_message_length=200 * 1024 * 1024) + client.login("immudb", "immudb") + client.set(key, (('x' * 33544432)).encode("utf-8")) # ~32 mb + client.get(key) + + \ No newline at end of file diff --git a/tests/immu/test_server_info.py b/tests/immu/test_server_info.py new file mode 100644 index 0000000..8f7bfd5 --- /dev/null +++ b/tests/immu/test_server_info.py @@ -0,0 +1,12 @@ +import pytest +from immudb import ImmudbClient +from immudb.datatypesv2 import EntriesSpec, EntryTypeAction, EntryTypeSpec +from tests.immuTestClient import ImmuTestClient +def test_server_info(wrappedClient: ImmuTestClient): + if(not wrappedClient.serverHigherOrEqualsToVersion("1.3.0")): + pytest.skip("Version of immudb too low") + client = wrappedClient.client + response1 = client.serverInfo() + assert response1.version != "" + + assert len(response1.version) > 0 \ No newline at end of file diff --git a/tests/immu/test_sql_verify.py b/tests/immu/test_sql_verify.py new file mode 100644 index 0000000..b77c028 --- /dev/null +++ b/tests/immu/test_sql_verify.py @@ -0,0 +1,113 @@ +# Copyright 2021 CodeNotary, Inc. All rights reserved. + +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import time +from immudb import datatypesv2 +from immudb.handler.sqldescribe import ColumnDescription +from immudb.typeconv import py_to_sqlvalue, sqlvalue_to_py + +from datetime import datetime, timedelta, timezone +import pytz +from tests.immuTestClient import ImmuTestClient +import pytest + + +class TestVerifySQL: + + def test_exec_query(self, wrappedClient: ImmuTestClient): + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + return + tabname = wrappedClient.createTestTable("id INTEGER", "name VARCHAR", "test INTEGER NOT NULL", "PRIMARY KEY (id, test)") + wrappedClient.insertToTable(tabname, ["id", "name", "test"], ["@id", "@name", "@test"], {'id': 1, 'name': 'Joe', "test": 3}) + wrappedClient.insertToTable(tabname, ["id", "name", "test"], ["@id", "@name", "@test"], {'id': 2, 'name': 'Joe', "test": 2}) + wrappedClient.insertToTable(tabname, ["id", "name", "test"], ["@id", "@name", "@test"], {'id': 33, 'name': 'Joe', "test": 111}) + wrappedClient.insertToTable(tabname, ["id", "name", "test"], ["@id", "@name", "@test"], {'id': 3, 'name': 'Joe', "test": 1}) + result = wrappedClient.simpleSelect(tabname, ["id", "name"], {'id': 1}, "id=@id") + assert(len(result) > 0) + assert(result == [(1, "Joe")]) + + ww = wrappedClient.client.verifiableSQLGet( + tabname, [datatypesv2.PrimaryKeyIntValue(1), datatypesv2.PrimaryKeyIntValue(3)] + ) + assert ww.verified == True + + def test_varchar(self, wrappedClient: ImmuTestClient): + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + return + tabname = wrappedClient.createTestTable("name VARCHAR[256]", "test INTEGER NOT NULL", "PRIMARY KEY (name)") + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 1, 'name': 'Joe', "test": 3}) + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 2, 'name': 'Joe1', "test": 2}) + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 33, 'name': 'Joe2', "test": 111}) + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 3, 'name': 'Joe3', "test": 1}) + result = wrappedClient.simpleSelect(tabname, ["name"], {'name': "Joe"}, "name=@name") + assert(len(result) > 0) + assert(result == [("Joe",)]) + + ww = wrappedClient.client.verifiableSQLGet( + tabname, [datatypesv2.PrimaryKeyVarCharValue("Joe")] + ) + assert ww.verified == True + + def test_boolean(self, wrappedClient: ImmuTestClient): + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + return + tabname = wrappedClient.createTestTable("name VARCHAR[256]", "test BOOLEAN NOT NULL", "PRIMARY KEY (name, test)") + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 1, 'name': 'Joe', "test": True}) + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 2, 'name': 'Joe1', "test": False}) + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 33, 'name': 'Joe2', "test": True}) + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 3, 'name': 'Joe3', "test": False}) + result = wrappedClient.simpleSelect(tabname, ["name"], {'name': "Joe"}, "name=@name") + assert(len(result) > 0) + assert(result == [("Joe",)]) + + ww = wrappedClient.client.verifiableSQLGet( + tabname, [datatypesv2.PrimaryKeyVarCharValue("Joe"), datatypesv2.PrimaryKeyBoolValue(True)] + ) + assert ww.verified == True + + def test_blob(self, wrappedClient: ImmuTestClient): + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + return + tabname = wrappedClient.createTestTable("name BLOB[256]", "test BOOLEAN NOT NULL", "PRIMARY KEY (name, test)") + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 1, 'name': b'Joe', "test": True}) + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 2, 'name': b'Joe1', "test": False}) + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 33, 'name': b'Joe2', "test": True}) + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 3, 'name': b'Joe3', "test": False}) + result = wrappedClient.simpleSelect(tabname, ["name"], {'name': b"Joe"}, "name=@name") + assert(len(result) > 0) + assert(result == [(b"Joe",)]) + + ww = wrappedClient.client.verifiableSQLGet( + tabname, [datatypesv2.PrimaryKeyBlobValue(b"Joe"), datatypesv2.PrimaryKeyBoolValue(True)] + ) + assert ww.verified == True + + + def test_ts(self, wrappedClient: ImmuTestClient): + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + return + now = datetime.now().astimezone(timezone.utc) + tabname = wrappedClient.createTestTable("name TIMESTAMP", "test BOOLEAN NOT NULL", "PRIMARY KEY (name, test)") + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 1, 'name': now, "test": True}) + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 2, 'name': now + timedelta(seconds=1), "test": False}) + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 33, 'name': now + timedelta(seconds=2), "test": True}) + wrappedClient.insertToTable(tabname, ["name", "test"], ["@name", "@test"], {'id': 3, 'name': now + timedelta(seconds=3), "test": False}) + result = wrappedClient.simpleSelect(tabname, ["name"], {'name': now}, "name=@name") + assert(len(result) > 0) + assert(result == [(now,)]) + + ww = wrappedClient.client.verifiableSQLGet( + tabname, [datatypesv2.PrimaryKeyTsValue(int(now.timestamp()*1e6)), datatypesv2.PrimaryKeyBoolValue(True)] + ) + assert ww.verified == True + + diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py new file mode 100644 index 0000000..9a60722 --- /dev/null +++ b/tests/immu/test_stream.py @@ -0,0 +1,705 @@ +from datetime import datetime +from io import BytesIO +import uuid +from grpc import RpcError +from immudb import ImmudbClient, datatypes, datatypesv2 +import pytest +from immudb.grpc.schema_pb2 import Chunk +from immudb.streamsutils import KeyHeader, ValueChunkHeader +import random +import string +import tempfile + +def test_stream_get_raw(client: ImmudbClient): + key = ('a' * 512).encode('utf-8') + client.set(key, (('xa' * 11000) + ('ba' * 1100000)).encode("utf-8")) + stream = client._rawStreamGet(key) + first = True + fullValue = b'' + keyHeader = next(stream) + assert keyHeader.key == b'a'*512 + assert keyHeader.length == 512 + for content in stream: + fullValue += content.chunk + assert content.left == 0 + assert len(fullValue) == 1100000 * 2 + 11000 * 2 + assert fullValue == (('xa' * 11000) + ('ba' * 1100000)).encode("utf-8") + +def test_stream_get(client: ImmudbClient): + key = ('x12' * 51).encode('utf-8') + client.set(key, "ba".encode("utf-8")) + keyFrom, buffer = client.streamGet(key) + assert keyFrom == key + readed = buffer.read(10240) + wholeValue = b'' + while readed: + wholeValue += readed + readed = buffer.read(10240) + assert wholeValue == "ba".encode("utf-8") + + key = ('x12' * 51).encode('utf-8') + client.set(key, b"ba"*512) + keyFrom, buffer = client.streamGet(key) + assert keyFrom == key + readed = buffer.read(10) + wholeValue = b'' + while readed: + wholeValue += readed + readed = buffer.read(10) + assert len(wholeValue) == len(b"ba"*512) + assert wholeValue == b"ba"*512 + + key = ('x12' * 51).encode('utf-8') + value = b"one of the test that will test some random words and not generated sequence, so it theoreticaly will lead into edge detection" + client.set(key, value) + keyFrom, buffer = client.streamGet(key) + assert keyFrom == key + readed = buffer.read(1024004040) + wholeValue = b'' + while readed: + wholeValue += readed + readed = buffer.read(1024004040) + assert len(wholeValue) == len(value) + assert wholeValue == value + + key = ('x12' * 51).encode('utf-8') + value = b"one of the test that will test some random words and not generated sequence, so it theoreticaly will lead into edge detection" + client.set(key, value) + keyFrom, buffer = client.streamGet(key) + assert keyFrom == key + readed = buffer.read(1) + wholeValue = b'' + while readed: + wholeValue += readed + readed = buffer.read(1) + assert len(wholeValue) == len(value) + assert wholeValue == value + + + key = ('a' * 512).encode('utf-8') + value = (('xa' * 11000) + ('ba' * 1100000)).encode("utf-8") + client.set(key, value) + keyFrom, buffer = client.streamGet(key) + assert keyFrom == key + readed = buffer.read(1223) + wholeValue = b'' + while readed: + wholeValue += readed + readed = buffer.read(1223) + assert len(wholeValue) == len(value) + assert wholeValue == value + +def _get_test_data(key: str, value: str, bufferReadLength: int): + return ( + key.encode("utf-8"), + value.encode("utf-8"), + bufferReadLength + ) + +testdata = [ + _get_test_data("1", "1", 10240123), + _get_test_data("1", "1", 1), + _get_test_data("1", "1", 2), + _get_test_data("asd"*128, "1", 2), + _get_test_data("asd"*128, "12"*128, 2), + _get_test_data("asd"*128, "13"*128, 1), + _get_test_data("asd"*128, "31"*128, 1024*64), + _get_test_data("1"*100, "123"*1024*1024, 1024*64), + _get_test_data("asd"*128, "asd"*1024*1024, 1024*64), + _get_test_data("asd"*128, "dsadsadsdsa"*1024*1024, 1024), + _get_test_data("asd"*128, "dasdad"*1024*1024, 1024*640), + _get_test_data("asd"*128, "dasdsdsa"*1024*1024, 1024*6400000), + _get_test_data("asd"*128, "1sadsads23"*1024*1024, 65528), # exact chunk size - 8 (first 8 bytes) + _get_test_data("x4"*128, "1sadsads23"*1024*1024, 65535), # exact chunk size - 1 + _get_test_data("x3"*128, "12adsdsads3"*1024*1024, 65537), # exact chunk size + 1 + _get_test_data("x2"*128, "12adsdsads3"*1024*1024, 65536), # exact chunk size + _get_test_data("x2"*128, "12adsdsads3"*1024*1024, 65636), # exact chunk size + 100 + _get_test_data("x1"*128, "b"*33554431, 1024*64), # 31MB case < 32MB, max immudb constraint 33554432 +] + +def determineTestId(val): + if isinstance(val, bytes): + return len(val) + elif isinstance(val, int): + return str(val) + else: + return val + +@pytest.mark.parametrize("key,value,bufferReadLength", testdata, ids = determineTestId) +def test_stream_get_multiple_cases(client: ImmudbClient, key: bytes, value: bytes, bufferReadLength: int): + client.streamSet(key, BytesIO(value), len(value)) + keyFrom, buffer = client.streamGet(key) + assert keyFrom == key + assert len(buffer) == len(value) + assert buffer.size == len(value) + readed = buffer.read(bufferReadLength) + wholeValue = b'' + while readed: + wholeValue += readed + readed = buffer.read(bufferReadLength) + assert len(wholeValue) == len(value) + assert wholeValue == value + + +bigTestData = [ + _get_test_data("asd"*128, "1sadsads23"*1024*1024, 65528), # exact chunk size - 8 (first 8 bytes) + _get_test_data("x4"*128, "1sadsads23"*1024*1024, 65535), # exact chunk size - 1 + _get_test_data("x3"*128, "12adsdsads3"*1024*1024, 65537), # exact chunk size + 1 + _get_test_data("x2"*128, "12adsdsads3"*1024*1024, 65536), # exact chunk size + _get_test_data("x2"*128, "12adsdsads3"*1024*1024, 65636), # exact chunk size + 100 + _get_test_data("x1"*128, "b"*33554431, 1024*64), # 31MB case < 32MB, max immudb constraint 33554432 +] + +@pytest.mark.parametrize("key,value,bufferReadLength", bigTestData, ids = determineTestId) +def test_stream_close_multiple_cases(client: ImmudbClient, key: bytes, value: bytes, bufferReadLength: int): + client.streamSet(key, BytesIO(value), len(value)) + keyFrom, buffer = client.streamGet(key) + assert keyFrom == key + assert len(buffer) == len(value) + assert buffer.size == len(value) + + readed = buffer.read(bufferReadLength) + # Close during running process + buffer.close() + with pytest.raises(RpcError): # Buffer closed + readed = buffer.read(bufferReadLength) + + + +def determineTestId(val): + if isinstance(val, bytes): + return len(val) + elif isinstance(val, int): + return str(val) + else: + return val + +def _get_test_data_set(key, value, chunksize): + return key.encode("utf-8"), BytesIO(value.encode("utf-8")), chunksize + +testdata_set = [ + _get_test_data_set("1", "1", 10240123), + _get_test_data_set("1", "1", 1), + _get_test_data_set("1", "1", 2), + _get_test_data_set("asd"*128, "1", 2), + _get_test_data_set("asd"*128, "12"*128, 2), + _get_test_data_set("asd"*128, "13"*128, 1), + _get_test_data_set("asd"*128, "31"*128, 1024*64), + _get_test_data_set("1"*100, "123"*1024*1024, 1024*64), + _get_test_data_set("asd"*128, "asd"*1024*1024, 1024*64), + _get_test_data_set("asd"*128, "dsadsadsdsa"*1024*1024, 1024), + _get_test_data_set("asd"*128, "dasdad"*1024*1024, 1024*640), + _get_test_data_set("asd"*128, "dasdsdsa"*1024*1024, 1024*6400000), + _get_test_data_set("asd"*128, "1sadsads23"*1024*1024, 65528), # exact chunk size - 8 (first 8 bytes) + _get_test_data_set("x4"*128, "1sadsads23"*1024*1024, 65535), # exact chunk size - 1 + _get_test_data_set("x3"*128, "12adsdsads3"*1024*1024, 65537), # exact chunk size + 1 + _get_test_data_set("x2"*128, "12adsdsads3"*1024*1024, 65536), # exact chunk size + _get_test_data_set("x2"*128, "12adsdsads3"*1024*1024, 65636), # exact chunk size + 100 + _get_test_data_set("x1"*128, "b"*33554431, 1024*64), # 31MB case < 32MB, max immudb constraint 33554432 +] + +@pytest.mark.parametrize("key,value,chunkSize", testdata_set, ids = determineTestId) +def test_stream_set_multiple_cases(client: ImmudbClient, key: bytes, value: BytesIO, chunkSize: int): + txHeader = client.streamSet(key, value, value.getbuffer().nbytes, chunkSize) + assert txHeader.id > 0 + assert txHeader.nentries == 1 + + txHeader = client.streamSetFullValue(key, value.getvalue(), chunkSize) + assert txHeader.id > 0 + assert txHeader.nentries == 1 + + + +def test_stream_scan(client: ImmudbClient): + keyprefix = str(uuid.uuid4()) + client.streamSetFullValue((keyprefix + "X").encode("utf-8"), b'test') + client.streamSetFullValue((keyprefix + "Y").encode("utf-8"), b'test') + entries = client.streamScan(prefix = keyprefix.encode("utf-8")) + kv = next(entries) + assert kv.key == (keyprefix + "X").encode("utf-8") + assert kv.value == b'test' + + kv = next(entries) + assert kv.key == (keyprefix + "Y").encode("utf-8") + assert kv.value == b'test' + + with pytest.raises(StopIteration): + kv = next(entries) + + for kv in client.streamScan(prefix = keyprefix.encode("utf-8")): + assert kv.key.decode("utf-8").startswith(keyprefix) + assert kv.value == b'test' + +def test_stream_scan_one(client: ImmudbClient): + keyprefix = str(uuid.uuid4()) + client.streamSetFullValue((keyprefix + "X").encode("utf-8"), b'test') + entries = client.streamScan(prefix = keyprefix.encode("utf-8")) + kv = next(entries) + assert kv.key == (keyprefix + "X").encode("utf-8") + assert kv.value == b'test' + + with pytest.raises(StopIteration): + kv = next(entries) + + for kv in client.streamScan(prefix = keyprefix.encode("utf-8")): + assert kv.key.decode("utf-8").startswith(keyprefix) + assert kv.value == b'test' + +def test_stream_scan_big(client: ImmudbClient): + keyprefix = str(uuid.uuid4()) + value = b'xab' * 1024 * 1024 + client.streamSetFullValue((keyprefix + "X").encode("utf-8"), value) + entries = client.streamScan(prefix = keyprefix.encode("utf-8")) + kv = next(entries) + assert kv.key == (keyprefix + "X").encode("utf-8") + assert kv.value == value + + with pytest.raises(StopIteration): + kv = next(entries) + + for kv in client.streamScan(prefix = keyprefix.encode("utf-8")): + assert kv.key.decode("utf-8").startswith(keyprefix) + assert kv.value == value + +def test_stream_scan_big_multiple(client: ImmudbClient): + keyprefix = str(uuid.uuid4()) + value = b'xab' * 1024 * 1024 * 10 + client.streamSetFullValue((keyprefix + "X").encode("utf-8"), value) + client.streamSetFullValue((keyprefix + "Y").encode("utf-8"), value) + client.streamSetFullValue((keyprefix + "Z").encode("utf-8"), value) + client.streamSetFullValue((keyprefix + "A").encode("utf-8"), value) + client.streamSetFullValue((keyprefix + "B").encode("utf-8"), value) + entries = client.streamScan(prefix = keyprefix.encode("utf-8")) + + for kv in entries: + assert kv.key.decode("utf-8").startswith(keyprefix) + assert kv.value == value + + toList = list(client.streamScan(prefix = keyprefix.encode("utf-8"))) + assert len(toList) == 5 + assert datatypesv2.KeyValue(key = (keyprefix + "A").encode("utf-8"), value = value) in toList + assert datatypesv2.KeyValue(key = (keyprefix + "B").encode("utf-8"), value = value) in toList + assert datatypesv2.KeyValue(key = (keyprefix + "X").encode("utf-8"), value = value) in toList + assert datatypesv2.KeyValue(key = (keyprefix + "Y").encode("utf-8"), value = value) in toList + assert datatypesv2.KeyValue(key = (keyprefix + "Z").encode("utf-8"), value = value) in toList + +def test_stream_scan_chunked(client: ImmudbClient): + keyprefix = str(uuid.uuid4()) + client.streamSetFullValue((keyprefix + "X").encode("utf-8"), b'test0') + client.streamSetFullValue((keyprefix + "Y").encode("utf-8"), b'test1') + client.streamSetFullValue((keyprefix + "Z").encode("utf-8"), b'test2') + client.streamSetFullValue((keyprefix + "A").encode("utf-8"), b'test3') + client.streamSetFullValue((keyprefix + "B").encode("utf-8"), b'test4') + entries = client.streamScanBuffered(prefix = keyprefix.encode("utf-8")) + index = 0 + for key, buffer in entries: + index += 1 + fullValue = b'' + readed = buffer.read(512) + while readed: + fullValue += readed + readed = buffer.read(512) + assert fullValue.decode("utf-8").startswith("test") + assert len(fullValue) == 5 + assert key.decode("utf-8").startswith(keyprefix) + assert index == 5 + +corner_cases_scan_chunked = [ + (1024, 1, 1), + (1, 1024, 1), + (100, 1024*1024, 100), + (13, 123123, 999), + (3333, 55, 17), + (13333, None, 3), + (1231321, 1111, 99), + (2, None, 99), + (13333333, 102400, 11), + (11, 1231, 8), + (3331, 1024, 99), + (1111, 1024, 99), + (1111, 11, 10), + +] + +@pytest.mark.parametrize("valueSize,readSize,howMuch", corner_cases_scan_chunked, ids = determineTestId) +def test_stream_scan_chunked_corner_cases(client: ImmudbClient, valueSize, readSize, howMuch): + keyprefix = str(uuid.uuid4()) + letters = string.ascii_lowercase + toFound = dict() + found = dict() + for i in range(0, howMuch): + generated = ''.join(random.choice(letters) for i in range(valueSize)).encode("utf-8") + toFound[f"{keyprefix}{i}".encode("utf-8")] = generated + client.streamSetFullValue(f"{keyprefix}{i}".encode("utf-8"), generated) + + entries = client.streamScanBuffered(prefix = keyprefix.encode("utf-8")) + index = 0 + for key, buffer in entries: + index += 1 + fullValue = b'' + readed = buffer.read(readSize) + while readed: + fullValue += readed + readed = buffer.read(readSize) + assert toFound[key] == fullValue + found[key] = True + + for key, value in toFound.items(): + assert found[key] == True + + + assert index == howMuch + +def test_stream_scan_chunked_big(client: ImmudbClient): + keyprefix = str(uuid.uuid4()) + expectedLength = 5 * 1024 * 1024 + client.streamSetFullValue((keyprefix + "X").encode("utf-8"), b'test0' * 1024 * 1024) + client.streamSetFullValue((keyprefix + "Y").encode("utf-8"), b'test1' * 1024 * 1024) + client.streamSetFullValue((keyprefix + "Z").encode("utf-8"), b'test2' * 1024 * 1024) + client.streamSetFullValue((keyprefix + "A").encode("utf-8"), b'test3' * 1024 * 1024) + client.streamSetFullValue((keyprefix + "B").encode("utf-8"), b'test4' * 1024 * 1024) + entries = client.streamScanBuffered(prefix = keyprefix.encode("utf-8")) + index = 0 + for key, buffer in entries: + index += 1 + fullValue = b'' + readed = buffer.read(512) + while readed: + fullValue += readed + readed = buffer.read(512) + assert fullValue.decode("utf-8").startswith("test") + assert len(fullValue) == expectedLength + assert key.decode("utf-8").startswith(keyprefix) + assert index == 5 + +def test_stream_scan_chunked_one(client: ImmudbClient): + keyprefix = str(uuid.uuid4()) + client.streamSetFullValue((keyprefix + "X").encode("utf-8"), b'test0') + entries = client.streamScanBuffered(prefix = keyprefix.encode("utf-8")) + index = 0 + for key, buffer in entries: + index += 1 + assert key == (keyprefix + "X").encode("utf-8") + fullValue = b'' + readed = buffer.read(512) + while readed: + fullValue += readed + readed = buffer.read(512) + assert fullValue.decode("utf-8").startswith("test") + assert len(fullValue) == 5 + assert index == 1 + +def test_stream_redirect(client: ImmudbClient): + keyprefix = str(uuid.uuid4()) + newKeyPrefix = str(uuid.uuid4()) + client.streamSetFullValue((keyprefix + "X").encode("utf-8"), b'test0') + client.streamSetFullValue((keyprefix + "Y").encode("utf-8"), b'test0') + client.streamSetFullValue((keyprefix + "Z").encode("utf-8"), b'test0') + entries = client.streamScanBuffered(prefix = keyprefix.encode("utf-8")) + index = 0 + for key, buffer in entries: + index += 1 + toRedirect = newKeyPrefix.encode("utf-8") + str(index).encode("utf-8") + client.streamSet(toRedirect, buffer, buffer.size) # Simulates redirection from one stream to another + + keyFrom, bufferFrom = client.streamGet(toRedirect) + readed = bufferFrom.read() # Reads full value + assert readed == b'test0' + + assert index == 3 + + +def test_stream_get_full(client: ImmudbClient): + key = ('a' * 512).encode('utf-8') + client.set(key, (('xa' * 11000) + ('ba' * 1100000)).encode("utf-8")) + + kv = client.streamGetFull(key) + + assert len(kv.value) == 1100000 * 2 + 11000 * 2 + assert kv.value == (('xa' * 11000) + ('ba' * 1100000)).encode("utf-8") + + client.setReference(key, b'superref') + kv = client.streamGetFull(b'superref') + + assert len(kv.value) == 1100000 * 2 + 11000 * 2 + assert kv.key == key + assert kv.value == (('xa' * 11000) + ('ba' * 1100000)).encode("utf-8") + +def test_stream_read_full(client: ImmudbClient): + key = ('a' * 512).encode('utf-8') + client.set(key, (('xa' * 11000) + ('ba' * 1100000)).encode("utf-8")) + + keyFrom, buffer = client.streamGet(key) + value = buffer.read() + assert key == keyFrom + + assert len(value) == 1100000 * 2 + 11000 * 2 + assert value == (('xa' * 11000) + ('ba' * 1100000)).encode("utf-8") + +def fake_stream(length = 10240): + ref = BytesIO(('test'*length).encode("utf-8")) + yield Chunk(content = KeyHeader(key = b'test', length=4).getInBytes()) + length = ref.getbuffer().nbytes + firstChunk = ref.read(128) + firstChunk = ValueChunkHeader(chunk = firstChunk, length = length).getInBytes() + yield Chunk(content = firstChunk) + chunk = ref.read(128) + while chunk: + yield Chunk(content = chunk) + chunk = ref.read(128) + + + +def test_stream_set(client: ImmudbClient): + resp = client._rawStreamSet(fake_stream()) + assert resp.id > 0 + assert resp.ts > 0 + + assert client.get(b'test').value == ('test'*10240).encode("utf-8") + + +def test_stream_history(client: ImmudbClient): + key = str(uuid.uuid4()).encode("utf-8") + client.set(key, b'1') + client.set(key, b'2') + client.set(key, b'3') + resp = client.streamHistory(key = key) + value = next(resp) + assert value.key == key + assert value.value == b'1' + value = next(resp) + assert value.key == key + assert value.value == b'2' + value = next(resp) + assert value.key == key + assert value.value == b'3' + with pytest.raises(StopIteration): + value = next(resp) + +def test_stream_history_buffered(client: ImmudbClient): + key = str(uuid.uuid4()).encode("utf-8") + client.set(key, b'1'* 300) + client.set(key, b'2'* 300) + client.set(key, b'3'* 300) + resp = client.streamHistoryBuffered(key) + index = 1 + for keyNow, bufferedReader in resp: + assert keyNow == key + assert bufferedReader.read(256) == str(index).encode("utf-8") * 256 # First 256 + assert bufferedReader.read(256) == str(index).encode("utf-8") * 44 # Last 44 + index += 1 + + +def test_stream_zscan(client: ImmudbClient): + key = str(uuid.uuid4()).encode("utf-8") + key2 = str(uuid.uuid4()).encode("utf-8") + key3 = str(uuid.uuid4()).encode("utf-8") + key4 = str(uuid.uuid4()).encode("utf-8") + set = b'set' + str(uuid.uuid4()).encode("utf-8") + client.set(key, b'b'*356) + client.set(key2, b'b'*356) + client.set(key3, b'b'*356) + client.set(key4, b'b'*356) + client.zAdd(set, 4.0, key) + client.zAdd(set, 3.0, key2) + client.zAdd(set, 5.0, key3) + client.zAdd(set, 6.0, key4) + resp = client.streamZScan(set = set, limit = 2, minScore=3.5) + index = 0 + toFind = 4.0 + lastFind = None + for item in resp: + assert item.score == toFind + assert item.value == b'b' * 356 + assert len(item.key) == 36 + toFind += 1 + index += 1 + lastFind = item.score + + assert lastFind == 5.0 # limit = 2, minScore = 3.5 + + assert index == 2 + + +def test_stream_zscan_buffered(client: ImmudbClient): + key = str(uuid.uuid4()).encode("utf-8") + key2 = str(uuid.uuid4()).encode("utf-8") + key3 = str(uuid.uuid4()).encode("utf-8") + key4 = str(uuid.uuid4()).encode("utf-8") + + set = b'set' + str(uuid.uuid4()).encode("utf-8") + client.set(key, b'b'*356) + client.set(key2, b'b'*356) + client.set(key3, b'b'*356) + client.set(key4, b'b'*356) + client.zAdd(set, 4.0, key) + client.zAdd(set, 3.0, key2) + client.zAdd(set, 5.0, key3) + client.zAdd(set, 6.0, key4) + resp = client.streamZScanBuffered(set = set, limit = 2, minScore=3.5) + index = 0 + toFind = 4.0 + lastFind = None + for item, reader in resp: + assert item.score == toFind + assert reader.read() == b'b' * 356 + assert len(item.key) == 36 + toFind += 1 + index += 1 + lastFind = item.score + + assert index == 2 + assert lastFind == 5.0 # limit = 2, minScore = 3.5 + + +def test_stream_verifiable_get(client: ImmudbClient): + key = str(uuid.uuid4()).encode("utf-8") + + client.set(key, b'test1') + client.set(key, b'test2'*1024) + client.setReference(key, b'ref1') + client.setReference(key, b'ref2') + resp = client.streamVerifiedGet(key = b'ref2') + + assert resp.key == key + assert resp.verified == True + assert resp.value == b'test2'*1024 + assert resp.refkey == b'ref2' + + resp = client.streamVerifiedGet(key = key) + + assert resp.key == key + assert resp.verified == True + assert resp.value == b'test2'*1024 + assert resp.refkey == None + +def test_stream_verifiable_get_buffered(client: ImmudbClient): + key = str(uuid.uuid4()).encode("utf-8") + + client.set(key, b'test1') + client.set(key, b'test2'*1024) + client.setReference(key, b'ref1') + client.setReference(key, b'ref2') + resp, value = client.streamVerifiedGetBuffered(key = b'ref2') + + assert resp.key == key + assert resp.verified == True + assert value.read() == b'test2'*1024 + assert resp.refkey == b'ref2' + + + resp, value = client.streamVerifiedGetBuffered(key = key) + + assert resp.key == key + assert resp.verified == True + assert value.read() == b'test2'*1024 + assert resp.refkey == None + + + +def test_verifiable_stream_set(client: ImmudbClient): + keyToSet = str(uuid.uuid4()).encode("utf-8") + kk = BytesIO(b'123123') + resp = client.streamVerifiedSet(keyToSet, kk, 6, 100) + assert resp.id > 0 + assert resp.verified == True + + assert client.get(keyToSet).value == b'123123' + + keyToSet = str(uuid.uuid4()).encode("utf-8") + kk = BytesIO(b'123123'*1024) + resp = client.streamVerifiedSet(keyToSet, kk, 6*1024, 100) + assert resp.id > 0 + assert resp.verified == True + + assert client.get(keyToSet).value == b'123123'*1024 + + +def test_verifiable_stream_set_fullvalue(client: ImmudbClient): + keyToSet = str(uuid.uuid4()).encode("utf-8") + resp = client.streamVerifiedSetFullValue(keyToSet, b'123123', 100) + assert resp.id > 0 + assert resp.verified == True + + assert client.get(keyToSet).value == b'123123' + + keyToSet = str(uuid.uuid4()).encode("utf-8") + resp = client.streamVerifiedSetFullValue(keyToSet, b'123123'*1024, 100) + assert resp.id > 0 + assert resp.verified == True + + assert client.get(keyToSet).value == b'123123'*1024 + +def test_stream_exec_all(client: ImmudbClient): + keyToSet = str(uuid.uuid4()).encode("utf-8") + keyToSet2 = str(uuid.uuid4()).encode("utf-8") + keyToSet3 = str(uuid.uuid4()).encode("utf-8") + val = b'123'*80000 + val2 = b'321'*80000 + resp = client.streamExecAll([ + datatypes.KeyValue( + key=keyToSet, + value=val + ), + datatypes.StreamingKeyValue(key = keyToSet2, + value = BytesIO(val2), + length = len(val) + ) + ]) + k1 = client.get(keyToSet) + assert k1.value == val + k2 = client.get(keyToSet2) + assert k2.value == val2 + +def test_stream_exec_all_zadd(client: ImmudbClient): + keyToSet = str(uuid.uuid4()).encode("utf-8") + keyToSet2 = str(uuid.uuid4()).encode("utf-8") + keyToSet3 = str(uuid.uuid4()).encode("utf-8") + val = b'123'*80000 + val2 = b'321'*80000 + resp = client.streamExecAll([ + datatypes.KeyValue( + key=keyToSet, + value=val + ), + datatypes.StreamingKeyValue(key = keyToSet2, + value = BytesIO(val2), + length = len(val) + ) + ]) + k1 = client.get(keyToSet) + assert k1.value == val + k2 = client.get(keyToSet2) + assert k2.value == val2 + + + keyToSet = str(uuid.uuid4()).encode("utf-8") + keyToSet2 = str(uuid.uuid4()).encode("utf-8") + keyToSet3 = str(uuid.uuid4()).encode("utf-8") + + setToSet = b"SET" + str(uuid.uuid4()).encode("utf-8") + + val = b'123'*80000 + val2 = b'321'*80000 + resp = client.streamExecAll([ + datatypes.KeyValue( + key=keyToSet, + value=val + ), + datatypes.StreamingKeyValue(key = keyToSet2, + value = BytesIO(val2), + length = len(val) + ), + datatypes.ZAddRequest(set = setToSet, score = 3.0, key = keyToSet) + ]) + assert resp.id > 0 + k1 = client.get(keyToSet) + assert k1.value == val + k2 = client.get(keyToSet2) + assert k2.value == val2 + + k3 = list(client.streamZScan(setToSet)) + assert len(k3) == 1 + assert k3[0].score == 3.0 + assert k3[0].value == val + assert k3[0].key == keyToSet \ No newline at end of file diff --git a/tests/immu/test_tx_scan.py b/tests/immu/test_tx_scan.py new file mode 100644 index 0000000..edd9ba2 --- /dev/null +++ b/tests/immu/test_tx_scan.py @@ -0,0 +1,38 @@ +import pytest +from immudb import ImmudbClient +from immudb.datatypesv2 import EntriesSpec, EntryTypeAction, EntryTypeSpec +from tests.immuTestClient import ImmuTestClient +def test_tx_scan(wrappedClient: ImmuTestClient): + client = wrappedClient.client + if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): + pytest.skip("Immudb version too low") + response1 = client.set(b"x", b"y") + response2 = client.set(b"x1", b"y") + response3 = client.set(b"x2", b"y") + txId = response3.id + result = client.txScan(txId, 3) + assert len(result.txs) == 1 + txId = response2.id + result = client.txScan(txId, 3) + assert len(result.txs) == 2 + txId = response1.id + result = client.txScan(txId, 3) + assert len(result.txs) == 3 + + + result = client.txScan(txId, 3, True) + assert result.txs[0].header.id > result.txs[1].header.id + assert len(result.txs[0].entries) > 0 + + result = client.txScan(txId, 3, False) + assert result.txs[0].header.id < result.txs[1].header.id + assert len(result.txs[0].entries) > 0 + + result = client.txScan(txId, 3, False, EntriesSpec( + kvEntriesSpec=EntryTypeSpec(action = EntryTypeAction.EXCLUDE), + sqlEntriesSpec=EntryTypeSpec(action = EntryTypeAction.RAW_VALUE), + zEntriesSpec=EntryTypeSpec(action = EntryTypeAction.RESOLVE), + )) + assert result.txs[0].kvEntries == None + assert result.txs[0].zEntries == None + assert result.txs[0].entries == None \ No newline at end of file diff --git a/tests/immu/test_user_operations.py b/tests/immu/test_user_operations.py index 72125f6..e6ef1bf 100644 --- a/tests/immu/test_user_operations.py +++ b/tests/immu/test_user_operations.py @@ -11,13 +11,15 @@ # limitations under the License. +from grpc import RpcError +from immudb.client import ImmudbClient import immudb.constants from immudb.grpc import schema_pb2 import string import random import grpc._channel import google.protobuf.empty_pb2 - +import pytest def get_random_name(length): return ''.join(random.choice(string.ascii_lowercase) for i in range(length)) @@ -28,7 +30,7 @@ def get_random_string(length): class TestUser: - def test_users_functions(self, client): + def test_users_functions(self, client: ImmudbClient): users = client.listUsers() assert type(users.userlist.users[0]) == schema_pb2.User @@ -66,3 +68,21 @@ def test_users_functions(self, client): newPassword = "Pw1:"+get_random_string(12) resp = client.changePassword(user, newPassword, password) assert type(resp.reply) == google.protobuf.empty_pb2.Empty + + + with pytest.raises(RpcError): + assert client.setActiveUser(True, "not existing user") == True + + assert client.setActiveUser(True, user) == True + + assert client.setActiveUser(False, user) == True + + # User inactive + with pytest.raises(RpcError): + client.login(user, newPassword) + + + assert client.setActiveUser(True, user) == True + # User again active + client.login(user, newPassword) + diff --git a/tests/immu/test_zfunc.py b/tests/immu/test_zfunc.py index 798ec97..8d3959d 100644 --- a/tests/immu/test_zfunc.py +++ b/tests/immu/test_zfunc.py @@ -38,4 +38,4 @@ def test_zfunc(client): lasttx = resp.id resp = client.zScan(zsetname, b'zset_key_', 0, 0, True, 10, False, 0.0, 10.0, lasttx) - assert len(resp.entries) == 10 + assert len(resp.entries) == 10 \ No newline at end of file diff --git a/tests/starttestcontainers.sh b/tests/starttestcontainers.sh index 9f98a8b..a25f41e 100644 --- a/tests/starttestcontainers.sh +++ b/tests/starttestcontainers.sh @@ -1,6 +1,7 @@ #!/bin/bash cd "$(dirname "$0")" -docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v "$PWD"/certs/my.key.pem:/key.pem -p 3322:3322 codenotary/immudb:1.3.2 --signingKey=/key.pem -docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v "$PWD"/certs/my.key.pem:/key.pem -p 3333:3322 codenotary/immudb:1.2.4 --signingKey=/key.pem -docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v "$PWD"/certs/my.key.pem:/key.pem -p 3344:3322 codenotary/immudb:1.1.0 --signingKey=/key.pem +docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v "$PWD"/certs/my.key.pem:/key.pem -p 3322:3322 codenotary/immudb:1.4.0 --signingKey=/key.pem +docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v "$PWD"/certs/my.key.pem:/key.pem -p 3333:3322 codenotary/immudb:1.3.2 --signingKey=/key.pem +docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v "$PWD"/certs/my.key.pem:/key.pem -p 3344:3322 codenotary/immudb:1.2.4 --signingKey=/key.pem +docker run -d --health-cmd "immuadmin status" --health-interval 10s --health-timeout 5s --health-retries 5 -v "$PWD"/certs/my.key.pem:/key.pem -p 3355:3322 codenotary/immudb:1.1.0 --signingKey=/key.pem