From 62380ed79c7fc681fadf13da29060b64e0a1f692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Mon, 5 Sep 2022 08:49:03 +0200 Subject: [PATCH 01/38] Auto generating schema, docstring --- immudb/client.py | 181 ++++++- immudb/constants.py | 3 + immudb/grpc/Makefile | 19 +- immudb/grpc/proto/schema.proto | 510 +++++++++++++++--- immudb/grpc/schema_pb2.py | 958 +++++++++++++++++++++------------ immudb/grpc/schema_pb2_grpc.py | 48 +- requirements-dev.txt | 2 +- requirements.txt | 1 + 8 files changed, 1285 insertions(+), 437 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index 134bf71..84a6b9c 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -34,22 +34,35 @@ class ImmudbClient: - def __init__(self, immudUrl=None, rs: RootService = None, publicKeyFile: str = None, timeout=None): - if immudUrl is None: - immudUrl = "localhost:3322" + def __init__(self, immudbUrl=None, rs: RootService = None, publicKeyFile: str = None, timeout=None): + """Immudb client + + Args: + immudbUrl (str, optional): url in format host:port, ex. localhost:3322 pointing to your immudb instance. Defaults to None. + rs (RootService, optional): object that implements RootService - to be allow to verify requests. Defaults to None. + publicKeyFile (str, optional): path to the public key that would be used to authenticate requests with. Defaults to None. + timeout (int, optional): global timeout for GRPC requests, if None - it would hang until server respond. Defaults to None. + """ + if immudbUrl is None: + immudbUrl = "localhost:3322" self.timeout = timeout - self.channel = grpc.insecure_channel(immudUrl) + self.channel = grpc.insecure_channel(immudbUrl) self._resetStub() if rs is None: self.__rs = RootService() else: self.__rs = rs - self.__url = immudUrl + self.__url = immudbUrl self.loadKey(publicKeyFile) self.__login_response = None self._session_response = None def loadKey(self, kfile: str): + """Loads public key from path + + Args: + kfile (str): key file path + """ if kfile is None: self.__vk = None else: @@ -57,6 +70,8 @@ def loadKey(self, kfile: str): self.__vk = ecdsa.VerifyingKey.from_pem(f.read()) def shutdown(self): + """Shutdowns client + """ self.channel.close() self.channel = None self.intercept_channel.close @@ -98,6 +113,11 @@ def stub(self): # Not implemented: isConnected # Not implemented: waitForHealthCheck def healthCheck(self): + """Retrieves health response of immudb + + Returns: + HealthResponse: contains status and version + """ return healthcheck.call(self.__stub, self.__rs) # Not implemented: connect @@ -107,6 +127,19 @@ def _convertToBytes(self, what): 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) @@ -132,6 +165,8 @@ def login(self, username, password, database=b"defaultdb"): return self.__login_response def logout(self): + """Logouts all sessions + """ self.__stub.Logout(google_dot_protobuf_dot_empty__pb2.Empty()) self.__login_response = None self._resetStub() @@ -146,9 +181,29 @@ def _resetStub(self): self.__stub = self.get_intercepted_stub() def keepAlive(self): + """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 managed session and returns ManagedSession object within you can manage SQL transactions + + + example of usage: + 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): name of database. Defaults to b"defaultdb". + keepAliveInterval (int, optional): specifies how often keep alive packet should be sent. Defaults to 60. + + Returns: + ManagedSession: managed Session object + """ class ManagedSession: def __init__(this, keepAliveInterval): this.keepAliveInterval = keepAliveInterval @@ -178,6 +233,17 @@ def __exit__(this, type, value, traceback): return ManagedSession(keepAliveInterval) def openSession(self, username, password, database=b"defaultdb"): + """Opens unmanaged session. Unmanaged means that you have to send keep alive packets yourself. + Managed session does it for you + + Args: + username (str): username + password (str): password + database (bytes, optional): database name to switch to. Defaults to b"defaultdb". + + Returns: + Tx: Tx object (handlers/transaction.py) + """ convertedUsername = self._convertToBytes(username) convertedPassword = self._convertToBytes(password) convertedDatabase = self._convertToBytes(database) @@ -192,11 +258,22 @@ def openSession(self, username, password, database=b"defaultdb"): return transaction.Tx(self.__stub, self._session_response, self.channel) def closeSession(self): + """Closes unmanaged session + """ self.__stub.CloseSession(google_dot_protobuf_dot_empty__pb2.Empty()) self._session_response = None 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'), @@ -206,9 +283,22 @@ def createUser(self, user, password, permission, database): return createUser.call(self.__stub, self.__rs, request) def listUsers(self): + """Returns all users on database + + Returns: + ListUserResponse: List containing all users + """ return listUsers.call(self.__stub, None) def changePassword(self, user, newPassword, oldPassword): + """Changes password for user + + Args: + user (str): username + newPassword (str): new password + oldPassword (str): old password + + """ request = schema_pb2_grpc.schema__pb2.ChangePasswordRequest( user=bytes(user, encoding='utf-8'), newPassword=bytes(newPassword, encoding='utf-8'), @@ -216,8 +306,19 @@ def changePassword(self, user, newPassword, oldPassword): ) 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 + + 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 + + Returns: + _type_: _description_ + """ + return changePermission.call(self.__stub, self.__rs, action, user, database, permission) # Not implemented: updateAuthConfig # Not implemented: updateMTLSConfig @@ -229,12 +330,23 @@ def changePermission(self, action, user, database, permissions): # Not implemented: setupDialOptions def databaseList(self): + """Returns database list + + Returns: + list[str]: database names + """ dbs = databaseList.call(self.__stub, self.__rs, None) return [x.databaseName for x in dbs.dblist.databases] # Not implemented: databaseListV2 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) @@ -244,6 +356,12 @@ def createDatabase(self, dbName: bytes): # Not implemented: deleteDatabase 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 @@ -261,26 +379,75 @@ def useDatabase(self, dbName: bytes): # Not implemented: flushIndex def compactIndex(self): + """Starts index compaction + """ self.__stub.CompactIndex(google_dot_protobuf_dot_empty__pb2.Empty()) def health(self): + """Retrieves health response of immudb + + Returns: + HealthResponse: contains status and version + """ return health.call(self.__stub, self.__rs) def currentState(self): + """Return current state of immudb (proof) + + Returns: + State: state of immudb + """ return currentRoot.call(self.__stub, self.__rs, None) def set(self, key: bytes, value: bytes): + """Sets key into value in database + + 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): + """Sets key into value in database, and additionally checks it with state saved before + + 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): + """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) def get(self, key: bytes, atRevision: int = None): + """Gets value for key + + Args: + key (bytes): key + atRevision (int, optional): gets value at revision specified by this argument. It could be relative (-1, -2), or fixed (32). Defaults to None. + + Returns: + GetResponse: contains tx, value, key and revision + """ return get.call(self.__stub, self.__rs, key, atRevision=atRevision) # Not implemented: getSince diff --git a/immudb/constants.py b/immudb/constants.py index ca01cf8..27599d5 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/grpc/Makefile b/immudb/grpc/Makefile index 25c5768..d4626ee 100644 --- a/immudb/grpc/Makefile +++ b/immudb/grpc/Makefile @@ -1,14 +1,25 @@ 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} + 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..c247702 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,7 +16,9 @@ limitations under the License. syntax = "proto3"; +import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; +import "protoc-gen-swagger/options/annotations.proto"; import "google/protobuf/struct.proto"; package immudb.schema; @@ -97,11 +99,11 @@ message Precondition { message KeyMustExistPrecondition { bytes key = 1; } - + message KeyMustNotExistPrecondition { bytes key = 1; } - + message KeyNotModifiedAfterTXPrecondition { bytes key = 1; uint64 txID = 2; @@ -170,11 +172,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 +285,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 +321,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 +386,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 +403,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 +433,7 @@ message VerifiableTxRequest { EntriesSpec entriesSpec = 3; uint64 sinceTx = 4; bool noWait = 5; + bool keepReferencesUnresolved = 6; } message TxScanRequest { @@ -451,11 +478,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 +526,10 @@ message NullableString { string value = 1; } +message NullableMilliseconds { + int64 value = 1; +} + message DatabaseNullableSettings { ReplicationNullableSettings replicationSettings = 2; @@ -518,8 +551,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 +588,11 @@ message IndexNullableSettings { NullableFloat cleanupPercentage = 13; } +message AHTNullableSettings { + NullableUint32 syncThreshold = 1; + NullableUint32 writeBufferSize = 2; +} + message LoadDatabaseRequest { string database = 1; // may add createIfNotExist @@ -736,6 +782,29 @@ message NewTxResponse { } +option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { + info: { + title: "immudb REST API"; + description: "IMPORTANT: All get and safeget functions return base64-encoded keys and values, while all set and safeset functions expect base64-encoded inputs." + }; + security_definitions: { + security: { + key: "bearer" + value: { + type: TYPE_API_KEY + in: IN_HEADER + name: "Authorization" + description: "Authentication token, prefixed by Bearer: Bearer " + } + } + } + security: { + security_requirement: { + key: "bearer" + } + } +}; + message ErrorInfo { string code = 1; string cause = 2; @@ -751,13 +820,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 +872,305 @@ 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: "*" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + security: {} // no security + }; + }; + + 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" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + security: {} // no security + }; + }; + + // DEPRECATED: Use ServerInfo + rpc Health (google.protobuf.Empty) returns (HealthResponse){ + option (google.api.http) = { + get: "/health" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + security: {} // no security + }; + }; + + rpc DatabaseHealth (google.protobuf.Empty) returns (DatabaseHealthResponse){ + option (google.api.http) = { + get: "/db/health" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + security: {} // no security + }; + }; + + rpc CurrentState (google.protobuf.Empty) returns (ImmutableState){ + option (google.api.http) = { + get: "/db/state" + }; + option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { + security: {} // no security + }; + }; + + 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 +1186,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..49cd7a4 100644 --- a/immudb/grpc/schema_pb2.py +++ b/immudb/grpc/schema_pb2.py @@ -14,7 +14,9 @@ _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 protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 @@ -22,10 +24,10 @@ 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') + serialized_options=_b('Z+github.com/codenotary/immudb/pkg/api/schema\222A\332\002\022\356\001\n\017immudb REST API\022\332\001IMPORTANT: All get and safeget functions return base64-encoded keys and values, while all set and safeset functions expect base64-encoded inputs.ZY\nW\n\006bearer\022M\010\002\0228Authentication token, prefixed by Bearer: Bearer \032\rAuthorization \002b\014\n\n\n\006bearer\022\000'), + serialized_pb=_b('\n\x0cschema.proto\x12\rimmudb.schema\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a,protoc-gen-swagger/options/annotations.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\xea\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\x12]\n\x05Login\x12\x1b.immudb.schema.LoginRequest\x1a\x1c.immudb.schema.LoginResponse\"\x19\x88\x02\x01\x82\xd3\xe4\x93\x02\x0b\"\x06/login:\x01*\x92\x41\x02\x62\x00\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*\x12k\n\nServerInfo\x12 .immudb.schema.ServerInfoRequest\x1a!.immudb.schema.ServerInfoResponse\"\x18\x82\xd3\xe4\x93\x02\r\x12\x0b/serverinfo\x92\x41\x02\x62\x00\x12U\n\x06Health\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.HealthResponse\"\x14\x82\xd3\xe4\x93\x02\t\x12\x07/health\x92\x41\x02\x62\x00\x12h\n\x0e\x44\x61tabaseHealth\x12\x16.google.protobuf.Empty\x1a%.immudb.schema.DatabaseHealthResponse\"\x17\x82\xd3\xe4\x93\x02\x0c\x12\n/db/health\x92\x41\x02\x62\x00\x12]\n\x0c\x43urrentState\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.ImmutableState\"\x16\x82\xd3\xe4\x93\x02\x0b\x12\t/db/state\x92\x41\x02\x62\x00\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\x8b\x03Z+github.com/codenotary/immudb/pkg/api/schema\x92\x41\xda\x02\x12\xee\x01\n\x0fimmudb REST API\x12\xda\x01IMPORTANT: All get and safeget functions return base64-encoded keys and values, while all set and safeset functions expect base64-encoded inputs.ZY\nW\n\x06\x62\x65\x61rer\x12M\x08\x02\x12\x38\x41uthentication token, prefixed by Bearer: Bearer \x1a\rAuthorization \x02\x62\x0c\n\n\n\x06\x62\x65\x61rer\x12\x00\x62\x06proto3') , - dependencies=[google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) + dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,protoc__gen__swagger_dot_options_dot_annotations__pb2.DESCRIPTOR,google_dot_protobuf_dot_struct__pb2.DESCRIPTOR,]) _ENTRYTYPEACTION = _descriptor.EnumDescriptor( name='EntryTypeAction', @@ -52,8 +54,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=12269, - serialized_end=12344, + serialized_start=13014, + serialized_end=13089, ) _sym_db.RegisterEnumDescriptor(_ENTRYTYPEACTION) @@ -75,8 +77,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=12346, - serialized_end=12387, + serialized_start=13091, + serialized_end=13132, ) _sym_db.RegisterEnumDescriptor(_PERMISSIONACTION) @@ -102,8 +104,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=12389, - serialized_end=12441, + serialized_start=13134, + serialized_end=13186, ) _sym_db.RegisterEnumDescriptor(_TXMODE) @@ -146,8 +148,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=90, - serialized_end=108, + serialized_start=166, + serialized_end=184, ) @@ -184,8 +186,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=110, - serialized_end=160, + serialized_start=186, + serialized_end=236, ) @@ -243,8 +245,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=162, - serialized_end=284, + serialized_start=238, + serialized_end=360, ) @@ -274,8 +276,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=286, - serialized_end=332, + serialized_start=362, + serialized_end=408, ) @@ -326,8 +328,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=334, - serialized_end=423, + serialized_start=410, + serialized_end=499, ) @@ -357,8 +359,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=425, - serialized_end=452, + serialized_start=501, + serialized_end=528, ) @@ -402,8 +404,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=454, - serialized_end=533, + serialized_start=530, + serialized_end=609, ) @@ -440,8 +442,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=535, - serialized_end=581, + serialized_start=611, + serialized_end=657, ) @@ -478,8 +480,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=583, - serialized_end=630, + serialized_start=659, + serialized_end=706, ) @@ -509,8 +511,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=632, - serialized_end=658, + serialized_start=708, + serialized_end=734, ) @@ -540,8 +542,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=660, - serialized_end=689, + serialized_start=736, + serialized_end=765, ) @@ -585,8 +587,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=691, - serialized_end=769, + serialized_start=767, + serialized_end=845, ) @@ -623,8 +625,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=771, - serialized_end=831, + serialized_start=847, + serialized_end=907, ) @@ -654,8 +656,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1108, - serialized_end=1147, + serialized_start=1184, + serialized_end=1223, ) _PRECONDITION_KEYMUSTNOTEXISTPRECONDITION = _descriptor.Descriptor( @@ -684,8 +686,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1149, - serialized_end=1191, + serialized_start=1225, + serialized_end=1267, ) _PRECONDITION_KEYNOTMODIFIEDAFTERTXPRECONDITION = _descriptor.Descriptor( @@ -721,8 +723,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1193, - serialized_end=1255, + serialized_start=1269, + serialized_end=1331, ) _PRECONDITION = _descriptor.Descriptor( @@ -768,8 +770,8 @@ name='precondition', full_name='immudb.schema.Precondition.precondition', index=0, containing_type=None, fields=[]), ], - serialized_start=834, - serialized_end=1271, + serialized_start=910, + serialized_end=1347, ) @@ -813,8 +815,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1273, - serialized_end=1356, + serialized_start=1349, + serialized_end=1432, ) @@ -886,8 +888,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1359, - serialized_end=1534, + serialized_start=1435, + serialized_end=1610, ) @@ -945,8 +947,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1536, - serialized_end=1649, + serialized_start=1612, + serialized_end=1725, ) @@ -993,8 +995,8 @@ name='operation', full_name='immudb.schema.Op.operation', index=0, containing_type=None, fields=[]), ], - serialized_start=1652, - serialized_end=1800, + serialized_start=1728, + serialized_end=1876, ) @@ -1038,8 +1040,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1802, - serialized_end=1925, + serialized_start=1878, + serialized_end=2001, ) @@ -1069,8 +1071,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1927, - serialized_end=1975, + serialized_start=2003, + serialized_end=2051, ) @@ -1128,8 +1130,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1977, - serialized_end=2077, + serialized_start=2053, + serialized_end=2153, ) @@ -1159,8 +1161,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2079, - serialized_end=2129, + serialized_start=2155, + serialized_end=2205, ) @@ -1179,40 +1181,68 @@ is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), _descriptor.FieldDescriptor( - name='prefix', full_name='immudb.schema.ScanRequest.prefix', index=1, + name='endKey', full_name='immudb.schema.ScanRequest.endKey', index=1, + 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='prefix', full_name='immudb.schema.ScanRequest.prefix', index=2, 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, + name='desc', full_name='immudb.schema.ScanRequest.desc', index=3, 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, + name='limit', full_name='immudb.schema.ScanRequest.limit', index=4, 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, + name='sinceTx', full_name='immudb.schema.ScanRequest.sinceTx', index=5, 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, + name='noWait', full_name='immudb.schema.ScanRequest.noWait', index=6, 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='inclusiveSeek', full_name='immudb.schema.ScanRequest.inclusiveSeek', index=7, + number=8, 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='inclusiveEnd', full_name='immudb.schema.ScanRequest.inclusiveEnd', index=8, + number=9, 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='offset', full_name='immudb.schema.ScanRequest.offset', 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), ], extensions=[ ], @@ -1225,8 +1255,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2131, - serialized_end=2239, + serialized_start=2208, + serialized_end=2393, ) @@ -1256,8 +1286,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2241, - serialized_end=2268, + serialized_start=2395, + serialized_end=2422, ) @@ -1287,8 +1317,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2270, - serialized_end=2297, + serialized_start=2424, + serialized_end=2451, ) @@ -1325,8 +1355,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2299, - serialized_end=2348, + serialized_start=2453, + serialized_end=2502, ) @@ -1412,8 +1442,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2351, - serialized_end=2526, + serialized_start=2505, + serialized_end=2680, ) @@ -1436,8 +1466,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2528, - serialized_end=2540, + serialized_start=2682, + serialized_end=2694, ) @@ -1481,8 +1511,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2542, - serialized_end=2610, + serialized_start=2696, + serialized_end=2764, ) @@ -1554,8 +1584,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2613, - serialized_end=2872, + serialized_start=2767, + serialized_end=3026, ) @@ -1606,8 +1636,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2875, - serialized_end=3043, + serialized_start=3029, + serialized_end=3197, ) @@ -1665,8 +1695,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3045, - serialized_end=3157, + serialized_start=3199, + serialized_end=3311, ) @@ -1710,8 +1740,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3159, - serialized_end=3257, + serialized_start=3313, + serialized_end=3411, ) @@ -1741,8 +1771,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3259, - serialized_end=3290, + serialized_start=3413, + serialized_end=3444, ) @@ -1786,8 +1816,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3293, - serialized_end=3428, + serialized_start=3447, + serialized_end=3582, ) @@ -1831,8 +1861,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3431, - serialized_end=3591, + serialized_start=3585, + serialized_end=3745, ) @@ -1876,8 +1906,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3593, - serialized_end=3653, + serialized_start=3747, + serialized_end=3807, ) @@ -1921,8 +1951,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3655, - serialized_end=3773, + serialized_start=3809, + serialized_end=3927, ) @@ -1980,8 +2010,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3775, - serialized_end=3867, + serialized_start=3929, + serialized_end=4021, ) @@ -2018,8 +2048,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3869, - serialized_end=3916, + serialized_start=4023, + serialized_end=4070, ) @@ -2063,8 +2093,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3918, - serialized_end=3984, + serialized_start=4072, + serialized_end=4138, ) @@ -2101,8 +2131,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3986, - serialized_end=4077, + serialized_start=4140, + serialized_end=4231, ) @@ -2139,8 +2169,63 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4079, - serialized_end=4170, + serialized_start=4233, + serialized_end=4324, +) + + +_SERVERINFOREQUEST = _descriptor.Descriptor( + name='ServerInfoRequest', + full_name='immudb.schema.ServerInfoRequest', + 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=4326, + serialized_end=4345, +) + + +_SERVERINFORESPONSE = _descriptor.Descriptor( + name='ServerInfoResponse', + full_name='immudb.schema.ServerInfoResponse', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='version', full_name='immudb.schema.ServerInfoResponse.version', 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=4347, + serialized_end=4384, ) @@ -2177,8 +2262,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4172, - serialized_end=4221, + serialized_start=4386, + serialized_end=4435, ) @@ -2215,8 +2300,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4223, - serialized_end=4304, + serialized_start=4437, + serialized_end=4518, ) @@ -2267,8 +2352,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4306, - serialized_end=4409, + serialized_start=4520, + serialized_end=4623, ) @@ -2333,8 +2418,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4412, - serialized_end=4566, + serialized_start=4626, + serialized_end=4780, ) @@ -2371,8 +2456,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4568, - serialized_end=4677, + serialized_start=4782, + serialized_end=4891, ) @@ -2437,8 +2522,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4679, - serialized_end=4781, + serialized_start=4893, + serialized_end=4995, ) @@ -2468,8 +2553,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4783, - serialized_end=4805, + serialized_start=4997, + serialized_end=5019, ) @@ -2557,6 +2642,13 @@ 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.ZScanRequest.offset', index=11, + number=12, 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=[ ], @@ -2569,8 +2661,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4808, - serialized_end=5054, + serialized_start=5022, + serialized_end=5284, ) @@ -2628,8 +2720,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5056, - serialized_end=5147, + serialized_start=5286, + serialized_end=5377, ) @@ -2666,8 +2758,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5149, - serialized_end=5243, + serialized_start=5379, + serialized_end=5473, ) @@ -2706,6 +2798,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='keepReferencesUnresolved', full_name='immudb.schema.TxRequest.keepReferencesUnresolved', 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=[ ], @@ -2718,8 +2817,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5245, - serialized_end=5350, + serialized_start=5476, + serialized_end=5615, ) @@ -2763,8 +2862,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5353, - serialized_end=5525, + serialized_start=5618, + serialized_end=5790, ) @@ -2794,8 +2893,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5527, - serialized_end=5590, + serialized_start=5792, + serialized_end=5855, ) @@ -2841,6 +2940,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='keepReferencesUnresolved', full_name='immudb.schema.VerifiableTxRequest.keepReferencesUnresolved', 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=[ ], @@ -2853,8 +2959,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5593, - serialized_end=5730, + serialized_start=5858, + serialized_end=6029, ) @@ -2919,8 +3025,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5733, - serialized_end=5878, + serialized_start=6032, + serialized_end=6177, ) @@ -2950,8 +3056,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5880, - serialized_end=5920, + serialized_start=6179, + serialized_end=6219, ) @@ -2981,8 +3087,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5922, - serialized_end=5951, + serialized_start=6221, + serialized_end=6250, ) @@ -3012,8 +3118,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5953, - serialized_end=5985, + serialized_start=6252, + serialized_end=6284, ) @@ -3120,8 +3226,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=5988, - serialized_end=6271, + serialized_start=6287, + serialized_end=6570, ) @@ -3146,6 +3252,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='ifNotExists', full_name='immudb.schema.CreateDatabaseRequest.ifNotExists', 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=[ ], @@ -3158,8 +3271,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6273, - serialized_end=6369, + serialized_start=6572, + serialized_end=6689, ) @@ -3184,6 +3297,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='alreadyExisted', full_name='immudb.schema.CreateDatabaseResponse.alreadyExisted', 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=[ ], @@ -3196,8 +3316,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6371, - serialized_end=6468, + serialized_start=6691, + serialized_end=6812, ) @@ -3234,8 +3354,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6470, - serialized_end=6570, + serialized_start=6814, + serialized_end=6914, ) @@ -3272,8 +3392,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6572, - serialized_end=6673, + serialized_start=6916, + serialized_end=7017, ) @@ -3296,8 +3416,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6675, - serialized_end=6700, + serialized_start=7019, + serialized_end=7044, ) @@ -3334,8 +3454,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6702, - serialized_end=6805, + serialized_start=7046, + serialized_end=7149, ) @@ -3365,8 +3485,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6807, - serialized_end=6838, + serialized_start=7151, + serialized_end=7182, ) @@ -3396,8 +3516,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6840, - serialized_end=6871, + serialized_start=7184, + serialized_end=7215, ) @@ -3427,8 +3547,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6873, - serialized_end=6903, + serialized_start=7217, + serialized_end=7247, ) @@ -3458,8 +3578,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6905, - serialized_end=6934, + serialized_start=7249, + serialized_end=7278, ) @@ -3489,8 +3609,39 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6936, - serialized_end=6967, + serialized_start=7280, + serialized_end=7311, +) + + +_NULLABLEMILLISECONDS = _descriptor.Descriptor( + name='NullableMilliseconds', + full_name='immudb.schema.NullableMilliseconds', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='value', full_name='immudb.schema.NullableMilliseconds.value', 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=7313, + serialized_end=7350, ) @@ -3606,6 +3757,34 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='readTxPoolSize', full_name='immudb.schema.DatabaseNullableSettings.readTxPoolSize', index=15, + number=22, 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='syncFrequency', full_name='immudb.schema.DatabaseNullableSettings.syncFrequency', index=16, + number=23, 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='writeBufferSize', full_name='immudb.schema.DatabaseNullableSettings.writeBufferSize', index=17, + number=24, 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='ahtSettings', full_name='immudb.schema.DatabaseNullableSettings.ahtSettings', index=18, + number=25, 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=[ ], @@ -3618,8 +3797,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=6970, - serialized_end=7848, + serialized_start=7353, + serialized_end=8459, ) @@ -3684,8 +3863,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=7851, - serialized_end=8200, + serialized_start=8462, + serialized_end=8811, ) @@ -3799,8 +3978,46 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8203, - serialized_end=8977, + serialized_start=8814, + serialized_end=9588, +) + + +_AHTNULLABLESETTINGS = _descriptor.Descriptor( + name='AHTNullableSettings', + full_name='immudb.schema.AHTNullableSettings', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='syncThreshold', full_name='immudb.schema.AHTNullableSettings.syncThreshold', 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='writeBufferSize', full_name='immudb.schema.AHTNullableSettings.writeBufferSize', 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=9591, + serialized_end=9722, ) @@ -3830,8 +4047,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=8979, - serialized_end=9018, + serialized_start=9724, + serialized_end=9763, ) @@ -3861,8 +4078,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9020, - serialized_end=9060, + serialized_start=9765, + serialized_end=9805, ) @@ -3892,8 +4109,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9062, - serialized_end=9103, + serialized_start=9807, + serialized_end=9848, ) @@ -3923,8 +4140,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9105, - serialized_end=9147, + serialized_start=9850, + serialized_end=9892, ) @@ -3954,8 +4171,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9149, - serialized_end=9190, + serialized_start=9894, + serialized_end=9935, ) @@ -3985,8 +4202,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9192, - serialized_end=9234, + serialized_start=9937, + serialized_end=9979, ) @@ -4023,8 +4240,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9236, - serialized_end=9298, + serialized_start=9981, + serialized_end=10043, ) @@ -4054,8 +4271,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9300, - serialized_end=9338, + serialized_start=10045, + serialized_end=10083, ) @@ -4085,8 +4302,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9340, - serialized_end=9366, + serialized_start=10085, + serialized_end=10111, ) @@ -4137,8 +4354,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9368, - serialized_end=9472, + serialized_start=10113, + serialized_end=10217, ) @@ -4175,8 +4392,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9474, - serialized_end=9574, + serialized_start=10219, + serialized_end=10319, ) @@ -4227,8 +4444,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9576, - serialized_end=9671, + serialized_start=10321, + serialized_end=10416, ) @@ -4265,8 +4482,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10193, - serialized_end=10244, + serialized_start=10938, + serialized_end=10989, ) _VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY = _descriptor.Descriptor( @@ -4302,8 +4519,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10246, - serialized_end=10297, + serialized_start=10991, + serialized_end=11042, ) _VERIFIABLESQLENTRY_COLTYPESBYIDENTRY = _descriptor.Descriptor( @@ -4339,8 +4556,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10299, - serialized_end=10350, + serialized_start=11044, + serialized_end=11095, ) _VERIFIABLESQLENTRY_COLLENBYIDENTRY = _descriptor.Descriptor( @@ -4376,8 +4593,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10352, - serialized_end=10401, + serialized_start=11097, + serialized_end=11146, ) _VERIFIABLESQLENTRY = _descriptor.Descriptor( @@ -4469,8 +4686,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=9674, - serialized_end=10407, + serialized_start=10419, + serialized_end=11152, ) @@ -4500,8 +4717,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10409, - serialized_end=10442, + serialized_start=11154, + serialized_end=11187, ) @@ -4552,8 +4769,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10445, - serialized_end=10575, + serialized_start=11190, + serialized_end=11320, ) @@ -4590,8 +4807,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10577, - serialized_end=10633, + serialized_start=11322, + serialized_end=11378, ) @@ -4621,8 +4838,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10635, - serialized_end=10701, + serialized_start=11380, + serialized_end=11446, ) @@ -4645,8 +4862,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10703, - serialized_end=10726, + serialized_start=11448, + serialized_end=11471, ) @@ -4676,8 +4893,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10728, - serialized_end=10808, + serialized_start=11473, + serialized_end=11553, ) @@ -4721,8 +4938,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10810, - serialized_end=10921, + serialized_start=11555, + serialized_end=11666, ) @@ -4752,8 +4969,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10923, - serialized_end=10947, + serialized_start=11668, + serialized_end=11692, ) @@ -4790,8 +5007,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=10949, - serialized_end=11006, + serialized_start=11694, + serialized_end=11751, ) @@ -4835,8 +5052,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11008, - serialized_end=11096, + serialized_start=11753, + serialized_end=11841, ) @@ -4880,8 +5097,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11098, - serialized_end=11194, + serialized_start=11843, + serialized_end=11939, ) @@ -4918,8 +5135,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11196, - serialized_end=11262, + serialized_start=11941, + serialized_end=12007, ) @@ -4956,8 +5173,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11264, - serialized_end=11342, + serialized_start=12009, + serialized_end=12087, ) @@ -4994,8 +5211,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11581, - serialized_end=11660, + serialized_start=12326, + serialized_end=12405, ) _COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY = _descriptor.Descriptor( @@ -5031,8 +5248,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11662, - serialized_end=11742, + serialized_start=12407, + serialized_end=12487, ) _COMMITTEDSQLTX = _descriptor.Descriptor( @@ -5082,8 +5299,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11345, - serialized_end=11742, + serialized_start=12090, + serialized_end=12487, ) @@ -5120,8 +5337,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11744, - serialized_end=11834, + serialized_start=12489, + serialized_end=12579, ) @@ -5158,8 +5375,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11836, - serialized_end=11872, + serialized_start=12581, + serialized_end=12617, ) @@ -5196,8 +5413,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=11874, - serialized_end=11937, + serialized_start=12619, + serialized_end=12682, ) @@ -5265,8 +5482,8 @@ name='value', full_name='immudb.schema.SQLValue.value', index=0, containing_type=None, fields=[]), ], - serialized_start=11940, - serialized_end=12070, + serialized_start=12685, + serialized_end=12815, ) @@ -5296,8 +5513,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12072, - serialized_end=12123, + serialized_start=12817, + serialized_end=12868, ) @@ -5327,8 +5544,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12125, - serialized_end=12163, + serialized_start=12870, + serialized_end=12908, ) @@ -5365,8 +5582,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12165, - serialized_end=12205, + serialized_start=12910, + serialized_end=12950, ) @@ -5396,8 +5613,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12207, - serialized_end=12233, + serialized_start=12952, + serialized_end=12978, ) @@ -5427,8 +5644,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=12235, - serialized_end=12267, + serialized_start=12980, + serialized_end=13012, ) _USER.fields_by_name['permissions'].message_type = _PERMISSION @@ -5523,6 +5740,10 @@ _DATABASENULLABLESETTINGS.fields_by_name['indexSettings'].message_type = _INDEXNULLABLESETTINGS _DATABASENULLABLESETTINGS.fields_by_name['writeTxHeaderVersion'].message_type = _NULLABLEUINT32 _DATABASENULLABLESETTINGS.fields_by_name['autoload'].message_type = _NULLABLEBOOL +_DATABASENULLABLESETTINGS.fields_by_name['readTxPoolSize'].message_type = _NULLABLEUINT32 +_DATABASENULLABLESETTINGS.fields_by_name['syncFrequency'].message_type = _NULLABLEMILLISECONDS +_DATABASENULLABLESETTINGS.fields_by_name['writeBufferSize'].message_type = _NULLABLEUINT32 +_DATABASENULLABLESETTINGS.fields_by_name['ahtSettings'].message_type = _AHTNULLABLESETTINGS _REPLICATIONNULLABLESETTINGS.fields_by_name['replica'].message_type = _NULLABLEBOOL _REPLICATIONNULLABLESETTINGS.fields_by_name['masterDatabase'].message_type = _NULLABLESTRING _REPLICATIONNULLABLESETTINGS.fields_by_name['masterAddress'].message_type = _NULLABLESTRING @@ -5542,6 +5763,8 @@ _INDEXNULLABLESETTINGS.fields_by_name['commitLogMaxOpenedFiles'].message_type = _NULLABLEUINT32 _INDEXNULLABLESETTINGS.fields_by_name['flushBufferSize'].message_type = _NULLABLEUINT32 _INDEXNULLABLESETTINGS.fields_by_name['cleanupPercentage'].message_type = _NULLABLEFLOAT +_AHTNULLABLESETTINGS.fields_by_name['syncThreshold'].message_type = _NULLABLEUINT32 +_AHTNULLABLESETTINGS.fields_by_name['writeBufferSize'].message_type = _NULLABLEUINT32 _SQLGETREQUEST.fields_by_name['pkValues'].message_type = _SQLVALUE _VERIFIABLESQLGETREQUEST.fields_by_name['sqlGetRequest'].message_type = _SQLGETREQUEST _SQLENTRY.fields_by_name['metadata'].message_type = _KVMETADATA @@ -5637,6 +5860,8 @@ 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['ServerInfoRequest'] = _SERVERINFOREQUEST +DESCRIPTOR.message_types_by_name['ServerInfoResponse'] = _SERVERINFORESPONSE DESCRIPTOR.message_types_by_name['HealthResponse'] = _HEALTHRESPONSE DESCRIPTOR.message_types_by_name['DatabaseHealthResponse'] = _DATABASEHEALTHRESPONSE DESCRIPTOR.message_types_by_name['ImmutableState'] = _IMMUTABLESTATE @@ -5667,9 +5892,11 @@ 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['NullableMilliseconds'] = _NULLABLEMILLISECONDS 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['AHTNullableSettings'] = _AHTNULLABLESETTINGS DESCRIPTOR.message_types_by_name['LoadDatabaseRequest'] = _LOADDATABASEREQUEST DESCRIPTOR.message_types_by_name['LoadDatabaseResponse'] = _LOADDATABASERESPONSE DESCRIPTOR.message_types_by_name['UnloadDatabaseRequest'] = _UNLOADDATABASEREQUEST @@ -6036,6 +6263,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 +6487,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 +6515,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' @@ -6582,8 +6837,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=12444, - serialized_end=17566, + serialized_start=13189, + serialized_end=19695, methods=[ _descriptor.MethodDescriptor( name='ListUsers', @@ -6592,7 +6847,7 @@ containing_service=None, input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, output_type=_USERLIST, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\014\022\n/user/list'), ), _descriptor.MethodDescriptor( name='CreateUser', @@ -6601,7 +6856,7 @@ containing_service=None, input_type=_CREATEUSERREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\n\"\005/user:\001*'), ), _descriptor.MethodDescriptor( name='ChangePassword', @@ -6610,7 +6865,7 @@ containing_service=None, input_type=_CHANGEPASSWORDREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\032\"\025/user/password/change:\001*'), ), _descriptor.MethodDescriptor( name='ChangePermission', @@ -6619,7 +6874,7 @@ containing_service=None, input_type=_CHANGEPERMISSIONREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\033\"\026/user/changepermission:\001*'), ), _descriptor.MethodDescriptor( name='SetActiveUser', @@ -6628,7 +6883,7 @@ containing_service=None, input_type=_SETACTIVEUSERREQUEST, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\030\"\023/user/setactiveUser:\001*'), ), _descriptor.MethodDescriptor( name='UpdateAuthConfig', @@ -6637,7 +6892,7 @@ containing_service=None, input_type=_AUTHCONFIG, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, + serialized_options=_b('\210\002\001'), ), _descriptor.MethodDescriptor( name='UpdateMTLSConfig', @@ -6646,7 +6901,7 @@ containing_service=None, input_type=_MTLSCONFIG, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, + serialized_options=_b('\210\002\001'), ), _descriptor.MethodDescriptor( name='OpenSession', @@ -6727,7 +6982,7 @@ containing_service=None, input_type=_LOGINREQUEST, output_type=_LOGINRESPONSE, - serialized_options=None, + serialized_options=_b('\210\002\001\202\323\344\223\002\013\"\006/login:\001*\222A\002b\000'), ), _descriptor.MethodDescriptor( name='Logout', @@ -6736,7 +6991,7 @@ containing_service=None, input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, + serialized_options=_b('\210\002\001\202\323\344\223\002\014\"\007/logout:\001*'), ), _descriptor.MethodDescriptor( name='Set', @@ -6745,7 +7000,7 @@ containing_service=None, input_type=_SETREQUEST, output_type=_TXHEADER, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\014\"\007/db/set:\001*'), ), _descriptor.MethodDescriptor( name='VerifiableSet', @@ -6754,7 +7009,7 @@ containing_service=None, input_type=_VERIFIABLESETREQUEST, output_type=_VERIFIABLETX, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\027\"\022/db/verifiable/set:\001*'), ), _descriptor.MethodDescriptor( name='Get', @@ -6763,7 +7018,7 @@ containing_service=None, input_type=_KEYREQUEST, output_type=_ENTRY, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\017\022\r/db/get/{key}'), ), _descriptor.MethodDescriptor( name='VerifiableGet', @@ -6772,7 +7027,7 @@ containing_service=None, input_type=_VERIFIABLEGETREQUEST, output_type=_VERIFIABLEENTRY, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\027\"\022/db/verifiable/get:\001*'), ), _descriptor.MethodDescriptor( name='Delete', @@ -6781,7 +7036,7 @@ containing_service=None, input_type=_DELETEKEYSREQUEST, output_type=_TXHEADER, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\017\"\n/db/delete:\001*'), ), _descriptor.MethodDescriptor( name='GetAll', @@ -6790,7 +7045,7 @@ containing_service=None, input_type=_KEYLISTREQUEST, output_type=_ENTRIES, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\017\"\n/db/getall:\001*'), ), _descriptor.MethodDescriptor( name='ExecAll', @@ -6799,7 +7054,7 @@ containing_service=None, input_type=_EXECALLREQUEST, output_type=_TXHEADER, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\020\"\013/db/execall:\001*'), ), _descriptor.MethodDescriptor( name='Scan', @@ -6808,7 +7063,7 @@ containing_service=None, input_type=_SCANREQUEST, output_type=_ENTRIES, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\r\"\010/db/scan:\001*'), ), _descriptor.MethodDescriptor( name='Count', @@ -6817,7 +7072,7 @@ containing_service=None, input_type=_KEYPREFIX, output_type=_ENTRYCOUNT, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\024\022\022/db/count/{prefix}'), ), _descriptor.MethodDescriptor( name='CountAll', @@ -6826,7 +7081,7 @@ containing_service=None, input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, output_type=_ENTRYCOUNT, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\016\022\014/db/countall'), ), _descriptor.MethodDescriptor( name='TxById', @@ -6835,7 +7090,7 @@ containing_service=None, input_type=_TXREQUEST, output_type=_TX, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\r\022\013/db/tx/{tx}'), ), _descriptor.MethodDescriptor( name='VerifiableTxById', @@ -6844,7 +7099,7 @@ containing_service=None, input_type=_VERIFIABLETXREQUEST, output_type=_VERIFIABLETX, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\030\022\026/db/verifiable/tx/{tx}'), ), _descriptor.MethodDescriptor( name='TxScan', @@ -6853,7 +7108,7 @@ containing_service=None, input_type=_TXSCANREQUEST, output_type=_TXLIST, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\013\"\006/db/tx:\001*'), ), _descriptor.MethodDescriptor( name='History', @@ -6862,219 +7117,228 @@ containing_service=None, input_type=_HISTORYREQUEST, output_type=_ENTRIES, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\020\"\013/db/history:\001*'), + ), + _descriptor.MethodDescriptor( + name='ServerInfo', + full_name='immudb.schema.ImmuService.ServerInfo', + index=31, + containing_service=None, + input_type=_SERVERINFOREQUEST, + output_type=_SERVERINFORESPONSE, + serialized_options=_b('\202\323\344\223\002\r\022\013/serverinfo\222A\002b\000'), ), _descriptor.MethodDescriptor( name='Health', full_name='immudb.schema.ImmuService.Health', - index=31, + index=32, containing_service=None, input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, output_type=_HEALTHRESPONSE, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\t\022\007/health\222A\002b\000'), ), _descriptor.MethodDescriptor( name='DatabaseHealth', full_name='immudb.schema.ImmuService.DatabaseHealth', - index=32, + index=33, containing_service=None, input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, output_type=_DATABASEHEALTHRESPONSE, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\014\022\n/db/health\222A\002b\000'), ), _descriptor.MethodDescriptor( name='CurrentState', full_name='immudb.schema.ImmuService.CurrentState', - index=33, + index=34, containing_service=None, input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, output_type=_IMMUTABLESTATE, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\013\022\t/db/state\222A\002b\000'), ), _descriptor.MethodDescriptor( name='SetReference', full_name='immudb.schema.ImmuService.SetReference', - index=34, + index=35, containing_service=None, input_type=_REFERENCEREQUEST, output_type=_TXHEADER, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\025\"\020/db/setreference:\001*'), ), _descriptor.MethodDescriptor( name='VerifiableSetReference', full_name='immudb.schema.ImmuService.VerifiableSetReference', - index=35, + index=36, containing_service=None, input_type=_VERIFIABLEREFERENCEREQUEST, output_type=_VERIFIABLETX, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002 \"\033/db/verifiable/setreference:\001*'), ), _descriptor.MethodDescriptor( name='ZAdd', full_name='immudb.schema.ImmuService.ZAdd', - index=36, + index=37, containing_service=None, input_type=_ZADDREQUEST, output_type=_TXHEADER, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\r\"\010/db/zadd:\001*'), ), _descriptor.MethodDescriptor( name='VerifiableZAdd', full_name='immudb.schema.ImmuService.VerifiableZAdd', - index=37, + index=38, containing_service=None, input_type=_VERIFIABLEZADDREQUEST, output_type=_VERIFIABLETX, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\030\"\023/db/verifiable/zadd:\001*'), ), _descriptor.MethodDescriptor( name='ZScan', full_name='immudb.schema.ImmuService.ZScan', - index=38, + index=39, containing_service=None, input_type=_ZSCANREQUEST, output_type=_ZENTRIES, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\016\"\t/db/zscan:\001*'), ), _descriptor.MethodDescriptor( name='CreateDatabase', full_name='immudb.schema.ImmuService.CreateDatabase', - index=39, + index=40, containing_service=None, input_type=_DATABASE, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, + serialized_options=_b('\210\002\001\202\323\344\223\002\017\"\n/db/create:\001*'), ), _descriptor.MethodDescriptor( name='CreateDatabaseWith', full_name='immudb.schema.ImmuService.CreateDatabaseWith', - index=40, + index=41, containing_service=None, input_type=_DATABASESETTINGS, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, + serialized_options=_b('\210\002\001\202\323\344\223\002\023\"\016/db/createwith:\001*'), ), _descriptor.MethodDescriptor( name='CreateDatabaseV2', full_name='immudb.schema.ImmuService.CreateDatabaseV2', - index=41, + index=42, containing_service=None, input_type=_CREATEDATABASEREQUEST, output_type=_CREATEDATABASERESPONSE, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\022\"\r/db/create/v2:\001*'), ), _descriptor.MethodDescriptor( name='LoadDatabase', full_name='immudb.schema.ImmuService.LoadDatabase', - index=42, + index=43, containing_service=None, input_type=_LOADDATABASEREQUEST, output_type=_LOADDATABASERESPONSE, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\r\"\010/db/load:\001*'), ), _descriptor.MethodDescriptor( name='UnloadDatabase', full_name='immudb.schema.ImmuService.UnloadDatabase', - index=43, + index=44, containing_service=None, input_type=_UNLOADDATABASEREQUEST, output_type=_UNLOADDATABASERESPONSE, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\017\"\n/db/unload:\001*'), ), _descriptor.MethodDescriptor( name='DeleteDatabase', full_name='immudb.schema.ImmuService.DeleteDatabase', - index=44, + index=45, containing_service=None, input_type=_DELETEDATABASEREQUEST, output_type=_DELETEDATABASERESPONSE, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\017\"\n/db/delete:\001*'), ), _descriptor.MethodDescriptor( name='DatabaseList', full_name='immudb.schema.ImmuService.DatabaseList', - index=45, + index=46, containing_service=None, input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, output_type=_DATABASELISTRESPONSE, - serialized_options=None, + serialized_options=_b('\210\002\001\202\323\344\223\002\r\"\010/db/list:\001*'), ), _descriptor.MethodDescriptor( name='DatabaseListV2', full_name='immudb.schema.ImmuService.DatabaseListV2', - index=46, + index=47, containing_service=None, input_type=_DATABASELISTREQUESTV2, output_type=_DATABASELISTRESPONSEV2, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\020\"\013/db/list/v2:\001*'), ), _descriptor.MethodDescriptor( name='UseDatabase', full_name='immudb.schema.ImmuService.UseDatabase', - index=47, + index=48, containing_service=None, input_type=_DATABASE, output_type=_USEDATABASEREPLY, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\030\022\026/db/use/{databaseName}'), ), _descriptor.MethodDescriptor( name='UpdateDatabase', full_name='immudb.schema.ImmuService.UpdateDatabase', - index=48, + index=49, containing_service=None, input_type=_DATABASESETTINGS, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, + serialized_options=_b('\210\002\001\202\323\344\223\002\017\"\n/db/update:\001*'), ), _descriptor.MethodDescriptor( name='UpdateDatabaseV2', full_name='immudb.schema.ImmuService.UpdateDatabaseV2', - index=49, + index=50, containing_service=None, input_type=_UPDATEDATABASEREQUEST, output_type=_UPDATEDATABASERESPONSE, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\022\"\r/db/update/v2:\001*'), ), _descriptor.MethodDescriptor( name='GetDatabaseSettings', full_name='immudb.schema.ImmuService.GetDatabaseSettings', - index=50, + index=51, containing_service=None, input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, output_type=_DATABASESETTINGS, - serialized_options=None, + serialized_options=_b('\210\002\001\202\323\344\223\002\021\"\014/db/settings:\001*'), ), _descriptor.MethodDescriptor( name='GetDatabaseSettingsV2', full_name='immudb.schema.ImmuService.GetDatabaseSettingsV2', - index=51, + index=52, containing_service=None, input_type=_DATABASESETTINGSREQUEST, output_type=_DATABASESETTINGSRESPONSE, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\024\"\017/db/settings/v2:\001*'), ), _descriptor.MethodDescriptor( name='FlushIndex', full_name='immudb.schema.ImmuService.FlushIndex', - index=52, + index=53, containing_service=None, input_type=_FLUSHINDEXREQUEST, output_type=_FLUSHINDEXRESPONSE, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\020\022\016/db/flushindex'), ), _descriptor.MethodDescriptor( name='CompactIndex', full_name='immudb.schema.ImmuService.CompactIndex', - index=53, + index=54, containing_service=None, input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\022\022\020/db/compactindex'), ), _descriptor.MethodDescriptor( name='streamGet', full_name='immudb.schema.ImmuService.streamGet', - index=54, + index=55, containing_service=None, input_type=_KEYREQUEST, output_type=_CHUNK, @@ -7083,7 +7347,7 @@ _descriptor.MethodDescriptor( name='streamSet', full_name='immudb.schema.ImmuService.streamSet', - index=55, + index=56, containing_service=None, input_type=_CHUNK, output_type=_TXHEADER, @@ -7092,7 +7356,7 @@ _descriptor.MethodDescriptor( name='streamVerifiableGet', full_name='immudb.schema.ImmuService.streamVerifiableGet', - index=56, + index=57, containing_service=None, input_type=_VERIFIABLEGETREQUEST, output_type=_CHUNK, @@ -7101,7 +7365,7 @@ _descriptor.MethodDescriptor( name='streamVerifiableSet', full_name='immudb.schema.ImmuService.streamVerifiableSet', - index=57, + index=58, containing_service=None, input_type=_CHUNK, output_type=_VERIFIABLETX, @@ -7110,7 +7374,7 @@ _descriptor.MethodDescriptor( name='streamScan', full_name='immudb.schema.ImmuService.streamScan', - index=58, + index=59, containing_service=None, input_type=_SCANREQUEST, output_type=_CHUNK, @@ -7119,7 +7383,7 @@ _descriptor.MethodDescriptor( name='streamZScan', full_name='immudb.schema.ImmuService.streamZScan', - index=59, + index=60, containing_service=None, input_type=_ZSCANREQUEST, output_type=_CHUNK, @@ -7128,7 +7392,7 @@ _descriptor.MethodDescriptor( name='streamHistory', full_name='immudb.schema.ImmuService.streamHistory', - index=60, + index=61, containing_service=None, input_type=_HISTORYREQUEST, output_type=_CHUNK, @@ -7137,7 +7401,7 @@ _descriptor.MethodDescriptor( name='streamExecAll', full_name='immudb.schema.ImmuService.streamExecAll', - index=61, + index=62, containing_service=None, input_type=_CHUNK, output_type=_TXHEADER, @@ -7146,7 +7410,7 @@ _descriptor.MethodDescriptor( name='exportTx', full_name='immudb.schema.ImmuService.exportTx', - index=62, + index=63, containing_service=None, input_type=_EXPORTTXREQUEST, output_type=_CHUNK, @@ -7155,7 +7419,7 @@ _descriptor.MethodDescriptor( name='replicateTx', full_name='immudb.schema.ImmuService.replicateTx', - index=63, + index=64, containing_service=None, input_type=_CHUNK, output_type=_TXHEADER, @@ -7164,47 +7428,47 @@ _descriptor.MethodDescriptor( name='SQLExec', full_name='immudb.schema.ImmuService.SQLExec', - index=64, + index=65, containing_service=None, input_type=_SQLEXECREQUEST, output_type=_SQLEXECRESULT, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\020\"\013/db/sqlexec:\001*'), ), _descriptor.MethodDescriptor( name='SQLQuery', full_name='immudb.schema.ImmuService.SQLQuery', - index=65, + index=66, containing_service=None, input_type=_SQLQUERYREQUEST, output_type=_SQLQUERYRESULT, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\021\"\014/db/sqlquery:\001*'), ), _descriptor.MethodDescriptor( name='ListTables', full_name='immudb.schema.ImmuService.ListTables', - index=66, + index=67, containing_service=None, input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, output_type=_SQLQUERYRESULT, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\020\022\016/db/table/list'), ), _descriptor.MethodDescriptor( name='DescribeTable', full_name='immudb.schema.ImmuService.DescribeTable', - index=67, + index=68, containing_service=None, input_type=_TABLE, output_type=_SQLQUERYRESULT, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\017\"\n/db/tables:\001*'), ), _descriptor.MethodDescriptor( name='VerifiableSQLGet', full_name='immudb.schema.ImmuService.VerifiableSQLGet', - index=68, + index=69, containing_service=None, input_type=_VERIFIABLESQLGETREQUEST, output_type=_VERIFIABLESQLENTRY, - serialized_options=None, + serialized_options=_b('\202\323\344\223\002\032\"\025/db/verifiable/sqlget:\001*'), ), ]) _sym_db.RegisterServiceDescriptor(_IMMUSERVICE) diff --git a/immudb/grpc/schema_pb2_grpc.py b/immudb/grpc/schema_pb2_grpc.py index e6fb84c..3f6eb46 100644 --- a/immudb/grpc/schema_pb2_grpc.py +++ b/immudb/grpc/schema_pb2_grpc.py @@ -170,6 +170,11 @@ def __init__(self, channel): 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, @@ -402,15 +407,15 @@ def SetActiveUser(self, request, context): raise NotImplementedError('Method not implemented!') def UpdateAuthConfig(self, request, context): - """DEPRECATED - """ + # 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 UpdateMTLSConfig(self, request, context): - """DEPRECATED - """ + # 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!') @@ -583,9 +588,17 @@ def History(self, request, context): 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): - # missing associated documentation comment in .proto file - pass + """DEPRECATED: Use ServerInfo + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') @@ -640,15 +653,15 @@ def ZScan(self, request, context): raise NotImplementedError('Method not implemented!') def CreateDatabase(self, request, context): - """DEPRECATED: kept for backward compatibility + """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): - # missing associated documentation comment in .proto file - pass + """DEPRECATED: Use CreateDatabaseV2 + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') @@ -682,8 +695,8 @@ def DeleteDatabase(self, request, context): raise NotImplementedError('Method not implemented!') def DatabaseList(self, request, context): - # missing associated documentation comment in .proto file - pass + """DEPRECATED: Use DatabaseListV2 + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') @@ -703,8 +716,8 @@ def UseDatabase(self, request, context): raise NotImplementedError('Method not implemented!') def UpdateDatabase(self, request, context): - # missing associated documentation comment in .proto file - pass + """DEPRECATED: Use UpdateDatabaseV2 + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') @@ -717,8 +730,8 @@ def UpdateDatabaseV2(self, request, context): raise NotImplementedError('Method not implemented!') def GetDatabaseSettings(self, request, context): - # missing associated documentation comment in .proto file - pass + """DEPRECATED: Use GetDatabaseSettingsV2 + """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') @@ -1007,6 +1020,11 @@ def add_ImmuServiceServicer_to_server(servicer, server): 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, diff --git a/requirements-dev.txt b/requirements-dev.txt index a02f4e4..a56ca01 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -r requirements.txt pytest>=4.6.9 -grpcio-tools==1.26.0 \ No newline at end of file +grpcio-tools==1.26.0 diff --git a/requirements.txt b/requirements.txt index 78c9db0..4bf14b3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ protobuf>=3.13.0,<4.0.0 google-api==0.1.12 google-api-core==1.22.1 ecdsa>=0.16.1 +protoc-gen-swagger==0.1.0 From 38f0f04e689a8e187b454e5db08b9f0307afe059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Tue, 6 Sep 2022 20:57:14 +0200 Subject: [PATCH 02/38] All messages into dataclasses --- immudb/client.py | 175 +- immudb/dataconverter.py | 20 + immudb/datatypesv2.py | 782 +++ immudb/grpc/schema_pb2.py | 7069 ++-------------------------- immudb/grpc/schema_pb2_grpc.py | 3544 +++++++++----- immudb/handler/listUsers.py | 2 +- requirements-dev.txt | 2 +- requirements.txt | 9 +- tests/immu/test_convert_to_grpc.py | 22 + tests/immu/test_kvmetadata.py | 8 +- tests/immu/test_tx_scan.py | 15 + tests/immu/test_user_operations.py | 24 +- 12 files changed, 3821 insertions(+), 7851 deletions(-) create mode 100644 immudb/dataconverter.py create mode 100644 immudb/datatypesv2.py create mode 100644 tests/immu/test_convert_to_grpc.py create mode 100644 tests/immu/test_tx_scan.py diff --git a/immudb/client.py b/immudb/client.py index 84a6b9c..6852c7c 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -10,10 +10,12 @@ # See the License for the specific language governing permissions and # limitations under the License. +from typing import List import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from immudb import grpcutils +from immudb.grpc.schema_pb2 import EntriesSpec, EntryTypeSpec, TxScanRequest from immudb.handler import (batchGet, batchSet, changePassword, changePermission, createUser, currentRoot, createDatabase, databaseList, deleteKeys, useDatabase, get, listUsers, sqldescribe, verifiedGet, verifiedSet, setValue, history, @@ -28,13 +30,15 @@ from immudb.embedded.store import KVMetadata import threading import queue +import immudb.datatypesv2 as datatypesv2 +import immudb.dataconverter as dataconverter import datetime class ImmudbClient: - def __init__(self, immudbUrl=None, rs: RootService = None, publicKeyFile: str = None, timeout=None): + def __init__(self, immudUrl=None, rs: RootService = None, publicKeyFile: str = None, timeout=None): """Immudb client Args: @@ -43,19 +47,19 @@ def __init__(self, immudbUrl=None, rs: RootService = None, publicKeyFile: str = publicKeyFile (str, optional): path to the public key that would be used to authenticate requests with. Defaults to None. timeout (int, optional): global timeout for GRPC requests, if None - it would hang until server respond. Defaults to None. """ - if immudbUrl is None: - immudbUrl = "localhost:3322" + if immudUrl is None: + immudUrl = "localhost:3322" self.timeout = timeout - self.channel = grpc.insecure_channel(immudbUrl) + self.channel = grpc.insecure_channel(immudUrl) self._resetStub() if rs is None: - self.__rs = RootService() + self._rs = RootService() else: - self.__rs = rs - self.__url = immudbUrl - 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): """Loads public key from path @@ -63,11 +67,15 @@ def loadKey(self, kfile: str): Args: kfile (str): key file path """ - if kfile is None: - self.__vk = None - else: - with open(kfile) as f: - self.__vk = ecdsa.VerifyingKey.from_pem(f.read()) + 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 @@ -76,7 +84,7 @@ def shutdown(self): self.channel = None self.intercept_channel.close self.intercept_channel = None - self.__rs = None + self._rs = None def set_session_id_interceptor(self, openSessionResponse): sessionId = openSessionResponse.sessionID @@ -105,7 +113,7 @@ 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) @@ -118,7 +126,7 @@ def healthCheck(self): Returns: HealthResponse: contains status and version """ - return healthcheck.call(self.__stub, self.__rs) + return healthcheck.call(self._stub, self._rs) # Not implemented: connect def _convertToBytes(self, what): @@ -145,30 +153,30 @@ def login(self, username, password, database=b"defaultdb"): 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): """Logouts all sessions """ - self.__stub.Logout(google_dot_protobuf_dot_empty__pb2.Empty()) - self.__login_response = None + self._stub.Logout(google_dot_protobuf_dot_empty__pb2.Empty()) self._resetStub() def _resetStub(self): @@ -177,13 +185,13 @@ 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): """Sends keep alive packet """ - self.__stub.KeepAlive(google_dot_protobuf_dot_empty__pb2.Empty()) + self._stub.KeepAlive(google_dot_protobuf_dot_empty__pb2.Empty()) def openManagedSession(self, username, password, database=b"defaultdb", keepAliveInterval=60): """Opens managed session and returns ManagedSession object within you can manage SQL transactions @@ -252,16 +260,15 @@ 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): """Closes unmanaged session """ - self.__stub.CloseSession(google_dot_protobuf_dot_empty__pb2.Empty()) - self._session_response = None + self._stub.CloseSession(google_dot_protobuf_dot_empty__pb2.Empty()) self._resetStub() def createUser(self, user, password, permission, database): @@ -280,7 +287,7 @@ def createUser(self, user, password, permission, database): permission=permission, database=database ) - return createUser.call(self.__stub, self.__rs, request) + return createUser.call(self._stub, self._rs, request) def listUsers(self): """Returns all users on database @@ -288,7 +295,7 @@ def listUsers(self): Returns: ListUserResponse: List containing all users """ - return listUsers.call(self.__stub, None) + return listUsers.call(self._stub) def changePassword(self, user, newPassword, oldPassword): """Changes password for user @@ -304,7 +311,7 @@ def changePassword(self, user, newPassword, oldPassword): 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, permission): """Changes permission for user @@ -318,7 +325,7 @@ def changePermission(self, action, user, database, permission): Returns: _type_: _description_ """ - return changePermission.call(self.__stub, self.__rs, action, user, database, permission) + return changePermission.call(self._stub, self._rs, action, user, database, permission) # Not implemented: updateAuthConfig # Not implemented: updateMTLSConfig @@ -335,7 +342,7 @@ def databaseList(self): Returns: list[str]: database names """ - dbs = databaseList.call(self.__stub, self.__rs, None) + dbs = databaseList.call(self._stub, self._rs, None) return [x.databaseName for x in dbs.dblist.databases] # Not implemented: databaseListV2 @@ -348,7 +355,7 @@ def createDatabase(self, dbName: bytes): """ 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) # Not implemented: createDatabaseV2 # Not implemented: loadDatabase @@ -363,10 +370,10 @@ def useDatabase(self, dbName: bytes): """ request = schema_pb2_grpc.schema__pb2.Database(databaseName=dbName) - resp = useDatabase.call(self.__stub, self.__rs, request) + 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) + self._stub = self.set_token_header_interceptor(resp) + self._rs.init(dbName, self._stub) return resp # Not implemented: updateDatabase @@ -374,14 +381,20 @@ def useDatabase(self, dbName: bytes): # Not implemented: getDatabaseSettings # Not implemented: getDatabaseSettingsV2 - # Not implemented: setActiveUser + def setActiveUser(self, active: bool, username: str) -> bool: + req = datatypesv2.SetActiveUserRequest(active, username) + resp = self._stub.SetActiveUser(req.getGRPC()) + if(resp == google_dot_protobuf_dot_empty__pb2.Empty()): + return True + return False + # Not implemented: flushIndex def compactIndex(self): """Starts index compaction """ - self.__stub.CompactIndex(google_dot_protobuf_dot_empty__pb2.Empty()) + self._stub.CompactIndex(google_dot_protobuf_dot_empty__pb2.Empty()) def health(self): """Retrieves health response of immudb @@ -389,7 +402,7 @@ def health(self): Returns: HealthResponse: contains status and version """ - return health.call(self.__stub, self.__rs) + return health.call(self._stub, self._rs) def currentState(self): """Return current state of immudb (proof) @@ -397,7 +410,7 @@ def currentState(self): Returns: State: state of immudb """ - return currentRoot.call(self.__stub, self.__rs, None) + return currentRoot.call(self._stub, self._rs, None) def set(self, key: bytes, value: bytes): """Sets key into value in database @@ -409,7 +422,7 @@ def set(self, key: bytes, value: bytes): Returns: SetResponse: response of request """ - return setValue.call(self.__stub, self.__rs, key, value) + return setValue.call(self._stub, self._rs, key, value) def verifiedSet(self, key: bytes, value: bytes): """Sets key into value in database, and additionally checks it with state saved before @@ -421,7 +434,7 @@ def verifiedSet(self, key: bytes, value: bytes): Returns: SetResponse: response of request """ - return verifiedSet.call(self.__stub, self.__rs, key, value, self.__vk) + return verifiedSet.call(self._stub, self._rs, key, value, self._vk) def expireableSet(self, key: bytes, value: bytes, expiresAt: datetime.datetime): """Sets key into value in database with additional expiration @@ -436,7 +449,7 @@ def expireableSet(self, key: bytes, value: bytes, expiresAt: datetime.datetime): """ 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): """Gets value for key @@ -448,73 +461,81 @@ def get(self, key: bytes, atRevision: int = None): Returns: GetResponse: contains tx, value, key and revision """ - return get.call(self.__stub, self.__rs, key, atRevision=atRevision) + return get.call(self._stub, self._rs, key, atRevision=atRevision) # Not implemented: getSince # Not implemented: getAt def verifiedGet(self, key: bytes, atRevision: int = None): - return verifiedGet.call(self.__stub, self.__rs, key, verifying_key=self.__vk, atRevision=atRevision) + return verifiedGet.call(self._stub, self._rs, key, verifying_key=self._vk, atRevision=atRevision) def verifiedGetSince(self, key: bytes, sinceTx: int): - return verifiedGet.call(self.__stub, self.__rs, key, sinceTx=sinceTx, verifying_key=self.__vk) + 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) + return verifiedGet.call(self._stub, self._rs, key, atTx, self._vk) def history(self, key: bytes, offset: int, limit: int, sortorder: bool): - return history.call(self.__stub, self.__rs, key, offset, limit, sortorder) + return history.call(self._stub, self._rs, key, offset, limit, sortorder) def zAdd(self, zset: bytes, score: float, key: bytes, atTx: int = 0): - return zadd.call(self.__stub, self.__rs, zset, score, key, atTx) + 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) + 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): - return scan.call(self.__stub, self.__rs, key, prefix, desc, limit, sinceTx) + return scan.call(self._stub, self._rs, key, prefix, desc, limit, sinceTx) 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, + 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) + return txbyid.call(self._stub, self._rs, tx) def verifiedTxById(self, tx: int): - return verifiedtxbyid.call(self.__stub, self.__rs, tx, self.__vk) + return verifiedtxbyid.call(self._stub, self._rs, tx, self._vk) # Not implemented: txByIDWithSpec + defaultEntriesSpec = datatypesv2.EntriesSpec( + kvEntriesSpec=datatypesv2.EntryTypeSpec(action = datatypesv2.EntryTypeAction.EXCLUDE), + zEntriesSpec=datatypesv2.EntryTypeSpec(action = datatypesv2.EntryTypeAction.ONLY_DIGEST), + sqlEntriesSpec=datatypesv2.EntryTypeSpec(action = datatypesv2.EntryTypeAction.ONLY_DIGEST) + ) - # Not implemented: txScan + def txScan(self, initialTx: int, limit: int = 1000, desc: bool = False, entriesSpec: datatypesv2.EntriesSpec = defaultEntriesSpec, sinceTx: int = 0, noWait: bool = False) -> datatypesv2.TxList: + req = datatypesv2.TxScanRequest(initialTx, limit, desc, entriesSpec, sinceTx, noWait) + resp = self._stub.TxScan(req.getGRPC()) + return dataconverter.convertResponse(resp) # Not implemented: count # Not implemented: countAll def setAll(self, kv: dict): - return batchSet.call(self.__stub, self.__rs, kv) + return batchSet.call(self._stub, self._rs, kv) def getAll(self, keys: list): - resp = batchGet.call(self.__stub, self.__rs, keys) + 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) + return deleteKeys.call(self._stub, req) def execAll(self, ops: list, noWait=False): - return execAll.call(self.__stub, self.__rs, ops, noWait) + return execAll.call(self._stub, self._rs, ops, noWait) def setReference(self, referredkey: bytes, newkey: bytes): - return reference.call(self.__stub, self.__rs, referredkey, newkey) + return reference.call(self._stub, self._rs, referredkey, newkey) def verifiedSetReference(self, referredkey: bytes, newkey: bytes): - return verifiedreference.call(self.__stub, self.__rs, referredkey, newkey, verifying_key=self.__vk) + return verifiedreference.call(self._stub, self._rs, referredkey, newkey, verifying_key=self._vk) # Not implemented: setReferenceAt # Not implemented: verifiedSetReferenceAt @@ -541,7 +562,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 @@ -554,7 +575,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 @@ -564,10 +585,10 @@ 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) + return sqldescribe.call(self._stub, self._rs, table) # Not implemented: verifyRow @@ -584,7 +605,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", @@ -598,18 +619,18 @@ 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) # 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/dataconverter.py b/immudb/dataconverter.py new file mode 100644 index 0000000..63984a0 --- /dev/null +++ b/immudb/dataconverter.py @@ -0,0 +1,20 @@ + + +import immudb.datatypesv2 as datatypesv2 + + +def convertRequest(fromDataClass: datatypesv2.GRPCTransformable): + return fromDataClass.getGRPC() + + +def convertResponse(fromResponse): + + schemaFrom = datatypesv2.__dict__.get(fromResponse.__class__.__name__, None) + if schemaFrom: + construct = dict() + for field in fromResponse.ListFields(): + construct[field[0].name] = convertResponse(field[1]) + return schemaFrom(**construct) + else: + return fromResponse + diff --git a/immudb/datatypesv2.py b/immudb/datatypesv2.py new file mode 100644 index 0000000..8039b49 --- /dev/null +++ b/immudb/datatypesv2.py @@ -0,0 +1,782 @@ +# 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, IntEnum +from typing import Any, Dict, List, Optional +from google.protobuf.struct_pb2 import NullValue +import immudb.grpc.schema_pb2 as schema + +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 + + + + +@dataclass +class Key(GRPCTransformable): + key: bytes + +@dataclass +class Permission(GRPCTransformable): + database: str + permission: int + +@dataclass +class User(GRPCTransformable): + user: bytes + permissions: List[Permission] + createdby: str + createdat: str + active: bool + +@dataclass +class UserList(GRPCTransformable): + users: List[User] + +@dataclass +class CreateUserRequest(GRPCTransformable): + user: bytes + password: bytes + permission: int + database: str + +@dataclass +class UserRequest(GRPCTransformable): + user: bytes + +@dataclass +class ChangePasswordRequest(GRPCTransformable): + user: bytes + oldPassword: bytes + newPassword: bytes + +@dataclass +class LoginRequest(GRPCTransformable): + user: bytes + password: bytes + +@dataclass +class LoginResponse(GRPCTransformable): + token: str + warning: bytes + +@dataclass +class AuthConfig(GRPCTransformable): + kind: int + +@dataclass +class MTLSConfig(GRPCTransformable): + enabled: bool + +@dataclass +class OpenSessionRequest(GRPCTransformable): + username: bytes + password: bytes + databaseName: str + +@dataclass +class OpenSessionResponse(GRPCTransformable): + sessionID: str + serverUUID: str + +# ONE OF +@dataclass +class Precondition(GRPCTransformable): + keyMustExist: Optional[KeyMustExistPrecondition] = None + keyMustNotExist: Optional[KeyMustNotExistPrecondition] = None + keyNotModifiedAfterTX: Optional[KeyNotModifiedAfterTXPrecondition] = None + +@dataclass +class KeyMustExistPrecondition(GRPCTransformable): + key: bytes + +@dataclass +class KeyMustNotExistPrecondition(GRPCTransformable): + key: bytes + +class KeyNotModifiedAfterTXPrecondition(GRPCTransformable): + key: bytes + txID: int + +@dataclass +class KeyValue(GRPCTransformable): + key: bytes + value: bytes + metadata: KVMetadata + +@dataclass +class Entry(GRPCTransformable): + tx: int + key: bytes + value: bytes + referencedBy: Reference + metadata: KVMetadata + expired: bool + revision: int + +@dataclass +class Reference(GRPCTransformable): + tx: int + key: bytes + atTx: int + metadata: KVMetadata + revision: int + +# 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] + noWait: bool + preconditions: List[Precondition] + +@dataclass +class Entries(GRPCTransformable): + entries: List[Entry] + +@dataclass +class ZEntry(GRPCTransformable): + set: bytes + key: bytes + entry: Entry + score: float + atTx: int + +@dataclass +class ZEntries(GRPCTransformable): + entries: ZEntry + +@dataclass +class ScanRequest(GRPCTransformable): + seekKey: bytes + endKey: bytes + prefix: bytes + desc: bool + limit: int + sinceTx: int + noWait: bool + inclusiveSeek: bool + inclusiveEnd: bool + offset: int + +@dataclass +class KeyPrefix(GRPCTransformable): + prefix: bytes + +@dataclass +class EntryCount(GRPCTransformable): + count: int + +@dataclass +class Signature(GRPCTransformable): + publicKey: bytes + signature: bytes + +@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 + TargetTxId: int + terms: List[bytes] + +@dataclass +class DualProof(GRPCTransformable): + sourceTxHeader: TxHeader + targetTxHeader: TxHeader + inclusionProof: List[bytes] = None + consistencyProof: List[bytes] = None + targetBlTxAlh: bytes = None + lastInclusionProof: List[bytes] = None + linearProof: LinearProof = None + +@dataclass +class Tx(GRPCTransformable): + header: TxHeader + entries: List[TxEntry] = None + kvEntries: List[Entry] = None + zEntries: List[ZEntry] = None + +@dataclass +class TxEntry(GRPCTransformable): + key: bytes + hValue: bytes + vLen: int + metadata: KVMetadata + value: bytes + +@dataclass +class KVMetadata(GRPCTransformable): + deleted: bool + expiration: Expiration + nonIndexable: bool + +@dataclass +class Expiration(GRPCTransformable): + expiresAt: int + +@dataclass +class VerifiableTx(GRPCTransformable): + tx: Tx + dualProof: DualProof + signature: Signature + +@dataclass +class VerifiableEntry(GRPCTransformable): + entry: Entry = None + verifiableTx: VerifiableTx = None + inclusionProof: InclusionProof = None + +@dataclass +class InclusionProof(GRPCTransformable): + leaf: int + width: int + terms: List[bytes] + +@dataclass +class SetRequest(GRPCTransformable): + KVs: List[KeyValue] + noWait: bool + preconditions: List[Precondition] + +@dataclass +class KeyRequest(GRPCTransformable): + key: bytes + atTx: int + sinceTx: int + noWait: bool + atRevision: int + +@dataclass +class KeyListRequest(GRPCTransformable): + keys: List[bytes] + sinceTx: int + +@dataclass +class DeleteKeysRequest(GRPCTransformable): + keys: List[bytes] + sinceTx: int + noWait: bool + +@dataclass +class VerifiableSetRequest(GRPCTransformable): + setRequest: SetRequest + proveSinceTx: int + +@dataclass +class VerifiableGetRequest(GRPCTransformable): + keyRequest: KeyRequest + proveSinceTx: int + +@dataclass +class ServerInfoRequest(GRPCTransformable): + pass + +@dataclass +class ServerInfoResponse(GRPCTransformable): + version: str + +@dataclass +class HealthResponse(GRPCTransformable): + status: bool + version: str + +@dataclass +class DatabaseHealthResponse(GRPCTransformable): + pendingRequests: int + lastRequestCompletedAt: int + +@dataclass +class ImmutableState(GRPCTransformable): + db: str + txId: int + txHash: bytes + signature: Signature + +@dataclass +class ReferenceRequest(GRPCTransformable): + key: bytes + referencedKey: bytes + atTx: int + boundRef: bool + noWait: bool + preconditions: List[Precondition] + +@dataclass +class VerifiableReferenceRequest(GRPCTransformable): + referenceRequest: ReferenceRequest + proveSinceTx: int + +@dataclass +class ZAddRequest(GRPCTransformable): + set: bytes + score: float + key: bytes + atTx: int + boundRef: bool + noWait: bool + +@dataclass +class Score(GRPCTransformable): + score: float + +@dataclass +class ZScanRequest(GRPCTransformable): + set: bytes + seekKey: bytes + seekScore: float + seekAtTx: int + inclusiveSeek: bool + limit: int + desc: bool + minScore: Score + maxScore: Score + sinceTx: int + noWait: bool + offset: int + +@dataclass +class HistoryRequest(GRPCTransformable): + key: bytes + offset: int + limit: int + desc: bool + sinceTx: int + + +@dataclass +class VerifiableZAddRequest(GRPCTransformable): + zAddRequest: ZAddRequest + proveSinceTx: int + +@dataclass +class TxRequest(GRPCTransformable): + tx: int + entriesSpec: EntriesSpec + sinceTx: int + noWait: bool + keepReferencesUnresolved: bool + +@dataclass +class EntriesSpec(GRPCTransformable): + kvEntriesSpec: EntryTypeSpec = None + zEntriesSpec: EntryTypeSpec = None + sqlEntriesSpec: EntryTypeSpec = None + + +@dataclass +class EntryTypeSpec(GRPCTransformable): + action: EntryTypeAction + +class EntryTypeAction(Enum): + EXCLUDE = 0 + ONLY_DIGEST = 1 + RAW_VALUE = 2 + RESOLVE = 3 + +@dataclass +class VerifiableTxRequest(GRPCTransformable): + tx: int + proveSinceTx: int + entriesSpec: EntriesSpec + sinceTx: int + noWait: bool + keepReferencesUnresolved: bool + +@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] + +@dataclass +class ExportTxRequest(GRPCTransformable): + tx: int + +@dataclass +class Database(GRPCTransformable): + databaseName: str + +@dataclass +class DatabaseSettings(GRPCTransformable): + databaseName: str + replica: bool + masterDatabase: str + masterAddress: str + masterPort: int + followerUsername: str + followerPassword: str + fileSize: int + maxKeyLen: int + maxValueLen: int + maxTxEntries: int + excludeCommitTime: bool + +@dataclass +class CreateDatabaseRequest(GRPCTransformable): + name: str + settings: DatabaseNullableSettings + ifNotExists: bool + + +@dataclass +class CreateDatabaseResponse(GRPCTransformable): + name: str + settings: DatabaseNullableSettings + alreadyExisted: bool + +@dataclass +class UpdateDatabaseRequest(GRPCTransformable): + database: str + settings: DatabaseNullableSettings + +@dataclass +class UpdateDatabaseResponse(GRPCTransformable): + database: str + settings: DatabaseNullableSettings + + +@dataclass +class DatabaseSettingsRequest(GRPCTransformable): + pass + +@dataclass +class DatabaseSettingsResponse(GRPCTransformable): + database: str + settings: DatabaseNullableSettings + +@dataclass +class NullableUint32(GRPCTransformable): + value: int + +@dataclass +class NullableUint64(GRPCTransformable): + value: int + +@dataclass +class NullableFloat(GRPCTransformable): + value: float + +@dataclass +class NullableBool(GRPCTransformable): + value: bool + +@dataclass +class NullableString(GRPCTransformable): + value: str + +@dataclass +class NullableMilliseconds(GRPCTransformable): + value: int + +@dataclass +class DatabaseNullableSettings(GRPCTransformable): + replicationSettings: ReplicationNullableSettings + fileSize: NullableUint32 + maxKeyLen: NullableUint32 + maxValueLen: NullableUint32 + maxTxEntries: NullableUint32 + excludeCommitTime: NullableBool + maxConcurrency: NullableUint32 + maxIOConcurrency: NullableUint32 + txLogCacheSize: NullableUint32 + vLogMaxOpenedFiles: NullableUint32 + txLogMaxOpenedFiles: NullableUint32 + commitLogMaxOpenedFiles: NullableUint32 + indexSettings: IndexNullableSettings + writeTxHeaderVersion: NullableUint32 + autoload: NullableBool + readTxPoolSize: NullableUint32 + syncFrequency: NullableMilliseconds + writeBufferSize: NullableUint32 + ahtSettings: AHTNullableSettings + +@dataclass +class ReplicationNullableSettings(GRPCTransformable): + replica: NullableBool + masterDatabase: NullableString + masterAddress: NullableString + masterPort: NullableUint32 + followerUsername: NullableString + followerPassword: NullableString + + +@dataclass +class IndexNullableSettings(GRPCTransformable): + flushThreshold: NullableUint32 + syncThreshold: NullableUint32 + cacheSize: NullableUint32 + maxNodeSize: NullableUint32 + maxActiveSnapshots: NullableUint32 + renewSnapRootAfter: NullableUint64 + compactionThld: NullableUint32 + delayDuringCompaction: NullableUint32 + nodesLogMaxOpenedFiles: NullableUint32 + historyLogMaxOpenedFiles: NullableUint32 + commitLogMaxOpenedFiles: NullableUint32 + flushBufferSize: NullableUint32 + cleanupPercentage: NullableFloat + +@dataclass +class AHTNullableSettings(GRPCTransformable): + syncThreshold: NullableUint32 + writeBufferSize: NullableUint32 + +@dataclass +class LoadDatabaseRequest(GRPCTransformable): + database: str + +@dataclass +class LoadDatabaseResponse(GRPCTransformable): + database: str + +@dataclass +class UnloadDatabaseRequest(GRPCTransformable): + database: str + +@dataclass +class UnloadDatabaseResponse(GRPCTransformable): + database: str + +@dataclass +class DeleteDatabaseRequest(GRPCTransformable): + database: str + +@dataclass +class DeleteDatabaseResponse(GRPCTransformable): + database: str + +@dataclass +class FlushIndexRequest(GRPCTransformable): + cleanupPercentage: float + synced: bool + +@dataclass +class FlushIndexResponse(GRPCTransformable): + database: str + +@dataclass +class Table(GRPCTransformable): + tableName: str + +@dataclass +class SQLGetRequest(GRPCTransformable): + table: str + pkValues: List[SQLValue] + atTx: int + sinceTx: int + +@dataclass +class VerifiableSQLGetRequest(GRPCTransformable): + sqlGetRequest: SQLGetRequest + proveSinceTx: int + +@dataclass +class SQLEntry(GRPCTransformable): + tx: int + key: bytes + value: bytes + metadata: KVMetadata + +@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 + +@dataclass +class UseDatabaseReply(GRPCTransformable): + token: str + +class PermissionAction(Enum): + GRANT = 0 + REVOK = 1 + +@dataclass +class ChangePermissionRequest(GRPCTransformable): + action: PermissionAction + username: str + database: str + permission: int + +@dataclass +class SetActiveUserRequest(GRPCTransformable): + active: bool + username: str + +@dataclass +class DatabaseListResponse(GRPCTransformable): + databases: List[Database] + +@dataclass +class DatabaseListRequestV2(GRPCTransformable): + pass + +@dataclass +class DatabaseListResponseV2(GRPCTransformable): + databases: List[DatabaseWithSettings] + +@dataclass +class DatabaseWithSettings(GRPCTransformable): + name: str + setting: DatabaseNullableSettings + loaded: bool + +@dataclass +class Chunk(GRPCTransformable): + content: bytes + +@dataclass +class UseSnapshotRequest(GRPCTransformable): + sinceTx: int + asBeforeTx: int + +@dataclass +class SQLExecRequest(GRPCTransformable): + sql: str + params: List[NamedParam] + noWait: bool + +@dataclass +class SQLQueryRequest(GRPCTransformable): + sql: str + params: List[NamedParam] + reuseSnapshot: int + +@dataclass +class NamedParam(GRPCTransformable): + name: str + value: SQLValue + +@dataclass +class SQLExecResult(GRPCTransformable): + txs: List[CommittedSQLTx] + ongoingTx: bool + +@dataclass +class CommittedSQLTx(GRPCTransformable): + header: TxHeader + updatedRows: int + lastInsertedPKs: Dict[str, SQLValue] + firstInsertedPKs: Dict[str, SQLValue] + + +@dataclass +class SQLQueryResult(GRPCTransformable): + columns: List[Column] + rows: List[Row] + +@dataclass +class Column(GRPCTransformable): + name: str + type: str + +@dataclass +class Row(GRPCTransformable): + columns: List[str] + values: List[SQLValue] + +# 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 + + +class TxMode(Enum): + ReadOnly = 0 + WriteOnly = 1 + ReadWrite = 2 + +@dataclass +class NewTxRequest(GRPCTransformable): + mode: TxMode + + +@dataclass +class NewTxResponse(GRPCTransformable): + transactionID : str + +@dataclass +class ErrorInfo(GRPCTransformable): + code: str + cause: str + +@dataclass +class DebugInfo(GRPCTransformable): + stack: str + +@dataclass +class RetryInfo(GRPCTransformable): + retry_delay: int \ No newline at end of file diff --git a/immudb/grpc/schema_pb2.py b/immudb/grpc/schema_pb2.py index 49cd7a4..f234109 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 @@ -20,95 +19,13 @@ 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\222A\332\002\022\356\001\n\017immudb REST API\022\332\001IMPORTANT: All get and safeget functions return base64-encoded keys and values, while all set and safeset functions expect base64-encoded inputs.ZY\nW\n\006bearer\022M\010\002\0228Authentication token, prefixed by Bearer: Bearer \032\rAuthorization \002b\014\n\n\n\006bearer\022\000'), - serialized_pb=_b('\n\x0cschema.proto\x12\rimmudb.schema\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a,protoc-gen-swagger/options/annotations.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\xea\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\x12]\n\x05Login\x12\x1b.immudb.schema.LoginRequest\x1a\x1c.immudb.schema.LoginResponse\"\x19\x88\x02\x01\x82\xd3\xe4\x93\x02\x0b\"\x06/login:\x01*\x92\x41\x02\x62\x00\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*\x12k\n\nServerInfo\x12 .immudb.schema.ServerInfoRequest\x1a!.immudb.schema.ServerInfoResponse\"\x18\x82\xd3\xe4\x93\x02\r\x12\x0b/serverinfo\x92\x41\x02\x62\x00\x12U\n\x06Health\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.HealthResponse\"\x14\x82\xd3\xe4\x93\x02\t\x12\x07/health\x92\x41\x02\x62\x00\x12h\n\x0e\x44\x61tabaseHealth\x12\x16.google.protobuf.Empty\x1a%.immudb.schema.DatabaseHealthResponse\"\x17\x82\xd3\xe4\x93\x02\x0c\x12\n/db/health\x92\x41\x02\x62\x00\x12]\n\x0c\x43urrentState\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.ImmutableState\"\x16\x82\xd3\xe4\x93\x02\x0b\x12\t/db/state\x92\x41\x02\x62\x00\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\x8b\x03Z+github.com/codenotary/immudb/pkg/api/schema\x92\x41\xda\x02\x12\xee\x01\n\x0fimmudb REST API\x12\xda\x01IMPORTANT: All get and safeget functions return base64-encoded keys and values, while all set and safeset functions expect base64-encoded inputs.ZY\nW\n\x06\x62\x65\x61rer\x12M\x08\x02\x12\x38\x41uthentication token, prefixed by Bearer: Bearer \x1a\rAuthorization \x02\x62\x0c\n\n\n\x06\x62\x65\x61rer\x12\x00\x62\x06proto3') - , - dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,protoc__gen__swagger_dot_options_dot_annotations__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=13014, - serialized_end=13089, -) -_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,protoc-gen-swagger/options/annotations.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\xea\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\x12]\n\x05Login\x12\x1b.immudb.schema.LoginRequest\x1a\x1c.immudb.schema.LoginResponse\"\x19\x88\x02\x01\x82\xd3\xe4\x93\x02\x0b\"\x06/login:\x01*\x92\x41\x02\x62\x00\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*\x12k\n\nServerInfo\x12 .immudb.schema.ServerInfoRequest\x1a!.immudb.schema.ServerInfoResponse\"\x18\x82\xd3\xe4\x93\x02\r\x12\x0b/serverinfo\x92\x41\x02\x62\x00\x12U\n\x06Health\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.HealthResponse\"\x14\x82\xd3\xe4\x93\x02\t\x12\x07/health\x92\x41\x02\x62\x00\x12h\n\x0e\x44\x61tabaseHealth\x12\x16.google.protobuf.Empty\x1a%.immudb.schema.DatabaseHealthResponse\"\x17\x82\xd3\xe4\x93\x02\x0c\x12\n/db/health\x92\x41\x02\x62\x00\x12]\n\x0c\x43urrentState\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.ImmutableState\"\x16\x82\xd3\xe4\x93\x02\x0b\x12\t/db/state\x92\x41\x02\x62\x00\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\x8b\x03Z+github.com/codenotary/immudb/pkg/api/schema\x92\x41\xda\x02\x12\xee\x01\n\x0fimmudb REST API\x12\xda\x01IMPORTANT: All get and safeget functions return base64-encoded keys and values, while all set and safeset functions expect base64-encoded inputs.ZY\nW\n\x06\x62\x65\x61rer\x12M\x08\x02\x12\x38\x41uthentication token, prefixed by Bearer: Bearer \x1a\rAuthorization \x02\x62\x0c\n\n\n\x06\x62\x65\x61rer\x12\x00\x62\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=13091, - serialized_end=13132, -) -_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=13134, - serialized_end=13186, -) -_sym_db.RegisterEnumDescriptor(_TXMODE) - +_TXMODE = DESCRIPTOR.enum_types_by_name['TxMode'] TxMode = enum_type_wrapper.EnumTypeWrapper(_TXMODE) EXCLUDE = 0 ONLY_DIGEST = 1 @@ -121,5823 +38,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=166, - serialized_end=184, -) - - -_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=186, - serialized_end=236, -) - - -_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=238, - serialized_end=360, -) - - -_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=362, - serialized_end=408, -) - - -_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=410, - serialized_end=499, -) - - -_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=501, - serialized_end=528, -) - - -_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=530, - serialized_end=609, -) - - -_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=611, - serialized_end=657, -) - - -_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=659, - serialized_end=706, -) - - -_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=708, - serialized_end=734, -) - - -_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=736, - serialized_end=765, -) - - -_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=767, - serialized_end=845, -) - - -_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=847, - serialized_end=907, -) - - -_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=1184, - serialized_end=1223, -) - -_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=1225, - serialized_end=1267, -) - -_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=1269, - serialized_end=1331, -) - -_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=910, - serialized_end=1347, -) - - -_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=1349, - serialized_end=1432, -) - - -_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=1435, - serialized_end=1610, -) - - -_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=1612, - serialized_end=1725, -) - - -_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=1728, - serialized_end=1876, -) - - -_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=1878, - serialized_end=2001, -) - - -_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=2003, - serialized_end=2051, -) - - -_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=2053, - serialized_end=2153, -) - - -_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=2155, - serialized_end=2205, -) - - -_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='endKey', full_name='immudb.schema.ScanRequest.endKey', index=1, - 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='prefix', full_name='immudb.schema.ScanRequest.prefix', index=2, - 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=3, - 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=4, - 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=5, - 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=6, - 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='inclusiveSeek', full_name='immudb.schema.ScanRequest.inclusiveSeek', index=7, - number=8, 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='inclusiveEnd', full_name='immudb.schema.ScanRequest.inclusiveEnd', index=8, - number=9, 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='offset', full_name='immudb.schema.ScanRequest.offset', 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), - ], - extensions=[ - ], - nested_types=[], - enum_types=[ - ], - serialized_options=None, - is_extendable=False, - syntax='proto3', - extension_ranges=[], - oneofs=[ - ], - serialized_start=2208, - serialized_end=2393, -) - - -_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=2395, - serialized_end=2422, -) - - -_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=2424, - serialized_end=2451, -) - - -_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=2453, - serialized_end=2502, -) - - -_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=2505, - serialized_end=2680, -) - - -_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=2682, - serialized_end=2694, -) - - -_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=2696, - serialized_end=2764, -) - - -_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=2767, - serialized_end=3026, -) - - -_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=3029, - serialized_end=3197, -) - - -_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=3199, - serialized_end=3311, -) - - -_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=3313, - serialized_end=3411, -) - - -_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=3413, - serialized_end=3444, -) - - -_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=3447, - serialized_end=3582, -) - - -_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=3585, - serialized_end=3745, -) - - -_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=3747, - serialized_end=3807, -) - - -_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=3809, - serialized_end=3927, -) - - -_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=3929, - serialized_end=4021, -) - - -_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=4023, - serialized_end=4070, -) - - -_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=4072, - serialized_end=4138, -) - - -_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=4140, - serialized_end=4231, -) - - -_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=4233, - serialized_end=4324, -) - - -_SERVERINFOREQUEST = _descriptor.Descriptor( - name='ServerInfoRequest', - full_name='immudb.schema.ServerInfoRequest', - 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=4326, - serialized_end=4345, -) - - -_SERVERINFORESPONSE = _descriptor.Descriptor( - name='ServerInfoResponse', - full_name='immudb.schema.ServerInfoResponse', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='version', full_name='immudb.schema.ServerInfoResponse.version', 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=4347, - serialized_end=4384, -) - - -_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=4386, - serialized_end=4435, -) - - -_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=4437, - serialized_end=4518, -) - - -_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=4520, - serialized_end=4623, -) - - -_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=4626, - serialized_end=4780, -) - - -_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=4782, - serialized_end=4891, -) - - -_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=4893, - serialized_end=4995, -) - - -_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=4997, - serialized_end=5019, -) - - -_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), - _descriptor.FieldDescriptor( - name='offset', full_name='immudb.schema.ZScanRequest.offset', index=11, - number=12, 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=5022, - serialized_end=5284, -) - - -_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=5286, - serialized_end=5377, -) - - -_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=5379, - serialized_end=5473, -) - - -_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), - _descriptor.FieldDescriptor( - name='keepReferencesUnresolved', full_name='immudb.schema.TxRequest.keepReferencesUnresolved', 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=5476, - serialized_end=5615, -) - - -_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=5618, - serialized_end=5790, -) - - -_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=5792, - serialized_end=5855, -) - - -_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), - _descriptor.FieldDescriptor( - name='keepReferencesUnresolved', full_name='immudb.schema.VerifiableTxRequest.keepReferencesUnresolved', 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=5858, - serialized_end=6029, -) - - -_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=6032, - serialized_end=6177, -) - - -_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=6179, - serialized_end=6219, -) - - -_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=6221, - serialized_end=6250, -) - - -_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=6252, - serialized_end=6284, -) - - -_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=6287, - serialized_end=6570, -) - - -_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), - _descriptor.FieldDescriptor( - name='ifNotExists', full_name='immudb.schema.CreateDatabaseRequest.ifNotExists', 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=6572, - serialized_end=6689, -) - - -_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), - _descriptor.FieldDescriptor( - name='alreadyExisted', full_name='immudb.schema.CreateDatabaseResponse.alreadyExisted', 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=6691, - serialized_end=6812, -) - - -_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=6814, - serialized_end=6914, -) - - -_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=6916, - serialized_end=7017, -) - - -_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=7019, - serialized_end=7044, -) - - -_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=7046, - serialized_end=7149, -) - - -_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=7151, - serialized_end=7182, -) - - -_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=7184, - serialized_end=7215, -) - - -_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=7217, - serialized_end=7247, -) - - -_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=7249, - serialized_end=7278, -) - - -_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=7280, - serialized_end=7311, -) - - -_NULLABLEMILLISECONDS = _descriptor.Descriptor( - name='NullableMilliseconds', - full_name='immudb.schema.NullableMilliseconds', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='value', full_name='immudb.schema.NullableMilliseconds.value', 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=7313, - serialized_end=7350, -) - - -_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), - _descriptor.FieldDescriptor( - name='readTxPoolSize', full_name='immudb.schema.DatabaseNullableSettings.readTxPoolSize', index=15, - number=22, 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='syncFrequency', full_name='immudb.schema.DatabaseNullableSettings.syncFrequency', index=16, - number=23, 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='writeBufferSize', full_name='immudb.schema.DatabaseNullableSettings.writeBufferSize', index=17, - number=24, 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='ahtSettings', full_name='immudb.schema.DatabaseNullableSettings.ahtSettings', index=18, - number=25, 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=7353, - serialized_end=8459, -) - - -_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=8462, - serialized_end=8811, -) - - -_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=8814, - serialized_end=9588, -) - - -_AHTNULLABLESETTINGS = _descriptor.Descriptor( - name='AHTNullableSettings', - full_name='immudb.schema.AHTNullableSettings', - filename=None, - file=DESCRIPTOR, - containing_type=None, - fields=[ - _descriptor.FieldDescriptor( - name='syncThreshold', full_name='immudb.schema.AHTNullableSettings.syncThreshold', 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='writeBufferSize', full_name='immudb.schema.AHTNullableSettings.writeBufferSize', 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=9591, - serialized_end=9722, -) - - -_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=9724, - serialized_end=9763, -) - - -_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=9765, - serialized_end=9805, -) - - -_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=9807, - serialized_end=9848, -) - - -_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=9850, - serialized_end=9892, -) - - -_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=9894, - serialized_end=9935, -) - - -_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=9937, - serialized_end=9979, -) - - -_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=9981, - serialized_end=10043, -) - - -_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=10045, - serialized_end=10083, -) - - -_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=10085, - serialized_end=10111, -) - - -_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=10113, - serialized_end=10217, -) - - -_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=10219, - serialized_end=10319, -) - - -_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=10321, - serialized_end=10416, -) - - -_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=10938, - serialized_end=10989, -) - -_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=10991, - serialized_end=11042, -) - -_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=11044, - serialized_end=11095, -) - -_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=11097, - serialized_end=11146, -) - -_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=10419, - serialized_end=11152, -) - - -_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=11154, - serialized_end=11187, -) - - -_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=11190, - serialized_end=11320, -) - - -_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=11322, - serialized_end=11378, -) - - -_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=11380, - serialized_end=11446, -) - - -_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=11448, - serialized_end=11471, -) - - -_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=11473, - serialized_end=11553, -) - - -_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=11555, - serialized_end=11666, -) - - -_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=11668, - serialized_end=11692, -) - - -_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=11694, - serialized_end=11751, -) - - -_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=11753, - serialized_end=11841, -) - - -_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=11843, - serialized_end=11939, -) - - -_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=11941, - serialized_end=12007, -) - - -_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=12009, - serialized_end=12087, -) - - -_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=12326, - serialized_end=12405, -) - -_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=12407, - serialized_end=12487, -) - -_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=12090, - serialized_end=12487, -) - - -_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=12489, - serialized_end=12579, -) - - -_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=12581, - serialized_end=12617, -) - - -_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=12619, - serialized_end=12682, -) - - -_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=12685, - serialized_end=12815, -) - - -_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=12817, - serialized_end=12868, -) - - -_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=12870, - serialized_end=12908, -) - - -_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=12910, - serialized_end=12950, -) - - -_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=12952, - serialized_end=12978, -) - - -_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=12980, - serialized_end=13012, -) - -_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 -_DATABASENULLABLESETTINGS.fields_by_name['readTxPoolSize'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['syncFrequency'].message_type = _NULLABLEMILLISECONDS -_DATABASENULLABLESETTINGS.fields_by_name['writeBufferSize'].message_type = _NULLABLEUINT32 -_DATABASENULLABLESETTINGS.fields_by_name['ahtSettings'].message_type = _AHTNULLABLESETTINGS -_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 -_AHTNULLABLESETTINGS.fields_by_name['syncThreshold'].message_type = _NULLABLEUINT32 -_AHTNULLABLESETTINGS.fields_by_name['writeBufferSize'].message_type = _NULLABLEUINT32 -_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['ServerInfoRequest'] = _SERVERINFOREQUEST -DESCRIPTOR.message_types_by_name['ServerInfoResponse'] = _SERVERINFORESPONSE -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['NullableMilliseconds'] = _NULLABLEMILLISECONDS -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['AHTNullableSettings'] = _AHTNULLABLESETTINGS -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' @@ -6822,657 +1047,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=13189, - serialized_end=19695, - 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=_b('\202\323\344\223\002\014\022\n/user/list'), - ), - _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=_b('\202\323\344\223\002\n\"\005/user:\001*'), - ), - _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=_b('\202\323\344\223\002\032\"\025/user/password/change:\001*'), - ), - _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=_b('\202\323\344\223\002\033\"\026/user/changepermission:\001*'), - ), - _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=_b('\202\323\344\223\002\030\"\023/user/setactiveUser:\001*'), - ), - _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=_b('\210\002\001'), - ), - _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=_b('\210\002\001'), - ), - _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=_b('\210\002\001\202\323\344\223\002\013\"\006/login:\001*\222A\002b\000'), - ), - _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=_b('\210\002\001\202\323\344\223\002\014\"\007/logout:\001*'), - ), - _descriptor.MethodDescriptor( - name='Set', - full_name='immudb.schema.ImmuService.Set', - index=17, - containing_service=None, - input_type=_SETREQUEST, - output_type=_TXHEADER, - serialized_options=_b('\202\323\344\223\002\014\"\007/db/set:\001*'), - ), - _descriptor.MethodDescriptor( - name='VerifiableSet', - full_name='immudb.schema.ImmuService.VerifiableSet', - index=18, - containing_service=None, - input_type=_VERIFIABLESETREQUEST, - output_type=_VERIFIABLETX, - serialized_options=_b('\202\323\344\223\002\027\"\022/db/verifiable/set:\001*'), - ), - _descriptor.MethodDescriptor( - name='Get', - full_name='immudb.schema.ImmuService.Get', - index=19, - containing_service=None, - input_type=_KEYREQUEST, - output_type=_ENTRY, - serialized_options=_b('\202\323\344\223\002\017\022\r/db/get/{key}'), - ), - _descriptor.MethodDescriptor( - name='VerifiableGet', - full_name='immudb.schema.ImmuService.VerifiableGet', - index=20, - containing_service=None, - input_type=_VERIFIABLEGETREQUEST, - output_type=_VERIFIABLEENTRY, - serialized_options=_b('\202\323\344\223\002\027\"\022/db/verifiable/get:\001*'), - ), - _descriptor.MethodDescriptor( - name='Delete', - full_name='immudb.schema.ImmuService.Delete', - index=21, - containing_service=None, - input_type=_DELETEKEYSREQUEST, - output_type=_TXHEADER, - serialized_options=_b('\202\323\344\223\002\017\"\n/db/delete:\001*'), - ), - _descriptor.MethodDescriptor( - name='GetAll', - full_name='immudb.schema.ImmuService.GetAll', - index=22, - containing_service=None, - input_type=_KEYLISTREQUEST, - output_type=_ENTRIES, - serialized_options=_b('\202\323\344\223\002\017\"\n/db/getall:\001*'), - ), - _descriptor.MethodDescriptor( - name='ExecAll', - full_name='immudb.schema.ImmuService.ExecAll', - index=23, - containing_service=None, - input_type=_EXECALLREQUEST, - output_type=_TXHEADER, - serialized_options=_b('\202\323\344\223\002\020\"\013/db/execall:\001*'), - ), - _descriptor.MethodDescriptor( - name='Scan', - full_name='immudb.schema.ImmuService.Scan', - index=24, - containing_service=None, - input_type=_SCANREQUEST, - output_type=_ENTRIES, - serialized_options=_b('\202\323\344\223\002\r\"\010/db/scan:\001*'), - ), - _descriptor.MethodDescriptor( - name='Count', - full_name='immudb.schema.ImmuService.Count', - index=25, - containing_service=None, - input_type=_KEYPREFIX, - output_type=_ENTRYCOUNT, - serialized_options=_b('\202\323\344\223\002\024\022\022/db/count/{prefix}'), - ), - _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=_b('\202\323\344\223\002\016\022\014/db/countall'), - ), - _descriptor.MethodDescriptor( - name='TxById', - full_name='immudb.schema.ImmuService.TxById', - index=27, - containing_service=None, - input_type=_TXREQUEST, - output_type=_TX, - serialized_options=_b('\202\323\344\223\002\r\022\013/db/tx/{tx}'), - ), - _descriptor.MethodDescriptor( - name='VerifiableTxById', - full_name='immudb.schema.ImmuService.VerifiableTxById', - index=28, - containing_service=None, - input_type=_VERIFIABLETXREQUEST, - output_type=_VERIFIABLETX, - serialized_options=_b('\202\323\344\223\002\030\022\026/db/verifiable/tx/{tx}'), - ), - _descriptor.MethodDescriptor( - name='TxScan', - full_name='immudb.schema.ImmuService.TxScan', - index=29, - containing_service=None, - input_type=_TXSCANREQUEST, - output_type=_TXLIST, - serialized_options=_b('\202\323\344\223\002\013\"\006/db/tx:\001*'), - ), - _descriptor.MethodDescriptor( - name='History', - full_name='immudb.schema.ImmuService.History', - index=30, - containing_service=None, - input_type=_HISTORYREQUEST, - output_type=_ENTRIES, - serialized_options=_b('\202\323\344\223\002\020\"\013/db/history:\001*'), - ), - _descriptor.MethodDescriptor( - name='ServerInfo', - full_name='immudb.schema.ImmuService.ServerInfo', - index=31, - containing_service=None, - input_type=_SERVERINFOREQUEST, - output_type=_SERVERINFORESPONSE, - serialized_options=_b('\202\323\344\223\002\r\022\013/serverinfo\222A\002b\000'), - ), - _descriptor.MethodDescriptor( - name='Health', - full_name='immudb.schema.ImmuService.Health', - index=32, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_HEALTHRESPONSE, - serialized_options=_b('\202\323\344\223\002\t\022\007/health\222A\002b\000'), - ), - _descriptor.MethodDescriptor( - name='DatabaseHealth', - full_name='immudb.schema.ImmuService.DatabaseHealth', - index=33, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_DATABASEHEALTHRESPONSE, - serialized_options=_b('\202\323\344\223\002\014\022\n/db/health\222A\002b\000'), - ), - _descriptor.MethodDescriptor( - name='CurrentState', - full_name='immudb.schema.ImmuService.CurrentState', - index=34, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_IMMUTABLESTATE, - serialized_options=_b('\202\323\344\223\002\013\022\t/db/state\222A\002b\000'), - ), - _descriptor.MethodDescriptor( - name='SetReference', - full_name='immudb.schema.ImmuService.SetReference', - index=35, - containing_service=None, - input_type=_REFERENCEREQUEST, - output_type=_TXHEADER, - serialized_options=_b('\202\323\344\223\002\025\"\020/db/setreference:\001*'), - ), - _descriptor.MethodDescriptor( - name='VerifiableSetReference', - full_name='immudb.schema.ImmuService.VerifiableSetReference', - index=36, - containing_service=None, - input_type=_VERIFIABLEREFERENCEREQUEST, - output_type=_VERIFIABLETX, - serialized_options=_b('\202\323\344\223\002 \"\033/db/verifiable/setreference:\001*'), - ), - _descriptor.MethodDescriptor( - name='ZAdd', - full_name='immudb.schema.ImmuService.ZAdd', - index=37, - containing_service=None, - input_type=_ZADDREQUEST, - output_type=_TXHEADER, - serialized_options=_b('\202\323\344\223\002\r\"\010/db/zadd:\001*'), - ), - _descriptor.MethodDescriptor( - name='VerifiableZAdd', - full_name='immudb.schema.ImmuService.VerifiableZAdd', - index=38, - containing_service=None, - input_type=_VERIFIABLEZADDREQUEST, - output_type=_VERIFIABLETX, - serialized_options=_b('\202\323\344\223\002\030\"\023/db/verifiable/zadd:\001*'), - ), - _descriptor.MethodDescriptor( - name='ZScan', - full_name='immudb.schema.ImmuService.ZScan', - index=39, - containing_service=None, - input_type=_ZSCANREQUEST, - output_type=_ZENTRIES, - serialized_options=_b('\202\323\344\223\002\016\"\t/db/zscan:\001*'), - ), - _descriptor.MethodDescriptor( - name='CreateDatabase', - full_name='immudb.schema.ImmuService.CreateDatabase', - index=40, - containing_service=None, - input_type=_DATABASE, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b('\210\002\001\202\323\344\223\002\017\"\n/db/create:\001*'), - ), - _descriptor.MethodDescriptor( - name='CreateDatabaseWith', - full_name='immudb.schema.ImmuService.CreateDatabaseWith', - index=41, - containing_service=None, - input_type=_DATABASESETTINGS, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b('\210\002\001\202\323\344\223\002\023\"\016/db/createwith:\001*'), - ), - _descriptor.MethodDescriptor( - name='CreateDatabaseV2', - full_name='immudb.schema.ImmuService.CreateDatabaseV2', - index=42, - containing_service=None, - input_type=_CREATEDATABASEREQUEST, - output_type=_CREATEDATABASERESPONSE, - serialized_options=_b('\202\323\344\223\002\022\"\r/db/create/v2:\001*'), - ), - _descriptor.MethodDescriptor( - name='LoadDatabase', - full_name='immudb.schema.ImmuService.LoadDatabase', - index=43, - containing_service=None, - input_type=_LOADDATABASEREQUEST, - output_type=_LOADDATABASERESPONSE, - serialized_options=_b('\202\323\344\223\002\r\"\010/db/load:\001*'), - ), - _descriptor.MethodDescriptor( - name='UnloadDatabase', - full_name='immudb.schema.ImmuService.UnloadDatabase', - index=44, - containing_service=None, - input_type=_UNLOADDATABASEREQUEST, - output_type=_UNLOADDATABASERESPONSE, - serialized_options=_b('\202\323\344\223\002\017\"\n/db/unload:\001*'), - ), - _descriptor.MethodDescriptor( - name='DeleteDatabase', - full_name='immudb.schema.ImmuService.DeleteDatabase', - index=45, - containing_service=None, - input_type=_DELETEDATABASEREQUEST, - output_type=_DELETEDATABASERESPONSE, - serialized_options=_b('\202\323\344\223\002\017\"\n/db/delete:\001*'), - ), - _descriptor.MethodDescriptor( - name='DatabaseList', - full_name='immudb.schema.ImmuService.DatabaseList', - index=46, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_DATABASELISTRESPONSE, - serialized_options=_b('\210\002\001\202\323\344\223\002\r\"\010/db/list:\001*'), - ), - _descriptor.MethodDescriptor( - name='DatabaseListV2', - full_name='immudb.schema.ImmuService.DatabaseListV2', - index=47, - containing_service=None, - input_type=_DATABASELISTREQUESTV2, - output_type=_DATABASELISTRESPONSEV2, - serialized_options=_b('\202\323\344\223\002\020\"\013/db/list/v2:\001*'), - ), - _descriptor.MethodDescriptor( - name='UseDatabase', - full_name='immudb.schema.ImmuService.UseDatabase', - index=48, - containing_service=None, - input_type=_DATABASE, - output_type=_USEDATABASEREPLY, - serialized_options=_b('\202\323\344\223\002\030\022\026/db/use/{databaseName}'), - ), - _descriptor.MethodDescriptor( - name='UpdateDatabase', - full_name='immudb.schema.ImmuService.UpdateDatabase', - index=49, - containing_service=None, - input_type=_DATABASESETTINGS, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b('\210\002\001\202\323\344\223\002\017\"\n/db/update:\001*'), - ), - _descriptor.MethodDescriptor( - name='UpdateDatabaseV2', - full_name='immudb.schema.ImmuService.UpdateDatabaseV2', - index=50, - containing_service=None, - input_type=_UPDATEDATABASEREQUEST, - output_type=_UPDATEDATABASERESPONSE, - serialized_options=_b('\202\323\344\223\002\022\"\r/db/update/v2:\001*'), - ), - _descriptor.MethodDescriptor( - name='GetDatabaseSettings', - full_name='immudb.schema.ImmuService.GetDatabaseSettings', - index=51, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_DATABASESETTINGS, - serialized_options=_b('\210\002\001\202\323\344\223\002\021\"\014/db/settings:\001*'), - ), - _descriptor.MethodDescriptor( - name='GetDatabaseSettingsV2', - full_name='immudb.schema.ImmuService.GetDatabaseSettingsV2', - index=52, - containing_service=None, - input_type=_DATABASESETTINGSREQUEST, - output_type=_DATABASESETTINGSRESPONSE, - serialized_options=_b('\202\323\344\223\002\024\"\017/db/settings/v2:\001*'), - ), - _descriptor.MethodDescriptor( - name='FlushIndex', - full_name='immudb.schema.ImmuService.FlushIndex', - index=53, - containing_service=None, - input_type=_FLUSHINDEXREQUEST, - output_type=_FLUSHINDEXRESPONSE, - serialized_options=_b('\202\323\344\223\002\020\022\016/db/flushindex'), - ), - _descriptor.MethodDescriptor( - name='CompactIndex', - full_name='immudb.schema.ImmuService.CompactIndex', - index=54, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - serialized_options=_b('\202\323\344\223\002\022\022\020/db/compactindex'), - ), - _descriptor.MethodDescriptor( - name='streamGet', - full_name='immudb.schema.ImmuService.streamGet', - index=55, - containing_service=None, - input_type=_KEYREQUEST, - output_type=_CHUNK, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamSet', - full_name='immudb.schema.ImmuService.streamSet', - index=56, - containing_service=None, - input_type=_CHUNK, - output_type=_TXHEADER, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamVerifiableGet', - full_name='immudb.schema.ImmuService.streamVerifiableGet', - index=57, - containing_service=None, - input_type=_VERIFIABLEGETREQUEST, - output_type=_CHUNK, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamVerifiableSet', - full_name='immudb.schema.ImmuService.streamVerifiableSet', - index=58, - containing_service=None, - input_type=_CHUNK, - output_type=_VERIFIABLETX, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamScan', - full_name='immudb.schema.ImmuService.streamScan', - index=59, - containing_service=None, - input_type=_SCANREQUEST, - output_type=_CHUNK, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamZScan', - full_name='immudb.schema.ImmuService.streamZScan', - index=60, - containing_service=None, - input_type=_ZSCANREQUEST, - output_type=_CHUNK, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamHistory', - full_name='immudb.schema.ImmuService.streamHistory', - index=61, - containing_service=None, - input_type=_HISTORYREQUEST, - output_type=_CHUNK, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='streamExecAll', - full_name='immudb.schema.ImmuService.streamExecAll', - index=62, - containing_service=None, - input_type=_CHUNK, - output_type=_TXHEADER, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='exportTx', - full_name='immudb.schema.ImmuService.exportTx', - index=63, - containing_service=None, - input_type=_EXPORTTXREQUEST, - output_type=_CHUNK, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='replicateTx', - full_name='immudb.schema.ImmuService.replicateTx', - index=64, - containing_service=None, - input_type=_CHUNK, - output_type=_TXHEADER, - serialized_options=None, - ), - _descriptor.MethodDescriptor( - name='SQLExec', - full_name='immudb.schema.ImmuService.SQLExec', - index=65, - containing_service=None, - input_type=_SQLEXECREQUEST, - output_type=_SQLEXECRESULT, - serialized_options=_b('\202\323\344\223\002\020\"\013/db/sqlexec:\001*'), - ), - _descriptor.MethodDescriptor( - name='SQLQuery', - full_name='immudb.schema.ImmuService.SQLQuery', - index=66, - containing_service=None, - input_type=_SQLQUERYREQUEST, - output_type=_SQLQUERYRESULT, - serialized_options=_b('\202\323\344\223\002\021\"\014/db/sqlquery:\001*'), - ), - _descriptor.MethodDescriptor( - name='ListTables', - full_name='immudb.schema.ImmuService.ListTables', - index=67, - containing_service=None, - input_type=google_dot_protobuf_dot_empty__pb2._EMPTY, - output_type=_SQLQUERYRESULT, - serialized_options=_b('\202\323\344\223\002\020\022\016/db/table/list'), - ), - _descriptor.MethodDescriptor( - name='DescribeTable', - full_name='immudb.schema.ImmuService.DescribeTable', - index=68, - containing_service=None, - input_type=_TABLE, - output_type=_SQLQUERYRESULT, - serialized_options=_b('\202\323\344\223\002\017\"\n/db/tables:\001*'), - ), - _descriptor.MethodDescriptor( - name='VerifiableSQLGet', - full_name='immudb.schema.ImmuService.VerifiableSQLGet', - index=69, - containing_service=None, - input_type=_VERIFIABLESQLGETREQUEST, - output_type=_VERIFIABLESQLENTRY, - serialized_options=_b('\202\323\344\223\002\032\"\025/db/verifiable/sqlget:\001*'), - ), -]) -_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\222A\332\002\022\356\001\n\017immudb REST API\022\332\001IMPORTANT: All get and safeget functions return base64-encoded keys and values, while all set and safeset functions expect base64-encoded inputs.ZY\nW\n\006bearer\022M\010\002\0228Authentication token, prefixed by Bearer: Bearer \032\rAuthorization \002b\014\n\n\n\006bearer\022\000' + _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*\222A\002b\000' + _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\222A\002b\000' + _IMMUSERVICE.methods_by_name['Health']._options = None + _IMMUSERVICE.methods_by_name['Health']._serialized_options = b'\202\323\344\223\002\t\022\007/health\222A\002b\000' + _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\222A\002b\000' + _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\222A\002b\000' + _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=13014 + _ENTRYTYPEACTION._serialized_end=13089 + _PERMISSIONACTION._serialized_start=13091 + _PERMISSIONACTION._serialized_end=13132 + _TXMODE._serialized_start=13134 + _TXMODE._serialized_end=13186 + _KEY._serialized_start=166 + _KEY._serialized_end=184 + _PERMISSION._serialized_start=186 + _PERMISSION._serialized_end=236 + _USER._serialized_start=238 + _USER._serialized_end=360 + _USERLIST._serialized_start=362 + _USERLIST._serialized_end=408 + _CREATEUSERREQUEST._serialized_start=410 + _CREATEUSERREQUEST._serialized_end=499 + _USERREQUEST._serialized_start=501 + _USERREQUEST._serialized_end=528 + _CHANGEPASSWORDREQUEST._serialized_start=530 + _CHANGEPASSWORDREQUEST._serialized_end=609 + _LOGINREQUEST._serialized_start=611 + _LOGINREQUEST._serialized_end=657 + _LOGINRESPONSE._serialized_start=659 + _LOGINRESPONSE._serialized_end=706 + _AUTHCONFIG._serialized_start=708 + _AUTHCONFIG._serialized_end=734 + _MTLSCONFIG._serialized_start=736 + _MTLSCONFIG._serialized_end=765 + _OPENSESSIONREQUEST._serialized_start=767 + _OPENSESSIONREQUEST._serialized_end=845 + _OPENSESSIONRESPONSE._serialized_start=847 + _OPENSESSIONRESPONSE._serialized_end=907 + _PRECONDITION._serialized_start=910 + _PRECONDITION._serialized_end=1347 + _PRECONDITION_KEYMUSTEXISTPRECONDITION._serialized_start=1184 + _PRECONDITION_KEYMUSTEXISTPRECONDITION._serialized_end=1223 + _PRECONDITION_KEYMUSTNOTEXISTPRECONDITION._serialized_start=1225 + _PRECONDITION_KEYMUSTNOTEXISTPRECONDITION._serialized_end=1267 + _PRECONDITION_KEYNOTMODIFIEDAFTERTXPRECONDITION._serialized_start=1269 + _PRECONDITION_KEYNOTMODIFIEDAFTERTXPRECONDITION._serialized_end=1331 + _KEYVALUE._serialized_start=1349 + _KEYVALUE._serialized_end=1432 + _ENTRY._serialized_start=1435 + _ENTRY._serialized_end=1610 + _REFERENCE._serialized_start=1612 + _REFERENCE._serialized_end=1725 + _OP._serialized_start=1728 + _OP._serialized_end=1876 + _EXECALLREQUEST._serialized_start=1878 + _EXECALLREQUEST._serialized_end=2001 + _ENTRIES._serialized_start=2003 + _ENTRIES._serialized_end=2051 + _ZENTRY._serialized_start=2053 + _ZENTRY._serialized_end=2153 + _ZENTRIES._serialized_start=2155 + _ZENTRIES._serialized_end=2205 + _SCANREQUEST._serialized_start=2208 + _SCANREQUEST._serialized_end=2393 + _KEYPREFIX._serialized_start=2395 + _KEYPREFIX._serialized_end=2422 + _ENTRYCOUNT._serialized_start=2424 + _ENTRYCOUNT._serialized_end=2451 + _SIGNATURE._serialized_start=2453 + _SIGNATURE._serialized_end=2502 + _TXHEADER._serialized_start=2505 + _TXHEADER._serialized_end=2680 + _TXMETADATA._serialized_start=2682 + _TXMETADATA._serialized_end=2694 + _LINEARPROOF._serialized_start=2696 + _LINEARPROOF._serialized_end=2764 + _DUALPROOF._serialized_start=2767 + _DUALPROOF._serialized_end=3026 + _TX._serialized_start=3029 + _TX._serialized_end=3197 + _TXENTRY._serialized_start=3199 + _TXENTRY._serialized_end=3311 + _KVMETADATA._serialized_start=3313 + _KVMETADATA._serialized_end=3411 + _EXPIRATION._serialized_start=3413 + _EXPIRATION._serialized_end=3444 + _VERIFIABLETX._serialized_start=3447 + _VERIFIABLETX._serialized_end=3582 + _VERIFIABLEENTRY._serialized_start=3585 + _VERIFIABLEENTRY._serialized_end=3745 + _INCLUSIONPROOF._serialized_start=3747 + _INCLUSIONPROOF._serialized_end=3807 + _SETREQUEST._serialized_start=3809 + _SETREQUEST._serialized_end=3927 + _KEYREQUEST._serialized_start=3929 + _KEYREQUEST._serialized_end=4021 + _KEYLISTREQUEST._serialized_start=4023 + _KEYLISTREQUEST._serialized_end=4070 + _DELETEKEYSREQUEST._serialized_start=4072 + _DELETEKEYSREQUEST._serialized_end=4138 + _VERIFIABLESETREQUEST._serialized_start=4140 + _VERIFIABLESETREQUEST._serialized_end=4231 + _VERIFIABLEGETREQUEST._serialized_start=4233 + _VERIFIABLEGETREQUEST._serialized_end=4324 + _SERVERINFOREQUEST._serialized_start=4326 + _SERVERINFOREQUEST._serialized_end=4345 + _SERVERINFORESPONSE._serialized_start=4347 + _SERVERINFORESPONSE._serialized_end=4384 + _HEALTHRESPONSE._serialized_start=4386 + _HEALTHRESPONSE._serialized_end=4435 + _DATABASEHEALTHRESPONSE._serialized_start=4437 + _DATABASEHEALTHRESPONSE._serialized_end=4518 + _IMMUTABLESTATE._serialized_start=4520 + _IMMUTABLESTATE._serialized_end=4623 + _REFERENCEREQUEST._serialized_start=4626 + _REFERENCEREQUEST._serialized_end=4780 + _VERIFIABLEREFERENCEREQUEST._serialized_start=4782 + _VERIFIABLEREFERENCEREQUEST._serialized_end=4891 + _ZADDREQUEST._serialized_start=4893 + _ZADDREQUEST._serialized_end=4995 + _SCORE._serialized_start=4997 + _SCORE._serialized_end=5019 + _ZSCANREQUEST._serialized_start=5022 + _ZSCANREQUEST._serialized_end=5284 + _HISTORYREQUEST._serialized_start=5286 + _HISTORYREQUEST._serialized_end=5377 + _VERIFIABLEZADDREQUEST._serialized_start=5379 + _VERIFIABLEZADDREQUEST._serialized_end=5473 + _TXREQUEST._serialized_start=5476 + _TXREQUEST._serialized_end=5615 + _ENTRIESSPEC._serialized_start=5618 + _ENTRIESSPEC._serialized_end=5790 + _ENTRYTYPESPEC._serialized_start=5792 + _ENTRYTYPESPEC._serialized_end=5855 + _VERIFIABLETXREQUEST._serialized_start=5858 + _VERIFIABLETXREQUEST._serialized_end=6029 + _TXSCANREQUEST._serialized_start=6032 + _TXSCANREQUEST._serialized_end=6177 + _TXLIST._serialized_start=6179 + _TXLIST._serialized_end=6219 + _EXPORTTXREQUEST._serialized_start=6221 + _EXPORTTXREQUEST._serialized_end=6250 + _DATABASE._serialized_start=6252 + _DATABASE._serialized_end=6284 + _DATABASESETTINGS._serialized_start=6287 + _DATABASESETTINGS._serialized_end=6570 + _CREATEDATABASEREQUEST._serialized_start=6572 + _CREATEDATABASEREQUEST._serialized_end=6689 + _CREATEDATABASERESPONSE._serialized_start=6691 + _CREATEDATABASERESPONSE._serialized_end=6812 + _UPDATEDATABASEREQUEST._serialized_start=6814 + _UPDATEDATABASEREQUEST._serialized_end=6914 + _UPDATEDATABASERESPONSE._serialized_start=6916 + _UPDATEDATABASERESPONSE._serialized_end=7017 + _DATABASESETTINGSREQUEST._serialized_start=7019 + _DATABASESETTINGSREQUEST._serialized_end=7044 + _DATABASESETTINGSRESPONSE._serialized_start=7046 + _DATABASESETTINGSRESPONSE._serialized_end=7149 + _NULLABLEUINT32._serialized_start=7151 + _NULLABLEUINT32._serialized_end=7182 + _NULLABLEUINT64._serialized_start=7184 + _NULLABLEUINT64._serialized_end=7215 + _NULLABLEFLOAT._serialized_start=7217 + _NULLABLEFLOAT._serialized_end=7247 + _NULLABLEBOOL._serialized_start=7249 + _NULLABLEBOOL._serialized_end=7278 + _NULLABLESTRING._serialized_start=7280 + _NULLABLESTRING._serialized_end=7311 + _NULLABLEMILLISECONDS._serialized_start=7313 + _NULLABLEMILLISECONDS._serialized_end=7350 + _DATABASENULLABLESETTINGS._serialized_start=7353 + _DATABASENULLABLESETTINGS._serialized_end=8459 + _REPLICATIONNULLABLESETTINGS._serialized_start=8462 + _REPLICATIONNULLABLESETTINGS._serialized_end=8811 + _INDEXNULLABLESETTINGS._serialized_start=8814 + _INDEXNULLABLESETTINGS._serialized_end=9588 + _AHTNULLABLESETTINGS._serialized_start=9591 + _AHTNULLABLESETTINGS._serialized_end=9722 + _LOADDATABASEREQUEST._serialized_start=9724 + _LOADDATABASEREQUEST._serialized_end=9763 + _LOADDATABASERESPONSE._serialized_start=9765 + _LOADDATABASERESPONSE._serialized_end=9805 + _UNLOADDATABASEREQUEST._serialized_start=9807 + _UNLOADDATABASEREQUEST._serialized_end=9848 + _UNLOADDATABASERESPONSE._serialized_start=9850 + _UNLOADDATABASERESPONSE._serialized_end=9892 + _DELETEDATABASEREQUEST._serialized_start=9894 + _DELETEDATABASEREQUEST._serialized_end=9935 + _DELETEDATABASERESPONSE._serialized_start=9937 + _DELETEDATABASERESPONSE._serialized_end=9979 + _FLUSHINDEXREQUEST._serialized_start=9981 + _FLUSHINDEXREQUEST._serialized_end=10043 + _FLUSHINDEXRESPONSE._serialized_start=10045 + _FLUSHINDEXRESPONSE._serialized_end=10083 + _TABLE._serialized_start=10085 + _TABLE._serialized_end=10111 + _SQLGETREQUEST._serialized_start=10113 + _SQLGETREQUEST._serialized_end=10217 + _VERIFIABLESQLGETREQUEST._serialized_start=10219 + _VERIFIABLESQLGETREQUEST._serialized_end=10319 + _SQLENTRY._serialized_start=10321 + _SQLENTRY._serialized_end=10416 + _VERIFIABLESQLENTRY._serialized_start=10419 + _VERIFIABLESQLENTRY._serialized_end=11152 + _VERIFIABLESQLENTRY_COLNAMESBYIDENTRY._serialized_start=10938 + _VERIFIABLESQLENTRY_COLNAMESBYIDENTRY._serialized_end=10989 + _VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY._serialized_start=10991 + _VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY._serialized_end=11042 + _VERIFIABLESQLENTRY_COLTYPESBYIDENTRY._serialized_start=11044 + _VERIFIABLESQLENTRY_COLTYPESBYIDENTRY._serialized_end=11095 + _VERIFIABLESQLENTRY_COLLENBYIDENTRY._serialized_start=11097 + _VERIFIABLESQLENTRY_COLLENBYIDENTRY._serialized_end=11146 + _USEDATABASEREPLY._serialized_start=11154 + _USEDATABASEREPLY._serialized_end=11187 + _CHANGEPERMISSIONREQUEST._serialized_start=11190 + _CHANGEPERMISSIONREQUEST._serialized_end=11320 + _SETACTIVEUSERREQUEST._serialized_start=11322 + _SETACTIVEUSERREQUEST._serialized_end=11378 + _DATABASELISTRESPONSE._serialized_start=11380 + _DATABASELISTRESPONSE._serialized_end=11446 + _DATABASELISTREQUESTV2._serialized_start=11448 + _DATABASELISTREQUESTV2._serialized_end=11471 + _DATABASELISTRESPONSEV2._serialized_start=11473 + _DATABASELISTRESPONSEV2._serialized_end=11553 + _DATABASEWITHSETTINGS._serialized_start=11555 + _DATABASEWITHSETTINGS._serialized_end=11666 + _CHUNK._serialized_start=11668 + _CHUNK._serialized_end=11692 + _USESNAPSHOTREQUEST._serialized_start=11694 + _USESNAPSHOTREQUEST._serialized_end=11751 + _SQLEXECREQUEST._serialized_start=11753 + _SQLEXECREQUEST._serialized_end=11841 + _SQLQUERYREQUEST._serialized_start=11843 + _SQLQUERYREQUEST._serialized_end=11939 + _NAMEDPARAM._serialized_start=11941 + _NAMEDPARAM._serialized_end=12007 + _SQLEXECRESULT._serialized_start=12009 + _SQLEXECRESULT._serialized_end=12087 + _COMMITTEDSQLTX._serialized_start=12090 + _COMMITTEDSQLTX._serialized_end=12487 + _COMMITTEDSQLTX_LASTINSERTEDPKSENTRY._serialized_start=12326 + _COMMITTEDSQLTX_LASTINSERTEDPKSENTRY._serialized_end=12405 + _COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY._serialized_start=12407 + _COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY._serialized_end=12487 + _SQLQUERYRESULT._serialized_start=12489 + _SQLQUERYRESULT._serialized_end=12579 + _COLUMN._serialized_start=12581 + _COLUMN._serialized_end=12617 + _ROW._serialized_start=12619 + _ROW._serialized_end=12682 + _SQLVALUE._serialized_start=12685 + _SQLVALUE._serialized_end=12815 + _NEWTXREQUEST._serialized_start=12817 + _NEWTXREQUEST._serialized_end=12868 + _NEWTXRESPONSE._serialized_start=12870 + _NEWTXRESPONSE._serialized_end=12908 + _ERRORINFO._serialized_start=12910 + _ERRORINFO._serialized_end=12950 + _DEBUGINFO._serialized_start=12952 + _DEBUGINFO._serialized_end=12978 + _RETRYINFO._serialized_start=12980 + _RETRYINFO._serialized_end=13012 + _IMMUSERVICE._serialized_start=13189 + _IMMUSERVICE._serialized_end=19695 # @@protoc_insertion_point(module_scope) diff --git a/immudb/grpc/schema_pb2_grpc.py b/immudb/grpc/schema_pb2_grpc.py index 3f6eb46..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,1216 +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.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, - ) + + 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): - # 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 UpdateMTLSConfig(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 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 + """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 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 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 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 - 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: 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 - 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): - """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 - 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): - """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 - pass - 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 - 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 +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, + ), + '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 """ - 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 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, - ), - '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,)) + @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/requirements-dev.txt b/requirements-dev.txt index a56ca01..bc6efda 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,4 +1,4 @@ -r requirements.txt pytest>=4.6.9 -grpcio-tools==1.26.0 +grpcio-tools==1.48.1 diff --git a/requirements.txt b/requirements.txt index 4bf14b3..ef39c7c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,7 @@ -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 protoc-gen-swagger==0.1.0 diff --git a/tests/immu/test_convert_to_grpc.py b/tests/immu/test_convert_to_grpc.py new file mode 100644 index 0000000..22c0f44 --- /dev/null +++ b/tests/immu/test_convert_to_grpc.py @@ -0,0 +1,22 @@ +from immudb import grpc +import immudb.datatypesv2 as datatypesv2 +from immudb.grpc.schema_pb2 import Key, ExecAllRequest +from immudb.dataconverter import convertResponse + +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) + + 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_tx_scan.py b/tests/immu/test_tx_scan.py new file mode 100644 index 0000000..2d39dd9 --- /dev/null +++ b/tests/immu/test_tx_scan.py @@ -0,0 +1,15 @@ +from immudb import ImmudbClient +from immudb.datatypesv2 import EntriesSpec, EntryTypeAction, EntryTypeSpec +def test_tx_scan(client: ImmudbClient): + 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 \ 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) + From 0bdce95173bc51e801e9c1eef59776ffbf597432 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Tue, 6 Sep 2022 20:59:01 +0200 Subject: [PATCH 03/38] Adding missing pytz --- requirements-dev.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements-dev.txt b/requirements-dev.txt index bc6efda..a3fe9b8 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,3 +2,4 @@ pytest>=4.6.9 grpcio-tools==1.48.1 +pytz==2022.1 \ No newline at end of file From 9df2c4b0a255f802c3e074d7d51b1857b3c6ca2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Wed, 7 Sep 2022 15:37:35 +0200 Subject: [PATCH 04/38] Covering api --- immudb/client.py | 114 +++- immudb/dataconverter.py | 6 +- immudb/datatypesv2.py | 620 +++++++++++---------- immudb/streamsutils.py | 53 ++ tests/conftest.py | 2 +- tests/immu/test_convert_to_grpc.py | 4 +- tests/immu/test_create_load_database_v2.py | 116 ++++ tests/immu/test_database_health.py | 10 + tests/immu/test_flush_index.py | 12 + tests/immu/test_max_grpc_size.py | 19 + tests/immu/test_server_info.py | 7 + tests/immu/test_stream.py | 31 ++ tests/immu/test_tx_scan.py | 20 +- 13 files changed, 681 insertions(+), 333 deletions(-) create mode 100644 immudb/streamsutils.py create mode 100644 tests/immu/test_create_load_database_v2.py create mode 100644 tests/immu/test_database_health.py create mode 100644 tests/immu/test_flush_index.py create mode 100644 tests/immu/test_max_grpc_size.py create mode 100644 tests/immu/test_server_info.py create mode 100644 tests/immu/test_stream.py diff --git a/immudb/client.py b/immudb/client.py index 6852c7c..3b7634e 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -10,12 +10,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import List +from typing import Generator, List, Union import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from immudb import grpcutils -from immudb.grpc.schema_pb2 import EntriesSpec, EntryTypeSpec, TxScanRequest +from immudb.grpc.schema_pb2 import Chunk, EntriesSpec, EntryTypeSpec, TxScanRequest from immudb.handler import (batchGet, batchSet, changePassword, changePermission, createUser, currentRoot, createDatabase, databaseList, deleteKeys, useDatabase, get, listUsers, sqldescribe, verifiedGet, verifiedSet, setValue, history, @@ -35,10 +35,12 @@ import datetime +from immudb.streamsutils import FullKeyValue, KeyHeader, StreamReader, ValueChunk + 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: @@ -50,7 +52,13 @@ def __init__(self, immudUrl=None, rs: RootService = None, publicKeyFile: str = N 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)] + print(options) + self.channel = grpc.insecure_channel(immudUrl, options = options) + else: + self.channel = grpc.insecure_channel(immudUrl) self._resetStub() if rs is None: self._rs = RootService() @@ -357,10 +365,36 @@ def createDatabase(self, dbName: bytes): request = schema_pb2_grpc.schema__pb2.Database(databaseName=dbName) return createDatabase.call(self._stub, self._rs, request) - # Not implemented: createDatabaseV2 - # Not implemented: loadDatabase - # Not implemented: unloadDatabase - # Not implemented: deleteDatabase + def createDatabaseV2(self, name: str, settings: datatypesv2.DatabaseNullableSettings, ifNotExists: bool) -> datatypesv2.CreateDatabaseResponse: + request = datatypesv2.CreateDatabaseRequest(name = name, settings = settings, ifNotExists = ifNotExists) + resp = self._stub.CreateDatabaseV2(request._getGRPC()) + return dataconverter.convertResponse(resp) + + def databaseListV2(self) -> datatypesv2.DatabaseListResponseV2: + req = datatypesv2.DatabaseListRequestV2() + resp = self._stub.DatabaseListV2(req._getGRPC()) + return dataconverter.convertResponse(resp) + + def loadDatabase(self, database: str) -> datatypesv2.LoadDatabaseResponse: + req = datatypesv2.LoadDatabaseRequest(database) + resp = self._stub.LoadDatabase(req._getGRPC()) + return dataconverter.convertResponse(resp) + + def unloadDatabase(self, database: str) -> datatypesv2.UnloadDatabaseResponse: + req = datatypesv2.UnloadDatabaseRequest(database) + resp = self._stub.UnloadDatabase(req._getGRPC()) + return dataconverter.convertResponse(resp) + + def deleteDatabase(self, database: str) -> datatypesv2.DeleteDatabaseResponse: + req = datatypesv2.DeleteDatabaseResponse(database) + resp = self._stub.DeleteDatabase(req._getGRPC()) + return dataconverter.convertResponse(resp) + + def updateDatabaseV2(self, database: str, settings: datatypesv2.DatabaseNullableSettings) -> datatypesv2.UpdateDatabaseResponse: + request = datatypesv2.UpdateDatabaseRequest(database, settings) + resp = self._stub.UpdateDatabaseV2(request._getGRPC()) + return dataconverter.convertResponse(resp) + def useDatabase(self, dbName: bytes): """Switches database @@ -376,25 +410,28 @@ def useDatabase(self, dbName: bytes): self._rs.init(dbName, self._stub) return resp - # Not implemented: updateDatabase - # Not implemented: updateDatabaseV2 # Not implemented: getDatabaseSettings - # Not implemented: getDatabaseSettingsV2 + + def getDatabaseSettingsV2(self) -> datatypesv2.DatabaseSettingsResponse: + req = datatypesv2.DatabaseSettingsRequest() + resp = self._stub.GetDatabaseSettingsV2(req._getGRPC()) + return dataconverter.convertResponse(resp) def setActiveUser(self, active: bool, username: str) -> bool: req = datatypesv2.SetActiveUserRequest(active, username) - resp = self._stub.SetActiveUser(req.getGRPC()) - if(resp == google_dot_protobuf_dot_empty__pb2.Empty()): - return True - return False - + resp = self._stub.SetActiveUser(req._getGRPC()) + return resp == google_dot_protobuf_dot_empty__pb2.Empty() - # Not implemented: flushIndex + def flushIndex(self, cleanupPercentage: float, synced: bool) -> datatypesv2.FlushIndexResponse: + req = datatypesv2.FlushIndexRequest(cleanupPercentage, synced) + resp = self._stub.FlushIndex(req._getGRPC()) + return dataconverter.convertResponse(resp) def compactIndex(self): """Starts index compaction """ - self._stub.CompactIndex(google_dot_protobuf_dot_empty__pb2.Empty()) + resp = self._stub.CompactIndex(google_dot_protobuf_dot_empty__pb2.Empty()) + return resp == google_dot_protobuf_dot_empty__pb2.Empty() def health(self): """Retrieves health response of immudb @@ -504,19 +541,22 @@ def verifiedTxById(self, tx: int): return verifiedtxbyid.call(self._stub, self._rs, tx, self._vk) # Not implemented: txByIDWithSpec - defaultEntriesSpec = datatypesv2.EntriesSpec( - kvEntriesSpec=datatypesv2.EntryTypeSpec(action = datatypesv2.EntryTypeAction.EXCLUDE), - zEntriesSpec=datatypesv2.EntryTypeSpec(action = datatypesv2.EntryTypeAction.ONLY_DIGEST), - sqlEntriesSpec=datatypesv2.EntryTypeSpec(action = datatypesv2.EntryTypeAction.ONLY_DIGEST) - ) - def txScan(self, initialTx: int, limit: int = 1000, desc: bool = False, entriesSpec: datatypesv2.EntriesSpec = defaultEntriesSpec, sinceTx: int = 0, noWait: bool = False) -> datatypesv2.TxList: + def txScan(self, initialTx: int, limit: int = 999, desc: bool = False, entriesSpec: datatypesv2.EntriesSpec = None, sinceTx: int = 0, noWait: bool = False) -> datatypesv2.TxList: req = datatypesv2.TxScanRequest(initialTx, limit, desc, entriesSpec, sinceTx, noWait) - resp = self._stub.TxScan(req.getGRPC()) + print(req._getGRPC()) + resp = self._stub.TxScan(req._getGRPC()) return dataconverter.convertResponse(resp) - # Not implemented: count - # Not implemented: countAll + def serverInfo(self) -> datatypesv2.ServerInfoResponse: + req = datatypesv2.ServerInfoRequest() + resp = self._stub.ServerInfo(req._getGRPC()) + return dataconverter.convertResponse(resp) + + def databaseHealth(self) -> datatypesv2.DatabaseHealthResponse: + req = google_dot_protobuf_dot_empty__pb2.Empty() + resp = self._stub.DatabaseHealth(req) + return dataconverter.convertResponse(resp) def setAll(self, kv: dict): return batchSet.call(self._stub, self._rs, kv) @@ -544,6 +584,26 @@ def verifiedSetReference(self, referredkey: bytes, newkey: bytes): # Not implemented: stream[.*] + def streamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> Generator[Union[KeyHeader, ValueChunk], None, None]: + 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 streamGetFull(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> FullKeyValue: + 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() + key = next(chunks).key + for it in chunks: + value += it.chunk + return FullKeyValue(key, value) + + # Not implemented: exportTx # Not implemented: replicateTx diff --git a/immudb/dataconverter.py b/immudb/dataconverter.py index 63984a0..8e73daf 100644 --- a/immudb/dataconverter.py +++ b/immudb/dataconverter.py @@ -8,7 +8,11 @@ def convertRequest(fromDataClass: datatypesv2.GRPCTransformable): def convertResponse(fromResponse): - + 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() diff --git a/immudb/datatypesv2.py b/immudb/datatypesv2.py index 8039b49..97a4173 100644 --- a/immudb/datatypesv2.py +++ b/immudb/datatypesv2.py @@ -17,7 +17,7 @@ import immudb.grpc.schema_pb2 as schema class GRPCTransformable: - def getGRPC(self): + def _getGRPC(self): transformed = self._transformDict(self.__dict__) schemaFrom = schema.__dict__.get(self.__class__.__name__, None) if(schemaFrom): @@ -33,11 +33,11 @@ def _transformDict(self, dictToTransform: Dict[str, Any]): for key in dictToTransform: currentValue = dictToTransform[key] if(isinstance(currentValue, GRPCTransformable)): - dictToTransform[key] = currentValue.getGRPC() + 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() + currentValue[index] = currentValue[index]._getGRPC() elif(isinstance(currentValue, Enum)): dictToTransform[key] = currentValue.value return dictToTransform @@ -47,70 +47,70 @@ def _transformDict(self, dictToTransform: Dict[str, Any]): @dataclass class Key(GRPCTransformable): - key: bytes + key: bytes = None @dataclass class Permission(GRPCTransformable): - database: str - permission: int + database: str = None + permission: int = None @dataclass class User(GRPCTransformable): - user: bytes - permissions: List[Permission] - createdby: str - createdat: str - active: bool + user: bytes = None + permissions: List[Permission] = None + createdby: str = None + createdat: str = None + active: bool = None @dataclass class UserList(GRPCTransformable): - users: List[User] + users: List[User] = None @dataclass class CreateUserRequest(GRPCTransformable): - user: bytes - password: bytes - permission: int - database: str + user: bytes = None + password: bytes = None + permission: int = None + database: str = None @dataclass class UserRequest(GRPCTransformable): - user: bytes + user: bytes = None @dataclass class ChangePasswordRequest(GRPCTransformable): - user: bytes - oldPassword: bytes - newPassword: bytes + user: bytes = None + oldPassword: bytes = None + newPassword: bytes = None @dataclass class LoginRequest(GRPCTransformable): - user: bytes - password: bytes + user: bytes = None + password: bytes = None @dataclass class LoginResponse(GRPCTransformable): - token: str - warning: bytes + token: str = None + warning: bytes = None @dataclass class AuthConfig(GRPCTransformable): - kind: int + kind: int = None @dataclass class MTLSConfig(GRPCTransformable): - enabled: bool + enabled: bool = None @dataclass class OpenSessionRequest(GRPCTransformable): - username: bytes - password: bytes - databaseName: str + username: bytes = None + password: bytes = None + databaseName: str = None @dataclass class OpenSessionResponse(GRPCTransformable): - sessionID: str - serverUUID: str + sessionID: str = None + serverUUID: str = None # ONE OF @dataclass @@ -121,39 +121,39 @@ class Precondition(GRPCTransformable): @dataclass class KeyMustExistPrecondition(GRPCTransformable): - key: bytes + key: bytes = None @dataclass class KeyMustNotExistPrecondition(GRPCTransformable): - key: bytes + key: bytes = None class KeyNotModifiedAfterTXPrecondition(GRPCTransformable): - key: bytes - txID: int + key: bytes = None + txID: int = None @dataclass class KeyValue(GRPCTransformable): - key: bytes - value: bytes - metadata: KVMetadata + key: bytes = None + value: bytes = None + metadata: KVMetadata = None @dataclass class Entry(GRPCTransformable): - tx: int - key: bytes - value: bytes - referencedBy: Reference - metadata: KVMetadata - expired: bool - revision: int + 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 - key: bytes - atTx: int - metadata: KVMetadata - revision: int + tx: int = None + key: bytes = None + atTx: int = None + metadata: KVMetadata = None + revision: int = None # ONE OF @dataclass @@ -164,51 +164,51 @@ class Op(GRPCTransformable): @dataclass class ExecAllRequest(GRPCTransformable): - Operations: List[Op] - noWait: bool - preconditions: List[Precondition] + Operations: List[Op] = None + noWait: bool = None + preconditions: List[Precondition] = None @dataclass class Entries(GRPCTransformable): - entries: List[Entry] + entries: List[Entry] = None @dataclass class ZEntry(GRPCTransformable): - set: bytes - key: bytes - entry: Entry - score: float - atTx: int + set: bytes = None + key: bytes = None + entry: Entry = None + score: float = None + atTx: int = None @dataclass class ZEntries(GRPCTransformable): - entries: ZEntry + entries: ZEntry = None @dataclass class ScanRequest(GRPCTransformable): - seekKey: bytes - endKey: bytes - prefix: bytes - desc: bool - limit: int - sinceTx: int - noWait: bool - inclusiveSeek: bool - inclusiveEnd: bool - offset: int + seekKey: bytesv + 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 + prefix: bytes = None @dataclass class EntryCount(GRPCTransformable): - count: int + count: int = None @dataclass class Signature(GRPCTransformable): - publicKey: bytes - signature: bytes + publicKey: bytes = None + signature: bytes = None @dataclass class TxHeader(GRPCTransformable): @@ -229,14 +229,14 @@ class TxMetadata(GRPCTransformable): @dataclass class LinearProof(GRPCTransformable): - sourceTxId: int - TargetTxId: int - terms: List[bytes] + sourceTxId: int = None + TargetTxId: int = None + terms: List[bytes] = None @dataclass class DualProof(GRPCTransformable): - sourceTxHeader: TxHeader - targetTxHeader: TxHeader + sourceTxHeader: TxHeader = None + targetTxHeader: TxHeader = None inclusionProof: List[bytes] = None consistencyProof: List[bytes] = None targetBlTxAlh: bytes = None @@ -245,34 +245,34 @@ class DualProof(GRPCTransformable): @dataclass class Tx(GRPCTransformable): - header: TxHeader + header: TxHeader = None entries: List[TxEntry] = None kvEntries: List[Entry] = None zEntries: List[ZEntry] = None @dataclass class TxEntry(GRPCTransformable): - key: bytes - hValue: bytes - vLen: int - metadata: KVMetadata - value: bytes + key: bytes = None + hValue: bytes = None + vLen: int = None + metadata: KVMetadata = None + value: bytes = None @dataclass class KVMetadata(GRPCTransformable): - deleted: bool - expiration: Expiration - nonIndexable: bool + deleted: bool = None + expiration: Expiration = None + nonIndexable: bool = None @dataclass class Expiration(GRPCTransformable): - expiresAt: int + expiresAt: int = None @dataclass class VerifiableTx(GRPCTransformable): - tx: Tx - dualProof: DualProof - signature: Signature + tx: Tx = None + dualProof: DualProof = None + signature: Signature = None @dataclass class VerifiableEntry(GRPCTransformable): @@ -282,44 +282,44 @@ class VerifiableEntry(GRPCTransformable): @dataclass class InclusionProof(GRPCTransformable): - leaf: int - width: int - terms: List[bytes] + leaf: int = None + width: int = None + terms: List[bytes] = None @dataclass class SetRequest(GRPCTransformable): - KVs: List[KeyValue] - noWait: bool - preconditions: List[Precondition] + KVs: List[KeyValue] = None + noWait: bool = None + preconditions: List[Precondition] = None @dataclass class KeyRequest(GRPCTransformable): - key: bytes - atTx: int - sinceTx: int - noWait: bool - atRevision: int + key: bytes = None + atTx: int = None + sinceTx: int = None + noWait: bool = None + atRevision: int = None @dataclass class KeyListRequest(GRPCTransformable): - keys: List[bytes] - sinceTx: int + keys: List[bytes] = None + sinceTx: int = None @dataclass class DeleteKeysRequest(GRPCTransformable): - keys: List[bytes] - sinceTx: int - noWait: bool + keys: List[bytes] = None + sinceTx: int = None + noWait: bool = None @dataclass class VerifiableSetRequest(GRPCTransformable): - setRequest: SetRequest - proveSinceTx: int + setRequest: SetRequest = None + proveSinceTx: int = None @dataclass class VerifiableGetRequest(GRPCTransformable): - keyRequest: KeyRequest - proveSinceTx: int + keyRequest: KeyRequest = None + proveSinceTx: int = None @dataclass class ServerInfoRequest(GRPCTransformable): @@ -327,88 +327,88 @@ class ServerInfoRequest(GRPCTransformable): @dataclass class ServerInfoResponse(GRPCTransformable): - version: str + version: str = None @dataclass class HealthResponse(GRPCTransformable): - status: bool - version: str + status: bool = None + version: str = None @dataclass class DatabaseHealthResponse(GRPCTransformable): - pendingRequests: int - lastRequestCompletedAt: int + pendingRequests: int = None + lastRequestCompletedAt: int = None @dataclass class ImmutableState(GRPCTransformable): - db: str - txId: int - txHash: bytes - signature: Signature + db: str = None + txId: int = None + txHash: bytes = None + signature: Signature = None @dataclass class ReferenceRequest(GRPCTransformable): - key: bytes - referencedKey: bytes - atTx: int - boundRef: bool - noWait: bool - preconditions: List[Precondition] + 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 - proveSinceTx: int + referenceRequest: ReferenceRequest = None + proveSinceTx: int = None @dataclass class ZAddRequest(GRPCTransformable): - set: bytes - score: float - key: bytes - atTx: int - boundRef: bool - noWait: bool + set: bytes = None + score: float = None + key: bytes = None + atTx: int = None + boundRef: bool = None + noWait: bool = None @dataclass class Score(GRPCTransformable): - score: float + score: float = None @dataclass class ZScanRequest(GRPCTransformable): - set: bytes - seekKey: bytes - seekScore: float - seekAtTx: int - inclusiveSeek: bool - limit: int - desc: bool - minScore: Score - maxScore: Score - sinceTx: int - noWait: bool - offset: int + 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 - offset: int - limit: int - desc: bool - sinceTx: int + key: bytes = None + offset: int = None + limit: int = None + desc: bool = None + sinceTx: int = None @dataclass class VerifiableZAddRequest(GRPCTransformable): - zAddRequest: ZAddRequest - proveSinceTx: int + zAddRequest: ZAddRequest = None + proveSinceTx: int = None @dataclass class TxRequest(GRPCTransformable): - tx: int - entriesSpec: EntriesSpec - sinceTx: int - noWait: bool - keepReferencesUnresolved: bool + tx: int = None + entriesSpec: EntriesSpec = None + sinceTx: int = None + noWait: bool = None + keepReferencesUnresolved: bool = None @dataclass class EntriesSpec(GRPCTransformable): @@ -419,7 +419,7 @@ class EntriesSpec(GRPCTransformable): @dataclass class EntryTypeSpec(GRPCTransformable): - action: EntryTypeAction + action: EntryTypeAction = None class EntryTypeAction(Enum): EXCLUDE = 0 @@ -429,12 +429,12 @@ class EntryTypeAction(Enum): @dataclass class VerifiableTxRequest(GRPCTransformable): - tx: int - proveSinceTx: int - entriesSpec: EntriesSpec - sinceTx: int - noWait: bool - keepReferencesUnresolved: bool + tx: int = None + proveSinceTx: int = None + entriesSpec: EntriesSpec = None + sinceTx: int = None + noWait: bool = None + keepReferencesUnresolved: bool = None @dataclass class TxScanRequest(GRPCTransformable): @@ -447,53 +447,53 @@ class TxScanRequest(GRPCTransformable): @dataclass class TxList(GRPCTransformable): - txs: List[Tx] + txs: List[Tx] = None @dataclass class ExportTxRequest(GRPCTransformable): - tx: int + tx: int = None @dataclass class Database(GRPCTransformable): - databaseName: str + databaseName: str = None @dataclass class DatabaseSettings(GRPCTransformable): - databaseName: str - replica: bool - masterDatabase: str - masterAddress: str - masterPort: int - followerUsername: str - followerPassword: str - fileSize: int - maxKeyLen: int - maxValueLen: int - maxTxEntries: int - excludeCommitTime: bool + 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 - settings: DatabaseNullableSettings - ifNotExists: bool + name: str = None + settings: DatabaseNullableSettings = None + ifNotExists: bool = None @dataclass class CreateDatabaseResponse(GRPCTransformable): - name: str - settings: DatabaseNullableSettings - alreadyExisted: bool + name: str = None + settings: DatabaseNullableSettings = None + alreadyExisted: bool = None @dataclass class UpdateDatabaseRequest(GRPCTransformable): - database: str - settings: DatabaseNullableSettings + database: str = None + settings: DatabaseNullableSettings = None @dataclass class UpdateDatabaseResponse(GRPCTransformable): - database: str - settings: DatabaseNullableSettings + database: str = None + settings: DatabaseNullableSettings = None @dataclass @@ -502,141 +502,159 @@ class DatabaseSettingsRequest(GRPCTransformable): @dataclass class DatabaseSettingsResponse(GRPCTransformable): - database: str - settings: DatabaseNullableSettings + database: str = None + settings: DatabaseNullableSettings = None @dataclass class NullableUint32(GRPCTransformable): - value: int + value: int = None + + def _getGRPC(self): + return schema.NullableUint32(value = self.value) @dataclass class NullableUint64(GRPCTransformable): - value: int + value: int = None + + def _getGRPC(self): + return schema.NullableUint64(value = self.value) @dataclass class NullableFloat(GRPCTransformable): - value: float + value: float = None + + def _getGRPC(self): + return schema.NullableFloat(value = self.value) @dataclass class NullableBool(GRPCTransformable): - value: bool + value: bool = None + + def _getGRPC(self): + return schema.NullableBool(value = self.value) @dataclass class NullableString(GRPCTransformable): - value: str + value: str = None + + def _getGRPC(self): + return schema.NullableString(value = self.value) @dataclass class NullableMilliseconds(GRPCTransformable): - value: int + value: int = None + + def _getGRPC(self): + return schema.NullableMilliseconds(value = self.value) @dataclass class DatabaseNullableSettings(GRPCTransformable): - replicationSettings: ReplicationNullableSettings - fileSize: NullableUint32 - maxKeyLen: NullableUint32 - maxValueLen: NullableUint32 - maxTxEntries: NullableUint32 - excludeCommitTime: NullableBool - maxConcurrency: NullableUint32 - maxIOConcurrency: NullableUint32 - txLogCacheSize: NullableUint32 - vLogMaxOpenedFiles: NullableUint32 - txLogMaxOpenedFiles: NullableUint32 - commitLogMaxOpenedFiles: NullableUint32 - indexSettings: IndexNullableSettings - writeTxHeaderVersion: NullableUint32 - autoload: NullableBool - readTxPoolSize: NullableUint32 - syncFrequency: NullableMilliseconds - writeBufferSize: NullableUint32 - ahtSettings: AHTNullableSettings + 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 @dataclass class ReplicationNullableSettings(GRPCTransformable): - replica: NullableBool - masterDatabase: NullableString - masterAddress: NullableString - masterPort: NullableUint32 - followerUsername: NullableString - followerPassword: NullableString + replica: NullableBool = None + masterDatabase: NullableString = None + masterAddress: NullableString = None + masterPort: NullableUint32 = None + followerUsername: NullableString = None + followerPassword: NullableString = None @dataclass class IndexNullableSettings(GRPCTransformable): - flushThreshold: NullableUint32 - syncThreshold: NullableUint32 - cacheSize: NullableUint32 - maxNodeSize: NullableUint32 - maxActiveSnapshots: NullableUint32 - renewSnapRootAfter: NullableUint64 - compactionThld: NullableUint32 - delayDuringCompaction: NullableUint32 - nodesLogMaxOpenedFiles: NullableUint32 - historyLogMaxOpenedFiles: NullableUint32 - commitLogMaxOpenedFiles: NullableUint32 - flushBufferSize: NullableUint32 - cleanupPercentage: NullableFloat + 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 @dataclass class AHTNullableSettings(GRPCTransformable): - syncThreshold: NullableUint32 - writeBufferSize: NullableUint32 + syncThreshold: NullableUint32 = None + writeBufferSize: NullableUint32 = None @dataclass class LoadDatabaseRequest(GRPCTransformable): - database: str + database: str = None @dataclass class LoadDatabaseResponse(GRPCTransformable): - database: str + database: str = None @dataclass class UnloadDatabaseRequest(GRPCTransformable): - database: str + database: str = None @dataclass class UnloadDatabaseResponse(GRPCTransformable): - database: str + database: str = None @dataclass class DeleteDatabaseRequest(GRPCTransformable): - database: str + database: str = None @dataclass class DeleteDatabaseResponse(GRPCTransformable): - database: str + database: str = None @dataclass class FlushIndexRequest(GRPCTransformable): - cleanupPercentage: float - synced: bool + cleanupPercentage: float = None + synced: bool = None @dataclass class FlushIndexResponse(GRPCTransformable): - database: str + database: str = None @dataclass class Table(GRPCTransformable): - tableName: str + tableName: str = None @dataclass class SQLGetRequest(GRPCTransformable): - table: str - pkValues: List[SQLValue] - atTx: int - sinceTx: int + table: str = None + pkValues: List[SQLValue] = None + atTx: int = None + sinceTx: int = None @dataclass class VerifiableSQLGetRequest(GRPCTransformable): - sqlGetRequest: SQLGetRequest - proveSinceTx: int + sqlGetRequest: SQLGetRequest = None + proveSinceTx: int = None @dataclass class SQLEntry(GRPCTransformable): - tx: int - key: bytes - value: bytes - metadata: KVMetadata + tx: int = None + key: bytes = None + value: bytes = None + metadata: KVMetadata = None @dataclass class VerifiableSQLEntry(GRPCTransformable): @@ -653,7 +671,7 @@ class VerifiableSQLEntry(GRPCTransformable): @dataclass class UseDatabaseReply(GRPCTransformable): - token: str + token: str = None class PermissionAction(Enum): GRANT = 0 @@ -661,19 +679,19 @@ class PermissionAction(Enum): @dataclass class ChangePermissionRequest(GRPCTransformable): - action: PermissionAction - username: str - database: str - permission: int + action: PermissionAction = None + username: str = None + database: str = None + permission: int = None @dataclass class SetActiveUserRequest(GRPCTransformable): - active: bool - username: str + active: bool = None + username: str = None @dataclass class DatabaseListResponse(GRPCTransformable): - databases: List[Database] + databases: List[Database] = None @dataclass class DatabaseListRequestV2(GRPCTransformable): @@ -681,67 +699,67 @@ class DatabaseListRequestV2(GRPCTransformable): @dataclass class DatabaseListResponseV2(GRPCTransformable): - databases: List[DatabaseWithSettings] + databases: List[DatabaseWithSettings] = None @dataclass class DatabaseWithSettings(GRPCTransformable): - name: str - setting: DatabaseNullableSettings - loaded: bool + name: str = None + settings: DatabaseNullableSettings = None + loaded: bool = None @dataclass class Chunk(GRPCTransformable): - content: bytes + content: bytes = None @dataclass class UseSnapshotRequest(GRPCTransformable): - sinceTx: int - asBeforeTx: int + sinceTx: int = None + asBeforeTx: int = None @dataclass class SQLExecRequest(GRPCTransformable): - sql: str - params: List[NamedParam] - noWait: bool + sql: str = None + params: List[NamedParam] = None + noWait: bool = None @dataclass class SQLQueryRequest(GRPCTransformable): - sql: str - params: List[NamedParam] - reuseSnapshot: int + sql: str = None + params: List[NamedParam] = None + reuseSnapshot: int = None @dataclass class NamedParam(GRPCTransformable): - name: str - value: SQLValue + name: str = None + value: SQLValue = None @dataclass class SQLExecResult(GRPCTransformable): - txs: List[CommittedSQLTx] - ongoingTx: bool + txs: List[CommittedSQLTx] = None + ongoingTx: bool = None @dataclass class CommittedSQLTx(GRPCTransformable): - header: TxHeader - updatedRows: int - lastInsertedPKs: Dict[str, SQLValue] - firstInsertedPKs: Dict[str, SQLValue] + header: TxHeader = None + updatedRows: int = None + lastInsertedPKs: Dict[str, SQLValue] = None + firstInsertedPKs: Dict[str, SQLValue] = None @dataclass class SQLQueryResult(GRPCTransformable): - columns: List[Column] - rows: List[Row] + columns: List[Column] = None + rows: List[Row] = None @dataclass class Column(GRPCTransformable): - name: str - type: str + name: str = None + type: str = None @dataclass class Row(GRPCTransformable): - columns: List[str] - values: List[SQLValue] + columns: List[str] = None + values: List[SQLValue] = None # ONE OF @dataclass @@ -761,22 +779,22 @@ class TxMode(Enum): @dataclass class NewTxRequest(GRPCTransformable): - mode: TxMode + mode: TxMode = None @dataclass class NewTxResponse(GRPCTransformable): - transactionID : str + transactionID : str = None @dataclass class ErrorInfo(GRPCTransformable): - code: str - cause: str + code: str = None + cause: str = None @dataclass class DebugInfo(GRPCTransformable): - stack: str + stack: str = None @dataclass class RetryInfo(GRPCTransformable): - retry_delay: int \ No newline at end of file + retry_delay: int = None \ No newline at end of file diff --git a/immudb/streamsutils.py b/immudb/streamsutils.py new file mode 100644 index 0000000..e7804b8 --- /dev/null +++ b/immudb/streamsutils.py @@ -0,0 +1,53 @@ + +from dataclasses import dataclass + + +@dataclass +class KeyHeader: + key: bytes + length: int + +@dataclass +class ValueChunk: + chunk: bytes + left: int + +@dataclass +class FullKeyValue: + key: bytes + value: bytes + +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 + return self.parseValueHeader(chunk.content) + + def valueReader(self, chunk): + self.left = self.left - len(chunk.content) + return ValueChunk(chunk = chunk.content, left = self.left) + + diff --git a/tests/conftest.py b/tests/conftest.py index 06743e6..a914ffe 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"] @pytest.fixture(scope="module") diff --git a/tests/immu/test_convert_to_grpc.py b/tests/immu/test_convert_to_grpc.py index 22c0f44..c502572 100644 --- a/tests/immu/test_convert_to_grpc.py +++ b/tests/immu/test_convert_to_grpc.py @@ -6,7 +6,7 @@ def test_converting_to_grpc(): key = datatypesv2.Key(key = b"tet") - grpcForm = key.getGRPC() + grpcForm = key._getGRPC() assert type(grpcForm) == Key assert grpcForm.key == b'tet' @@ -17,6 +17,6 @@ def test_converting_to_grpc(): 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 isinstance(ww._getGRPC(), ExecAllRequest) 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..6a752f5 --- /dev/null +++ b/tests/immu/test_create_load_database_v2.py @@ -0,0 +1,116 @@ +from grpc import RpcError +from immudb import ImmudbClient +from immudb.datatypesv2 import CreateDatabaseRequest, DatabaseNullableSettings, NullableUint32, NullableBool +import uuid +import pytest + + +def test_create_database_v2(client: ImmudbClient): + 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') + +def test_update_database_v2(client: ImmudbClient): + 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 = DatabaseNullableSettings( + autoload=NullableBool(value = False) + ) + resp = client.updateDatabaseV2(name, settings) + + resp = client.databaseListV2() + foundDb = False + # Important - GRPC is not sending False, it would send None + for database in resp.databases: + if database.settings.maxKeyLen.value == 32 and database.name == name and not database.settings.autoload.value: + foundDb = True + + assert foundDb == True + + settings = DatabaseNullableSettings( + autoload=NullableBool(value = True) + ) + resp = client.updateDatabaseV2(name, settings) + + resp = client.databaseListV2() + foundDb = False + for database in resp.databases: + if database.settings.maxKeyLen.value == 32 and database.name == name and database.settings.autoload.value: + foundDb = True + + assert foundDb == True + +def test_list_databases_v2(client: ImmudbClient): + name = str(uuid.uuid4()).replace('-', '') + settings = DatabaseNullableSettings( + maxKeyLen=NullableUint32(32) + ) + client.createDatabaseV2(name, settings, True) + resp = client.databaseListV2() + foundDb = False + for database in resp.databases: + if database.settings.maxKeyLen.value == 32 and database.name == name: + foundDb = True + + assert foundDb == True + +def test_load_unload_database(client: ImmudbClient): + name = str(uuid.uuid4()).replace('-', '') + settings = DatabaseNullableSettings( + maxKeyLen=NullableUint32(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(client: ImmudbClient): + name = str(uuid.uuid4()).replace('-', '') + settings = DatabaseNullableSettings( + maxKeyLen=NullableUint32(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(client: ImmudbClient): + name = str(uuid.uuid4()).replace('-', '') + settings = DatabaseNullableSettings( + maxKeyLen=NullableUint32(32) + ) + client.createDatabaseV2(name, settings, True) + client.useDatabase(name) + settings = client.getDatabaseSettingsV2() + assert settings.database == name + assert settings.settings.maxKeyLen.value == 32 + diff --git a/tests/immu/test_database_health.py b/tests/immu/test_database_health.py new file mode 100644 index 0000000..5a7a58e --- /dev/null +++ b/tests/immu/test_database_health.py @@ -0,0 +1,10 @@ +from immudb import ImmudbClient +import datetime +def test_database_health(client: ImmudbClient): + timeNow = datetime.datetime.now() + client.login("immudb", "immudb", "defaultdb") # login into database is counted as request completed + 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_flush_index.py b/tests/immu/test_flush_index.py new file mode 100644 index 0000000..c051117 --- /dev/null +++ b/tests/immu/test_flush_index.py @@ -0,0 +1,12 @@ +from grpc import RpcError +from immudb import ImmudbClient +import pytest + +def test_flush_index(client: ImmudbClient): + 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_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..cac13a3 --- /dev/null +++ b/tests/immu/test_server_info.py @@ -0,0 +1,7 @@ +from immudb import ImmudbClient +from immudb.datatypesv2 import EntriesSpec, EntryTypeAction, EntryTypeSpec +def test_server_info(client: ImmudbClient): + response1 = client.serverInfo() + assert response1.version != "" + + assert len(response1.version) > 0 \ No newline at end of file diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py new file mode 100644 index 0000000..720f075 --- /dev/null +++ b/tests/immu/test_stream.py @@ -0,0 +1,31 @@ +from grpc import RpcError +from immudb import ImmudbClient +import pytest +from immudb.streamsutils import KeyHeader + +def test_stream_get(client: ImmudbClient): + key = ('a' * 512).encode('utf-8') + client.set(key, (('xa' * 11000) + ('ba' * 1100000)).encode("utf-8")) + stream = client.streamGet(key) + first = True + fullValue = b'' + for content in stream: + if first: + first = False + assert type(content) == KeyHeader + assert content.key == key + assert content.length == 512 + continue + + 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_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") + \ No newline at end of file diff --git a/tests/immu/test_tx_scan.py b/tests/immu/test_tx_scan.py index 2d39dd9..a370d32 100644 --- a/tests/immu/test_tx_scan.py +++ b/tests/immu/test_tx_scan.py @@ -12,4 +12,22 @@ def test_tx_scan(client: ImmudbClient): assert len(result.txs) == 2 txId = response1.id result = client.txScan(txId, 3) - assert len(result.txs) == 3 \ No newline at end of file + 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 From 6bf405d541d9bade5e907315a81a1648ada57d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Wed, 7 Sep 2022 19:37:50 +0200 Subject: [PATCH 05/38] stream set --- immudb/client.py | 22 +++++----------------- immudb/streamsutils.py | 12 ++++++++++++ tests/immu/test_stream.py | 25 +++++++++++++++++++++++-- 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index 3b7634e..199e0d7 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -48,6 +48,7 @@ def __init__(self, immudUrl=None, rs: RootService = None, publicKeyFile: str = N rs (RootService, optional): object that implements RootService - to be allow to verify requests. Defaults to None. publicKeyFile (str, optional): path to the public key that would be used to authenticate requests with. Defaults to None. timeout (int, optional): global timeout for GRPC requests, if None - it would hang until server respond. Defaults to None. + max_grpc_message_length (int, optional): max size for message from the server. If None - it would set defaults (4mb). """ if immudUrl is None: immudUrl = "localhost:3322" @@ -55,7 +56,6 @@ def __init__(self, immudUrl=None, rs: RootService = None, publicKeyFile: str = N options = [] if max_grpc_message_length: options = [('grpc.max_receive_message_length', max_grpc_message_length)] - print(options) self.channel = grpc.insecure_channel(immudUrl, options = options) else: self.channel = grpc.insecure_channel(immudUrl) @@ -335,15 +335,6 @@ def changePermission(self, action, user, database, permission): """ return changePermission.call(self._stub, self._rs, action, user, database, permission) - # Not implemented: updateAuthConfig - # Not implemented: updateMTLSConfig - - # Not implemented: with[.*] - - # Not implemented: getServiceClient - # Not implemented: getOptions - # Not implemented: setupDialOptions - def databaseList(self): """Returns database list @@ -353,8 +344,6 @@ def databaseList(self): dbs = databaseList.call(self._stub, self._rs, None) return [x.databaseName for x in dbs.dblist.databases] - # Not implemented: databaseListV2 - def createDatabase(self, dbName: bytes): """Creates database @@ -395,7 +384,6 @@ def updateDatabaseV2(self, database: str, settings: datatypesv2.DatabaseNullable resp = self._stub.UpdateDatabaseV2(request._getGRPC()) return dataconverter.convertResponse(resp) - def useDatabase(self, dbName: bytes): """Switches database @@ -410,7 +398,6 @@ def useDatabase(self, dbName: bytes): self._rs.init(dbName, self._stub) return resp - # Not implemented: getDatabaseSettings def getDatabaseSettingsV2(self) -> datatypesv2.DatabaseSettingsResponse: req = datatypesv2.DatabaseSettingsRequest() @@ -521,9 +508,6 @@ def zAdd(self, zset: bytes, score: float, key: bytes, atTx: int = 0): 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) - # Not implemented: zAddAt - # Not implemented: verifiedZAddAt - 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) @@ -603,6 +587,10 @@ def streamGetFull(self, key: bytes, atTx: int = None, sinceTx: int = None, noWai value += it.chunk return FullKeyValue(key, value) + def streamSet(self, generator) -> datatypesv2.TxHeader: + resp = self._stub.streamSet(generator) + return dataconverter.convertResponse(resp) + # Not implemented: exportTx # Not implemented: replicateTx diff --git a/immudb/streamsutils.py b/immudb/streamsutils.py index e7804b8..05593b6 100644 --- a/immudb/streamsutils.py +++ b/immudb/streamsutils.py @@ -7,6 +7,17 @@ class KeyHeader: key: bytes length: int + def getInBytes(self): + return self.length.to_bytes(8, 'big') + self.key + + +@dataclass +class ValueChunkHeader: + chunk: bytes + length: int + def getInBytes(self): + return self.length.to_bytes(8, 'big') + self.chunk + @dataclass class ValueChunk: chunk: bytes @@ -17,6 +28,7 @@ class FullKeyValue: key: bytes value: bytes + class StreamReader: def __init__(self, stream): self.streamToRead = stream diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index 720f075..efb9b62 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -1,7 +1,9 @@ +from io import BytesIO from grpc import RpcError from immudb import ImmudbClient import pytest -from immudb.streamsutils import KeyHeader +from immudb.grpc.schema_pb2 import Chunk +from immudb.streamsutils import KeyHeader, ValueChunkHeader def test_stream_get(client: ImmudbClient): key = ('a' * 512).encode('utf-8') @@ -28,4 +30,23 @@ def test_stream_get_full(client: ImmudbClient): kv = client.streamGetFull(key) assert len(kv.value) == 1100000 * 2 + 11000 * 2 assert kv.value == (('xa' * 11000) + ('ba' * 1100000)).encode("utf-8") - \ No newline at end of file + +def fake_stream(): + ref = BytesIO(('test'*10240).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.streamSet(fake_stream()) + assert resp.id > 0 + assert resp.ts > 0 + + assert client.get(b'test').value == ('test'*10240).encode("utf-8") From 044450f49ede9cf4e5d22288d85a1bb759ddb8db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Thu, 8 Sep 2022 09:24:49 +0200 Subject: [PATCH 06/38] StreamSet from buffer --- immudb/client.py | 16 +++++++++++++++- tests/immu/test_stream.py | 10 ++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/immudb/client.py b/immudb/client.py index 199e0d7..ad1e8fe 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -35,7 +35,7 @@ import datetime -from immudb.streamsutils import FullKeyValue, KeyHeader, StreamReader, ValueChunk +from immudb.streamsutils import FullKeyValue, KeyHeader, StreamReader, ValueChunk, ValueChunkHeader class ImmudbClient: @@ -591,6 +591,20 @@ def streamSet(self, generator) -> datatypesv2.TxHeader: resp = self._stub.streamSet(generator) return dataconverter.convertResponse(resp) + def _make_set_stream(self, buffer, key: bytes, length: int, chunkSize: int = 1024): + 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 streamSetFromBuffer(self, buffer, key: bytes, valueLength: int, chunkSize: int = 1024) -> datatypesv2.TxHeader: + resp = self._stub.streamSet(self._make_set_stream(buffer, key, valueLength, chunkSize)) + return dataconverter.convertResponse(resp) + # Not implemented: exportTx # Not implemented: replicateTx diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index efb9b62..62ffc8a 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -5,6 +5,8 @@ from immudb.grpc.schema_pb2 import Chunk from immudb.streamsutils import KeyHeader, ValueChunkHeader +import tempfile + def test_stream_get(client: ImmudbClient): key = ('a' * 512).encode('utf-8') client.set(key, (('xa' * 11000) + ('ba' * 1100000)).encode("utf-8")) @@ -50,3 +52,11 @@ def test_stream_set(client: ImmudbClient): assert resp.ts > 0 assert client.get(b'test').value == ('test'*10240).encode("utf-8") + +def test_stream_set_from_buffer(client: ImmudbClient): + ref = BytesIO(('test'*10240).encode("utf-8")) + resp = client.streamSetFromBuffer(ref, b'test123123', 10240 * 4) + assert resp.id > 0 + assert resp.ts > 0 + + assert client.get(b'test').value == ('test'*10240).encode("utf-8") From 6fd07485d3a4246bbe2c56a1695390cb7818314e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Fri, 9 Sep 2022 16:26:55 +0200 Subject: [PATCH 07/38] Streams as file-like objects --- tests/immu/test_stream.py | 415 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 394 insertions(+), 21 deletions(-) diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index 62ffc8a..9bbbd26 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -1,40 +1,420 @@ from io import BytesIO +import uuid from grpc import RpcError -from immudb import ImmudbClient +from immudb import ImmudbClient, 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(client: ImmudbClient): +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.streamGet(key) + 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: - if first: - first = False - assert type(content) == KeyHeader - assert content.key == key - assert content.length == 512 - continue - 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")) + key, buffer = client.streamGet(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) + key, buffer = client.streamGet(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) + key, buffer = client.streamGet(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 == 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 == 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 == 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 == 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, 11, 1312313), + (2, None, 99), + (13333333, 1024, 99), + (11, 1231, 8), + (3331, 1024, 99), + (1111, 1024, 99), + +] + +@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") -def fake_stream(): - ref = BytesIO(('test'*10240).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) @@ -47,16 +427,9 @@ def fake_stream(): def test_stream_set(client: ImmudbClient): - resp = client.streamSet(fake_stream()) + 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_set_from_buffer(client: ImmudbClient): - ref = BytesIO(('test'*10240).encode("utf-8")) - resp = client.streamSetFromBuffer(ref, b'test123123', 10240 * 4) - assert resp.id > 0 - assert resp.ts > 0 - - assert client.get(b'test').value == ('test'*10240).encode("utf-8") From 6e95a930a3beffacc022bcc37fa82cc20e615dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Fri, 9 Sep 2022 16:27:01 +0200 Subject: [PATCH 08/38] Streams as file-like objects --- immudb/client.py | 91 +++++++++++++++++++++++++++++++++++------- immudb/datatypesv2.py | 26 +++++++++++- immudb/streamsutils.py | 57 ++++++++++++++++++++++++-- 3 files changed, 154 insertions(+), 20 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index ad1e8fe..a04602c 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -10,7 +10,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from typing import Generator, List, Union +from io import BytesIO +from typing import Generator, List, Tuple, Union +from arrow import now import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 @@ -35,7 +37,7 @@ import datetime -from immudb.streamsutils import FullKeyValue, KeyHeader, StreamReader, ValueChunk, ValueChunkHeader +from immudb.streamsutils import FullKeyValue, KeyHeader, StreamReader, ValueChunk, ValueChunkHeader, BufferedStreamReader class ImmudbClient: @@ -528,7 +530,6 @@ def verifiedTxById(self, tx: int): def txScan(self, initialTx: int, limit: int = 999, desc: bool = False, entriesSpec: datatypesv2.EntriesSpec = None, sinceTx: int = 0, noWait: bool = False) -> datatypesv2.TxList: req = datatypesv2.TxScanRequest(initialTx, limit, desc, entriesSpec, sinceTx, noWait) - print(req._getGRPC()) resp = self._stub.TxScan(req._getGRPC()) return dataconverter.convertResponse(resp) @@ -566,16 +567,24 @@ def verifiedSetReference(self, referredkey: bytes, newkey: bytes): # Not implemented: dump - # Not implemented: stream[.*] - def streamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> Generator[Union[KeyHeader, ValueChunk], None, None]: + def _rawStreamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> Generator[Union[KeyHeader, ValueChunk], None, None]: 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 streamGetFull(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> FullKeyValue: + def streamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> Tuple[KeyHeader, BufferedStreamReader]: + 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) + valueHeader = next(chunks) + return keyHeader, BufferedStreamReader(chunks, valueHeader, resp) + + def streamGetFull(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> datatypesv2.KeyValue: req = datatypesv2.KeyRequest(key = key, atTx = atTx, sinceTx = sinceTx, noWait = noWait, atRevision = atRevision) resp = self._stub.streamGet(req._getGRPC()) reader = StreamReader(resp) @@ -585,13 +594,22 @@ def streamGetFull(self, key: bytes, atTx: int = None, sinceTx: int = None, noWai key = next(chunks).key for it in chunks: value += it.chunk - return FullKeyValue(key, value) - - def streamSet(self, generator) -> datatypesv2.TxHeader: - resp = self._stub.streamSet(generator) - return dataconverter.convertResponse(resp) - - def _make_set_stream(self, buffer, key: bytes, length: int, chunkSize: int = 1024): + return datatypesv2.KeyValue(key, value) + + # def streamVerifiableGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None, proveSinceTx: int = None): + # 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 = StreamReader(resp) + # for it in resp: + # yield it + + def _make_set_stream(self, buffer, key: bytes, length: int, chunkSize: int = 65536): yield Chunk(content = KeyHeader(key = key, length=len(key)).getInBytes()) firstChunk = buffer.read(chunkSize) firstChunk = ValueChunkHeader(chunk = firstChunk, length = length).getInBytes() @@ -601,10 +619,53 @@ def _make_set_stream(self, buffer, key: bytes, length: int, chunkSize: int = 102 yield Chunk(content = chunk) chunk = buffer.read(chunkSize) - def streamSetFromBuffer(self, buffer, key: bytes, valueLength: int, chunkSize: int = 1024) -> datatypesv2.TxHeader: - resp = self._stub.streamSet(self._make_set_stream(buffer, key, valueLength, chunkSize)) + 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]: + 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, 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]: + 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) + 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[Union[KeyHeader, ValueChunkHeader, ValueChunk], None, None]) -> datatypesv2.TxHeader: + resp = self._stub.streamSet(generator) return dataconverter.convertResponse(resp) + def streamSet(self, key: bytes, buffer, bufferLength: int, chunkSize: int = 65536) -> datatypesv2.TxHeader: + 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: + resp = self._rawStreamSet(self._make_set_stream(BytesIO(value), key, len(value), chunkSize)) + return resp + # Not implemented: exportTx # Not implemented: replicateTx diff --git a/immudb/datatypesv2.py b/immudb/datatypesv2.py index 97a4173..87bc8bb 100644 --- a/immudb/datatypesv2.py +++ b/immudb/datatypesv2.py @@ -12,7 +12,7 @@ from __future__ import annotations from dataclasses import dataclass from enum import Enum, IntEnum -from typing import Any, Dict, List, Optional +from typing import Any, Dict, List, Optional, Union from google.protobuf.struct_pb2 import NullValue import immudb.grpc.schema_pb2 as schema @@ -186,7 +186,7 @@ class ZEntries(GRPCTransformable): @dataclass class ScanRequest(GRPCTransformable): - seekKey: bytesv + seekKey: bytes endKey: bytes = None prefix: bytes = None desc: bool = None @@ -568,6 +568,28 @@ class DatabaseNullableSettings(GRPCTransformable): syncFrequency: NullableMilliseconds = None writeBufferSize: NullableUint32 = None ahtSettings: AHTNullableSettings = None + +# @dataclass +# class DatabaseNullableSettings(GRPCTransformable): +# replicationSettings: ReplicationNullableSettings = None +# fileSize: NullableUint32 = None +# maxKeyLen: NullableUint32 = None +# maxValueLen: NullableUint32 = None +# maxTxEntries: Optional[int] = 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 @dataclass class ReplicationNullableSettings(GRPCTransformable): diff --git a/immudb/streamsutils.py b/immudb/streamsutils.py index 05593b6..ba8942b 100644 --- a/immudb/streamsutils.py +++ b/immudb/streamsutils.py @@ -1,6 +1,6 @@ from dataclasses import dataclass - +import io @dataclass class KeyHeader: @@ -56,10 +56,61 @@ def headerReader(self, chunk): def valueHeaderReader(self, chunk): self.reader = self.valueReader - return self.parseValueHeader(chunk.content) + 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) - return ValueChunk(chunk = chunk.content, left = self.left) + readed = ValueChunk(chunk = chunk.content, left = self.left) + if(self.left == 0): + self.reader = self.headerReader + 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() + From f8cf508d5ae1ceb436bb84fa51e3d24c5c0cf5e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Fri, 9 Sep 2022 16:30:29 +0200 Subject: [PATCH 09/38] Decrease test set size --- tests/immu/test_stream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index 9bbbd26..afc9ef0 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -307,7 +307,7 @@ def test_stream_scan_chunked(client: ImmudbClient): (13, 123123, 999), (3333, 55, 17), (13333, None, 3), - (1231321, 11, 1312313), + (1231321, 11, 10001), (2, None, 99), (13333333, 1024, 99), (11, 1231, 8), From ec7bf30c5ab08621df8c49e46a662f7964b3005f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Fri, 9 Sep 2022 16:31:47 +0200 Subject: [PATCH 10/38] Decrease test set size --- immudb/client.py | 1 - tests/immu/test_stream.py | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index a04602c..ae5380d 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -12,7 +12,6 @@ from io import BytesIO from typing import Generator, List, Tuple, Union -from arrow import now import grpc from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index afc9ef0..d557647 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -307,7 +307,7 @@ def test_stream_scan_chunked(client: ImmudbClient): (13, 123123, 999), (3333, 55, 17), (13333, None, 3), - (1231321, 11, 10001), + (1231321, 11, 999), (2, None, 99), (13333333, 1024, 99), (11, 1231, 8), From ddeb59d3d53da579562f30aefc61f6bfe9add29b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Fri, 9 Sep 2022 16:33:56 +0200 Subject: [PATCH 11/38] Incrased reader size for one test --- tests/immu/test_stream.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index d557647..c9dc35a 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -307,12 +307,13 @@ def test_stream_scan_chunked(client: ImmudbClient): (13, 123123, 999), (3333, 55, 17), (13333, None, 3), - (1231321, 11, 999), + (1231321, 1111, 999), (2, None, 99), (13333333, 1024, 99), (11, 1231, 8), (3331, 1024, 99), (1111, 1024, 99), + (1111, 11, 10), ] From 30e0a9db0108645829949140be2ea204e31c7de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Fri, 9 Sep 2022 16:48:52 +0200 Subject: [PATCH 12/38] Changed definition, test for smaller set --- immudb/client.py | 4 ++-- tests/immu/test_stream.py | 33 ++++++++++++++++++++++++--------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index ae5380d..a3cec77 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -574,14 +574,14 @@ def _rawStreamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWai 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[KeyHeader, BufferedStreamReader]: + def streamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None) -> Tuple[bytes, BufferedStreamReader]: 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) valueHeader = next(chunks) - return keyHeader, BufferedStreamReader(chunks, valueHeader, resp) + 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: req = datatypesv2.KeyRequest(key = key, atTx = atTx, sinceTx = sinceTx, noWait = noWait, atRevision = atRevision) diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index c9dc35a..fe2957d 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -1,3 +1,4 @@ +from datetime import datetime from io import BytesIO import uuid from grpc import RpcError @@ -27,7 +28,8 @@ def test_stream_get_raw(client: ImmudbClient): def test_stream_get(client: ImmudbClient): key = ('x12' * 51).encode('utf-8') client.set(key, "ba".encode("utf-8")) - key, buffer = client.streamGet(key) + keyFrom, buffer = client.streamGet(key) + assert keyFrom == key readed = buffer.read(10240) wholeValue = b'' while readed: @@ -37,7 +39,8 @@ def test_stream_get(client: ImmudbClient): key = ('x12' * 51).encode('utf-8') client.set(key, b"ba"*512) - key, buffer = client.streamGet(key) + keyFrom, buffer = client.streamGet(key) + assert keyFrom == key readed = buffer.read(10) wholeValue = b'' while readed: @@ -49,7 +52,8 @@ def test_stream_get(client: ImmudbClient): 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) - key, buffer = client.streamGet(key) + keyFrom, buffer = client.streamGet(key) + assert keyFrom == key readed = buffer.read(1024004040) wholeValue = b'' while readed: @@ -62,7 +66,7 @@ def test_stream_get(client: ImmudbClient): 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 == key + assert keyFrom == key readed = buffer.read(1) wholeValue = b'' while readed: @@ -76,7 +80,7 @@ def test_stream_get(client: ImmudbClient): value = (('xa' * 11000) + ('ba' * 1100000)).encode("utf-8") client.set(key, value) keyFrom, buffer = client.streamGet(key) - assert keyFrom.key == key + assert keyFrom == key readed = buffer.read(1223) wholeValue = b'' while readed: @@ -150,7 +154,7 @@ def test_stream_get_multiple_cases(client: ImmudbClient, key: bytes, value: byte 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 == key + assert keyFrom == key assert len(buffer) == len(value) assert buffer.size == len(value) @@ -307,9 +311,9 @@ def test_stream_scan_chunked(client: ImmudbClient): (13, 123123, 999), (3333, 55, 17), (13333, None, 3), - (1231321, 1111, 999), + (1231321, 1111, 99), (2, None, 99), - (13333333, 1024, 99), + (13333333, 102400, 11), (11, 1231, 8), (3331, 1024, 99), (1111, 1024, 99), @@ -336,7 +340,7 @@ def test_stream_scan_chunked_corner_cases(client: ImmudbClient, valueSize, readS readed = buffer.read(readSize) while readed: fullValue += readed - readed = buffer.read(readSize) + readed = buffer.read(readSize) assert toFound[key] == fullValue found[key] = True @@ -414,6 +418,17 @@ def test_stream_get_full(client: ImmudbClient): assert len(kv.value) == 1100000 * 2 + 11000 * 2 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()) From 47dfdd197593cfd14967043846e4a496793d162d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Fri, 9 Sep 2022 17:05:15 +0200 Subject: [PATCH 13/38] structure change --- tests/immu/test_stream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index fe2957d..844e256 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -129,7 +129,7 @@ def determineTestId(val): 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 == key + assert keyFrom == key assert len(buffer) == len(value) assert buffer.size == len(value) readed = buffer.read(bufferReadLength) From 5d5d63fa1b21db475121f5a6937ce9d64b757580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Fri, 9 Sep 2022 17:38:03 +0200 Subject: [PATCH 14/38] Update grpc --- immudb/client.py | 2 +- immudb/grpc/Makefile | 3 +- immudb/grpc/proto/schema.proto | 38 --- immudb/grpc/schema_pb2.py | 531 ++++++++++++++++----------------- requirements.txt | 3 +- 5 files changed, 269 insertions(+), 308 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index a3cec77..2c9823c 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -632,7 +632,7 @@ def streamScan(self, seekKey: bytes = None, endKey: bytes = None, prefix: bytes else: value += chunk.chunk - if key != None and value != None: # situation when generator consumes all, so it didn't yield first value + 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]: diff --git a/immudb/grpc/Makefile b/immudb/grpc/Makefile index d4626ee..45e0f91 100644 --- a/immudb/grpc/Makefile +++ b/immudb/grpc/Makefile @@ -12,7 +12,8 @@ PROTOC_INCLUDE_PATH := -I${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} - curl https://raw.githubusercontent.com/codenotary/immudb/master/pkg/api/schema/schema.proto -o ${PROTO_DIR}/schema.proto + # 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_DIR} \ diff --git a/immudb/grpc/proto/schema.proto b/immudb/grpc/proto/schema.proto index c247702..6da6a9e 100644 --- a/immudb/grpc/proto/schema.proto +++ b/immudb/grpc/proto/schema.proto @@ -18,7 +18,6 @@ syntax = "proto3"; import "google/api/annotations.proto"; import "google/protobuf/empty.proto"; -import "protoc-gen-swagger/options/annotations.proto"; import "google/protobuf/struct.proto"; package immudb.schema; @@ -782,28 +781,6 @@ message NewTxResponse { } -option (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = { - info: { - title: "immudb REST API"; - description: "IMPORTANT: All get and safeget functions return base64-encoded keys and values, while all set and safeset functions expect base64-encoded inputs." - }; - security_definitions: { - security: { - key: "bearer" - value: { - type: TYPE_API_KEY - in: IN_HEADER - name: "Authorization" - description: "Authentication token, prefixed by Bearer: Bearer " - } - } - } - security: { - security_requirement: { - key: "bearer" - } - } -}; message ErrorInfo { string code = 1; @@ -878,9 +855,6 @@ service ImmuService { post: "/login" body: "*" }; - option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { - security: {} // no security - }; }; rpc Logout (google.protobuf.Empty) returns (google.protobuf.Empty){ @@ -992,9 +966,6 @@ service ImmuService { option (google.api.http) = { get: "/serverinfo" }; - option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { - security: {} // no security - }; }; // DEPRECATED: Use ServerInfo @@ -1002,27 +973,18 @@ service ImmuService { option (google.api.http) = { get: "/health" }; - option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { - security: {} // no security - }; }; rpc DatabaseHealth (google.protobuf.Empty) returns (DatabaseHealthResponse){ option (google.api.http) = { get: "/db/health" }; - option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { - security: {} // no security - }; }; rpc CurrentState (google.protobuf.Empty) returns (ImmutableState){ option (google.api.http) = { get: "/db/state" }; - option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { - security: {} // no security - }; }; rpc SetReference (ReferenceRequest) returns (TxHeader){ diff --git a/immudb/grpc/schema_pb2.py b/immudb/grpc/schema_pb2.py index f234109..5c6247d 100644 --- a/immudb/grpc/schema_pb2.py +++ b/immudb/grpc/schema_pb2.py @@ -15,11 +15,10 @@ 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 protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2 from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0cschema.proto\x12\rimmudb.schema\x1a\x1cgoogle/api/annotations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a,protoc-gen-swagger/options/annotations.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\xea\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\x12]\n\x05Login\x12\x1b.immudb.schema.LoginRequest\x1a\x1c.immudb.schema.LoginResponse\"\x19\x88\x02\x01\x82\xd3\xe4\x93\x02\x0b\"\x06/login:\x01*\x92\x41\x02\x62\x00\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*\x12k\n\nServerInfo\x12 .immudb.schema.ServerInfoRequest\x1a!.immudb.schema.ServerInfoResponse\"\x18\x82\xd3\xe4\x93\x02\r\x12\x0b/serverinfo\x92\x41\x02\x62\x00\x12U\n\x06Health\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.HealthResponse\"\x14\x82\xd3\xe4\x93\x02\t\x12\x07/health\x92\x41\x02\x62\x00\x12h\n\x0e\x44\x61tabaseHealth\x12\x16.google.protobuf.Empty\x1a%.immudb.schema.DatabaseHealthResponse\"\x17\x82\xd3\xe4\x93\x02\x0c\x12\n/db/health\x92\x41\x02\x62\x00\x12]\n\x0c\x43urrentState\x12\x16.google.protobuf.Empty\x1a\x1d.immudb.schema.ImmutableState\"\x16\x82\xd3\xe4\x93\x02\x0b\x12\t/db/state\x92\x41\x02\x62\x00\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\x8b\x03Z+github.com/codenotary/immudb/pkg/api/schema\x92\x41\xda\x02\x12\xee\x01\n\x0fimmudb REST API\x12\xda\x01IMPORTANT: All get and safeget functions return base64-encoded keys and values, while all set and safeset functions expect base64-encoded inputs.ZY\nW\n\x06\x62\x65\x61rer\x12M\x08\x02\x12\x38\x41uthentication token, prefixed by Bearer: Bearer \x1a\rAuthorization \x02\x62\x0c\n\n\n\x06\x62\x65\x61rer\x12\x00\x62\x06proto3') +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) @@ -1051,7 +1050,7 @@ if _descriptor._USE_C_DESCRIPTORS == False: DESCRIPTOR._options = None - DESCRIPTOR._serialized_options = b'Z+github.com/codenotary/immudb/pkg/api/schema\222A\332\002\022\356\001\n\017immudb REST API\022\332\001IMPORTANT: All get and safeget functions return base64-encoded keys and values, while all set and safeset functions expect base64-encoded inputs.ZY\nW\n\006bearer\022M\010\002\0228Authentication token, prefixed by Bearer: Bearer \032\rAuthorization \002b\014\n\n\n\006bearer\022\000' + 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 @@ -1079,7 +1078,7 @@ _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*\222A\002b\000' + _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 @@ -1111,13 +1110,13 @@ _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\222A\002b\000' + _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\222A\002b\000' + _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\222A\002b\000' + _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\222A\002b\000' + _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 @@ -1168,262 +1167,262 @@ _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=13014 - _ENTRYTYPEACTION._serialized_end=13089 - _PERMISSIONACTION._serialized_start=13091 - _PERMISSIONACTION._serialized_end=13132 - _TXMODE._serialized_start=13134 - _TXMODE._serialized_end=13186 - _KEY._serialized_start=166 - _KEY._serialized_end=184 - _PERMISSION._serialized_start=186 - _PERMISSION._serialized_end=236 - _USER._serialized_start=238 - _USER._serialized_end=360 - _USERLIST._serialized_start=362 - _USERLIST._serialized_end=408 - _CREATEUSERREQUEST._serialized_start=410 - _CREATEUSERREQUEST._serialized_end=499 - _USERREQUEST._serialized_start=501 - _USERREQUEST._serialized_end=528 - _CHANGEPASSWORDREQUEST._serialized_start=530 - _CHANGEPASSWORDREQUEST._serialized_end=609 - _LOGINREQUEST._serialized_start=611 - _LOGINREQUEST._serialized_end=657 - _LOGINRESPONSE._serialized_start=659 - _LOGINRESPONSE._serialized_end=706 - _AUTHCONFIG._serialized_start=708 - _AUTHCONFIG._serialized_end=734 - _MTLSCONFIG._serialized_start=736 - _MTLSCONFIG._serialized_end=765 - _OPENSESSIONREQUEST._serialized_start=767 - _OPENSESSIONREQUEST._serialized_end=845 - _OPENSESSIONRESPONSE._serialized_start=847 - _OPENSESSIONRESPONSE._serialized_end=907 - _PRECONDITION._serialized_start=910 - _PRECONDITION._serialized_end=1347 - _PRECONDITION_KEYMUSTEXISTPRECONDITION._serialized_start=1184 - _PRECONDITION_KEYMUSTEXISTPRECONDITION._serialized_end=1223 - _PRECONDITION_KEYMUSTNOTEXISTPRECONDITION._serialized_start=1225 - _PRECONDITION_KEYMUSTNOTEXISTPRECONDITION._serialized_end=1267 - _PRECONDITION_KEYNOTMODIFIEDAFTERTXPRECONDITION._serialized_start=1269 - _PRECONDITION_KEYNOTMODIFIEDAFTERTXPRECONDITION._serialized_end=1331 - _KEYVALUE._serialized_start=1349 - _KEYVALUE._serialized_end=1432 - _ENTRY._serialized_start=1435 - _ENTRY._serialized_end=1610 - _REFERENCE._serialized_start=1612 - _REFERENCE._serialized_end=1725 - _OP._serialized_start=1728 - _OP._serialized_end=1876 - _EXECALLREQUEST._serialized_start=1878 - _EXECALLREQUEST._serialized_end=2001 - _ENTRIES._serialized_start=2003 - _ENTRIES._serialized_end=2051 - _ZENTRY._serialized_start=2053 - _ZENTRY._serialized_end=2153 - _ZENTRIES._serialized_start=2155 - _ZENTRIES._serialized_end=2205 - _SCANREQUEST._serialized_start=2208 - _SCANREQUEST._serialized_end=2393 - _KEYPREFIX._serialized_start=2395 - _KEYPREFIX._serialized_end=2422 - _ENTRYCOUNT._serialized_start=2424 - _ENTRYCOUNT._serialized_end=2451 - _SIGNATURE._serialized_start=2453 - _SIGNATURE._serialized_end=2502 - _TXHEADER._serialized_start=2505 - _TXHEADER._serialized_end=2680 - _TXMETADATA._serialized_start=2682 - _TXMETADATA._serialized_end=2694 - _LINEARPROOF._serialized_start=2696 - _LINEARPROOF._serialized_end=2764 - _DUALPROOF._serialized_start=2767 - _DUALPROOF._serialized_end=3026 - _TX._serialized_start=3029 - _TX._serialized_end=3197 - _TXENTRY._serialized_start=3199 - _TXENTRY._serialized_end=3311 - _KVMETADATA._serialized_start=3313 - _KVMETADATA._serialized_end=3411 - _EXPIRATION._serialized_start=3413 - _EXPIRATION._serialized_end=3444 - _VERIFIABLETX._serialized_start=3447 - _VERIFIABLETX._serialized_end=3582 - _VERIFIABLEENTRY._serialized_start=3585 - _VERIFIABLEENTRY._serialized_end=3745 - _INCLUSIONPROOF._serialized_start=3747 - _INCLUSIONPROOF._serialized_end=3807 - _SETREQUEST._serialized_start=3809 - _SETREQUEST._serialized_end=3927 - _KEYREQUEST._serialized_start=3929 - _KEYREQUEST._serialized_end=4021 - _KEYLISTREQUEST._serialized_start=4023 - _KEYLISTREQUEST._serialized_end=4070 - _DELETEKEYSREQUEST._serialized_start=4072 - _DELETEKEYSREQUEST._serialized_end=4138 - _VERIFIABLESETREQUEST._serialized_start=4140 - _VERIFIABLESETREQUEST._serialized_end=4231 - _VERIFIABLEGETREQUEST._serialized_start=4233 - _VERIFIABLEGETREQUEST._serialized_end=4324 - _SERVERINFOREQUEST._serialized_start=4326 - _SERVERINFOREQUEST._serialized_end=4345 - _SERVERINFORESPONSE._serialized_start=4347 - _SERVERINFORESPONSE._serialized_end=4384 - _HEALTHRESPONSE._serialized_start=4386 - _HEALTHRESPONSE._serialized_end=4435 - _DATABASEHEALTHRESPONSE._serialized_start=4437 - _DATABASEHEALTHRESPONSE._serialized_end=4518 - _IMMUTABLESTATE._serialized_start=4520 - _IMMUTABLESTATE._serialized_end=4623 - _REFERENCEREQUEST._serialized_start=4626 - _REFERENCEREQUEST._serialized_end=4780 - _VERIFIABLEREFERENCEREQUEST._serialized_start=4782 - _VERIFIABLEREFERENCEREQUEST._serialized_end=4891 - _ZADDREQUEST._serialized_start=4893 - _ZADDREQUEST._serialized_end=4995 - _SCORE._serialized_start=4997 - _SCORE._serialized_end=5019 - _ZSCANREQUEST._serialized_start=5022 - _ZSCANREQUEST._serialized_end=5284 - _HISTORYREQUEST._serialized_start=5286 - _HISTORYREQUEST._serialized_end=5377 - _VERIFIABLEZADDREQUEST._serialized_start=5379 - _VERIFIABLEZADDREQUEST._serialized_end=5473 - _TXREQUEST._serialized_start=5476 - _TXREQUEST._serialized_end=5615 - _ENTRIESSPEC._serialized_start=5618 - _ENTRIESSPEC._serialized_end=5790 - _ENTRYTYPESPEC._serialized_start=5792 - _ENTRYTYPESPEC._serialized_end=5855 - _VERIFIABLETXREQUEST._serialized_start=5858 - _VERIFIABLETXREQUEST._serialized_end=6029 - _TXSCANREQUEST._serialized_start=6032 - _TXSCANREQUEST._serialized_end=6177 - _TXLIST._serialized_start=6179 - _TXLIST._serialized_end=6219 - _EXPORTTXREQUEST._serialized_start=6221 - _EXPORTTXREQUEST._serialized_end=6250 - _DATABASE._serialized_start=6252 - _DATABASE._serialized_end=6284 - _DATABASESETTINGS._serialized_start=6287 - _DATABASESETTINGS._serialized_end=6570 - _CREATEDATABASEREQUEST._serialized_start=6572 - _CREATEDATABASEREQUEST._serialized_end=6689 - _CREATEDATABASERESPONSE._serialized_start=6691 - _CREATEDATABASERESPONSE._serialized_end=6812 - _UPDATEDATABASEREQUEST._serialized_start=6814 - _UPDATEDATABASEREQUEST._serialized_end=6914 - _UPDATEDATABASERESPONSE._serialized_start=6916 - _UPDATEDATABASERESPONSE._serialized_end=7017 - _DATABASESETTINGSREQUEST._serialized_start=7019 - _DATABASESETTINGSREQUEST._serialized_end=7044 - _DATABASESETTINGSRESPONSE._serialized_start=7046 - _DATABASESETTINGSRESPONSE._serialized_end=7149 - _NULLABLEUINT32._serialized_start=7151 - _NULLABLEUINT32._serialized_end=7182 - _NULLABLEUINT64._serialized_start=7184 - _NULLABLEUINT64._serialized_end=7215 - _NULLABLEFLOAT._serialized_start=7217 - _NULLABLEFLOAT._serialized_end=7247 - _NULLABLEBOOL._serialized_start=7249 - _NULLABLEBOOL._serialized_end=7278 - _NULLABLESTRING._serialized_start=7280 - _NULLABLESTRING._serialized_end=7311 - _NULLABLEMILLISECONDS._serialized_start=7313 - _NULLABLEMILLISECONDS._serialized_end=7350 - _DATABASENULLABLESETTINGS._serialized_start=7353 - _DATABASENULLABLESETTINGS._serialized_end=8459 - _REPLICATIONNULLABLESETTINGS._serialized_start=8462 - _REPLICATIONNULLABLESETTINGS._serialized_end=8811 - _INDEXNULLABLESETTINGS._serialized_start=8814 - _INDEXNULLABLESETTINGS._serialized_end=9588 - _AHTNULLABLESETTINGS._serialized_start=9591 - _AHTNULLABLESETTINGS._serialized_end=9722 - _LOADDATABASEREQUEST._serialized_start=9724 - _LOADDATABASEREQUEST._serialized_end=9763 - _LOADDATABASERESPONSE._serialized_start=9765 - _LOADDATABASERESPONSE._serialized_end=9805 - _UNLOADDATABASEREQUEST._serialized_start=9807 - _UNLOADDATABASEREQUEST._serialized_end=9848 - _UNLOADDATABASERESPONSE._serialized_start=9850 - _UNLOADDATABASERESPONSE._serialized_end=9892 - _DELETEDATABASEREQUEST._serialized_start=9894 - _DELETEDATABASEREQUEST._serialized_end=9935 - _DELETEDATABASERESPONSE._serialized_start=9937 - _DELETEDATABASERESPONSE._serialized_end=9979 - _FLUSHINDEXREQUEST._serialized_start=9981 - _FLUSHINDEXREQUEST._serialized_end=10043 - _FLUSHINDEXRESPONSE._serialized_start=10045 - _FLUSHINDEXRESPONSE._serialized_end=10083 - _TABLE._serialized_start=10085 - _TABLE._serialized_end=10111 - _SQLGETREQUEST._serialized_start=10113 - _SQLGETREQUEST._serialized_end=10217 - _VERIFIABLESQLGETREQUEST._serialized_start=10219 - _VERIFIABLESQLGETREQUEST._serialized_end=10319 - _SQLENTRY._serialized_start=10321 - _SQLENTRY._serialized_end=10416 - _VERIFIABLESQLENTRY._serialized_start=10419 - _VERIFIABLESQLENTRY._serialized_end=11152 - _VERIFIABLESQLENTRY_COLNAMESBYIDENTRY._serialized_start=10938 - _VERIFIABLESQLENTRY_COLNAMESBYIDENTRY._serialized_end=10989 - _VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY._serialized_start=10991 - _VERIFIABLESQLENTRY_COLIDSBYNAMEENTRY._serialized_end=11042 - _VERIFIABLESQLENTRY_COLTYPESBYIDENTRY._serialized_start=11044 - _VERIFIABLESQLENTRY_COLTYPESBYIDENTRY._serialized_end=11095 - _VERIFIABLESQLENTRY_COLLENBYIDENTRY._serialized_start=11097 - _VERIFIABLESQLENTRY_COLLENBYIDENTRY._serialized_end=11146 - _USEDATABASEREPLY._serialized_start=11154 - _USEDATABASEREPLY._serialized_end=11187 - _CHANGEPERMISSIONREQUEST._serialized_start=11190 - _CHANGEPERMISSIONREQUEST._serialized_end=11320 - _SETACTIVEUSERREQUEST._serialized_start=11322 - _SETACTIVEUSERREQUEST._serialized_end=11378 - _DATABASELISTRESPONSE._serialized_start=11380 - _DATABASELISTRESPONSE._serialized_end=11446 - _DATABASELISTREQUESTV2._serialized_start=11448 - _DATABASELISTREQUESTV2._serialized_end=11471 - _DATABASELISTRESPONSEV2._serialized_start=11473 - _DATABASELISTRESPONSEV2._serialized_end=11553 - _DATABASEWITHSETTINGS._serialized_start=11555 - _DATABASEWITHSETTINGS._serialized_end=11666 - _CHUNK._serialized_start=11668 - _CHUNK._serialized_end=11692 - _USESNAPSHOTREQUEST._serialized_start=11694 - _USESNAPSHOTREQUEST._serialized_end=11751 - _SQLEXECREQUEST._serialized_start=11753 - _SQLEXECREQUEST._serialized_end=11841 - _SQLQUERYREQUEST._serialized_start=11843 - _SQLQUERYREQUEST._serialized_end=11939 - _NAMEDPARAM._serialized_start=11941 - _NAMEDPARAM._serialized_end=12007 - _SQLEXECRESULT._serialized_start=12009 - _SQLEXECRESULT._serialized_end=12087 - _COMMITTEDSQLTX._serialized_start=12090 - _COMMITTEDSQLTX._serialized_end=12487 - _COMMITTEDSQLTX_LASTINSERTEDPKSENTRY._serialized_start=12326 - _COMMITTEDSQLTX_LASTINSERTEDPKSENTRY._serialized_end=12405 - _COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY._serialized_start=12407 - _COMMITTEDSQLTX_FIRSTINSERTEDPKSENTRY._serialized_end=12487 - _SQLQUERYRESULT._serialized_start=12489 - _SQLQUERYRESULT._serialized_end=12579 - _COLUMN._serialized_start=12581 - _COLUMN._serialized_end=12617 - _ROW._serialized_start=12619 - _ROW._serialized_end=12682 - _SQLVALUE._serialized_start=12685 - _SQLVALUE._serialized_end=12815 - _NEWTXREQUEST._serialized_start=12817 - _NEWTXREQUEST._serialized_end=12868 - _NEWTXRESPONSE._serialized_start=12870 - _NEWTXRESPONSE._serialized_end=12908 - _ERRORINFO._serialized_start=12910 - _ERRORINFO._serialized_end=12950 - _DEBUGINFO._serialized_start=12952 - _DEBUGINFO._serialized_end=12978 - _RETRYINFO._serialized_start=12980 - _RETRYINFO._serialized_end=13012 - _IMMUSERVICE._serialized_start=13189 - _IMMUSERVICE._serialized_end=19695 + _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/requirements.txt b/requirements.txt index ef39c7c..28e69e0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,5 +3,4 @@ protobuf>=3.12.0<3.20.x google-api==0.1.12 googleapis-common-protos==1.56.4 google-api-core==2.10.0 -ecdsa>=0.18.0 -protoc-gen-swagger==0.1.0 +ecdsa>=0.18.0 \ No newline at end of file From 44e35012b5a0c9f547d27ea9f1925c6fde4bce1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Sun, 11 Sep 2022 22:25:03 +0200 Subject: [PATCH 15/38] Added tests, typing, docstring, replication, exporttx --- immudb/client.py | 529 ++++++++++++++++++--- immudb/dataconverter.py | 20 +- immudb/datatypesv2.py | 260 ++++++++-- tests/immu/test_convert_to_grpc.py | 20 + tests/immu/test_create_load_database_v2.py | 70 ++- tests/immu/test_export_tx.py | 33 ++ 6 files changed, 805 insertions(+), 127 deletions(-) create mode 100644 tests/immu/test_export_tx.py diff --git a/immudb/client.py b/immudb/client.py index 2c9823c..22ef373 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -11,12 +11,13 @@ # limitations under the License. from io import BytesIO -from typing import Generator, List, Tuple, Union +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.grpc.schema_pb2 import Chunk, EntriesSpec, EntryTypeSpec, TxScanRequest +from immudb import datatypes +from immudb.grpc.schema_pb2 import Chunk, TxHeader from immudb.handler import (batchGet, batchSet, changePassword, changePermission, createUser, currentRoot, createDatabase, databaseList, deleteKeys, useDatabase, get, listUsers, sqldescribe, verifiedGet, verifiedSet, setValue, history, @@ -36,7 +37,7 @@ import datetime -from immudb.streamsutils import FullKeyValue, KeyHeader, StreamReader, ValueChunk, ValueChunkHeader, BufferedStreamReader +from immudb.streamsutils import KeyHeader, StreamReader, ValueChunk, ValueChunkHeader, BufferedStreamReader class ImmudbClient: @@ -95,13 +96,29 @@ def shutdown(self): self.intercept_channel = 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): + """Helper function that sets token header interceptor - def set_token_header_interceptor(self, response): + Args: + response (LoginResponse): login response + + Returns: + Stub: Intercepted stub + """ try: token = response.token except AttributeError: @@ -111,9 +128,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): + def _get_intercepted_stub(self): + """Helper function that returns intercepted stub + + Returns: + Stub: Intercepted stub + """ allInterceptors = self.headersInterceptors + self.clientInterceptors intercepted, newStub = grpcutils.get_intercepted_stub( self.channel, allInterceptors) @@ -124,11 +146,6 @@ def get_intercepted_stub(self): def stub(self): 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): """Retrieves health response of immudb @@ -137,8 +154,15 @@ def healthCheck(self): """ 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 @@ -172,12 +196,12 @@ def login(self, username, password, database=b"defaultdb"): raise Exception( "Attempted to login on termninated client, channel has been shutdown") from e - self._stub = self.set_token_header_interceptor(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) + self._stub = self._set_token_header_interceptor(resp) self._rs.init("{}/{}".format(self._url, database), self._stub) return login_response @@ -195,7 +219,7 @@ def _resetStub(self): 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 = self._get_intercepted_stub() def keepAlive(self): """Sends keep alive packet @@ -271,7 +295,7 @@ def openSession(self, username, password, database=b"defaultdb"): ) session_response = self._stub.OpenSession( req) - self._stub = self.set_session_id_interceptor(session_response) + self._stub = self._set_session_id_interceptor(session_response) return transaction.Tx(self._stub, session_response, self.channel) def closeSession(self): @@ -355,32 +379,80 @@ def createDatabase(self, dbName: bytes): request = schema_pb2_grpc.schema__pb2.Database(databaseName=dbName) return createDatabase.call(self._stub, self._rs, request) - def createDatabaseV2(self, name: str, settings: datatypesv2.DatabaseNullableSettings, ifNotExists: bool) -> datatypesv2.CreateDatabaseResponse: + 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): would only create database if it not exist + + 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) 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.DatabaseNullableSettings) -> datatypesv2.UpdateDatabaseResponse: + 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) @@ -394,29 +466,52 @@ def useDatabase(self, dbName: bytes): """ 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) + # modifies header token accordingly + self._stub = self._set_token_header_interceptor(resp) self._rs.init(dbName, self._stub) return resp - def getDatabaseSettingsV2(self) -> datatypesv2.DatabaseSettingsResponse: + def getDatabaseSettingsV2(self) -> datatypesv2.DatabaseSettingsResponseV2: + """Returns current database settings + + Returns: + datatypesv2.DatabaseSettingsResponseV2: Contains current database name and settings + """ req = datatypesv2.DatabaseSettingsRequest() resp = self._stub.GetDatabaseSettingsV2(req._getGRPC()) return dataconverter.convertResponse(resp) 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: + """Routine that creates a fresh index based on the current state, removing all intermediate data generated over time + + Args: + cleanupPercentage (float): Indicates how much space will be scanned for unreferenced data. Even though this operation blocks transaction processing, choosing a small percentage e.g. 0.1 may not significantly hinder normal operations while reducing used storage space. + synced (bool): If true, fsync after writing data to avoid index regeneration in the case 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): - """Starts index compaction + """Starts full async index compaction - Routine that creates a fresh index based on the current state, removing all intermediate data generated over time """ resp = self._stub.CompactIndex(google_dot_protobuf_dot_empty__pb2.Empty()) return resp == google_dot_protobuf_dot_empty__pb2.Empty() @@ -429,7 +524,7 @@ def health(self): """ return health.call(self._stub, self._rs) - def currentState(self): + def currentState(self) -> State: """Return current state of immudb (proof) Returns: @@ -437,7 +532,7 @@ def currentState(self): """ return currentRoot.call(self._stub, self._rs, None) - def set(self, key: bytes, value: bytes): + def set(self, key: bytes, value: bytes) -> datatypes.SetResponse: """Sets key into value in database Args: @@ -449,7 +544,7 @@ def set(self, key: bytes, value: bytes): """ return setValue.call(self._stub, self._rs, key, value) - def verifiedSet(self, key: bytes, value: bytes): + def verifiedSet(self, key: bytes, value: bytes) -> datatypes.SetResponse: """Sets key into value in database, and additionally checks it with state saved before Args: @@ -461,7 +556,7 @@ def verifiedSet(self, key: bytes, value: bytes): """ return verifiedSet.call(self._stub, self._rs, key, value, self._vk) - def expireableSet(self, key: bytes, value: bytes, expiresAt: datetime.datetime): + def expireableSet(self, key: bytes, value: bytes, expiresAt: datetime.datetime) -> datatypes.SetResponse: """Sets key into value in database with additional expiration Args: @@ -476,7 +571,7 @@ def expireableSet(self, key: bytes, value: bytes, expiresAt: datetime.datetime): metadata.ExpiresAt(expiresAt) return setValue.call(self._stub, self._rs, key, value, metadata) - def get(self, key: bytes, atRevision: int = None): + def get(self, key: bytes, atRevision: int = None) -> datatypes.GetResponse: """Gets value for key Args: @@ -488,86 +583,261 @@ def get(self, key: bytes, atRevision: int = None): """ return get.call(self._stub, self._rs, key, atRevision=atRevision) - # Not implemented: getSince - # Not implemented: getAt + def verifiedGet(self, key: bytes, atRevision: int = None) -> datatypes.SafeGetResponse: + """Get value for key and compares with saved state + + Args: + key (bytes): Key to retrieve + atRevision (int, optional): Retrieve key at desired revision. -1, -2... -n to get relative revision. Defaults to None. - def verifiedGet(self, key: bytes, atRevision: int = None): + Returns: + datatypes.SafeGetResponse: object that contains informations about transaction and verified state + """ return verifiedGet.call(self._stub, self._rs, key, verifying_key=self._vk, atRevision=atRevision) - def verifiedGetSince(self, key: bytes, sinceTx: int): + def verifiedGetSince(self, key: bytes, sinceTx: int) -> datatypes.SafeGetResponse: + """Get value for key since tx (immudb will wait that the transaction specified by sinceTx is processed) + + Args: + key (bytes): Key to retrieve + sinceTx (int): transaction id (immudb will wait that the transaction specified by sinceTx is processed) + + 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): + def verifiedGetAt(self, key: bytes, atTx: int) -> datatypes.SafeGetResponse: + """Get value at specified transaction + + Args: + key (bytes): key to retrieve + atTx (int): at transaction point + + 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): + def history(self, key: bytes, offset: int, limit: int, sortorder: bool) -> List[datatypes.historyResponseItem]: + """Returns history of key + + Args: + key (bytes): Key to retrieve + offset (int): Offset of history + limit (int): Limit of history entries + sortorder (bool): Sort order of history + + 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): + 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 - current transaction + + 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): + """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 - current transaction + + Returns: + datatypes.SetResponse: Set response contains transaction id + """ return verifiedzadd.call(self._stub, self._rs, zset, score, key, atTx, self._vk) - def scan(self, key: bytes, prefix: bytes, desc: bool, limit: int, sinceTx: int = None): + 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. + + 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. + + 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, seekScore: float, seekAtTx: int, inclusive: bool, limit: int, desc: bool, minscore: float, - maxscore: float, sinceTx=None, nowait=False): + maxscore: float, 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): + 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 + + 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 + + Args: + initialTx (int): initial transaction id + limit (int, optional): Limit resulsts. Defaults to 999. + desc (bool, optional): Descending or ascending. Defaults to False. + 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. + + 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 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): + 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): + 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): + def delete(self, req: DeleteKeysRequest) -> TxHeader: + """Deletes key + + Args: + req (DeleteKeysRequest): Request contains key to delete + + Returns: + TxHeader: Transaction header + """ return deleteKeys.call(self._stub, req) - def execAll(self, ops: list, noWait=False): + def execAll(self, ops: List[Union[datatypes.KeyValue, datatypes.ZAddRequest, datatypes.ReferenceRequest]], noWait=False) -> TxHeader: + """Exectues all operations from list (KeyValue, ZAddRequest, ReferenceRequest) + + 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. + + Returns: + TxHeader: Transaction header + """ return execAll.call(self._stub, self._rs, ops, noWait) - def setReference(self, referredkey: bytes, newkey: bytes): - return reference.call(self._stub, self._rs, referredkey, newkey) + def setReference(self, referredkey: bytes, newkey: bytes) -> TxHeader: + """References key specified by referredkey as newkey - def verifiedSetReference(self, referredkey: bytes, newkey: bytes): - return verifiedreference.call(self._stub, self._rs, referredkey, newkey, verifying_key=self._vk) + Args: + referredkey (bytes): Reffered key + newkey (bytes): New key - # Not implemented: setReferenceAt - # Not implemented: verifiedSetReferenceAt + Returns: + TxHeader: Transaction header + """ + return reference.call(self._stub, self._rs, referredkey, newkey) - # Not implemented: dump + 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) @@ -575,6 +845,21 @@ def _rawStreamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWai 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) @@ -584,6 +869,18 @@ def streamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: b 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) @@ -595,20 +892,18 @@ def streamGetFull(self, key: bytes, atTx: int = None, sinceTx: int = None, noWai value += it.chunk return datatypesv2.KeyValue(key, value) - # def streamVerifiableGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None, proveSinceTx: int = None): - # 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 = StreamReader(resp) - # for it in resp: - # yield it - 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() @@ -619,6 +914,23 @@ def _make_set_stream(self, buffer, key: bytes, length: int, chunkSize: int = 655 chunk = buffer.read(chunkSize) 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 @@ -636,6 +948,27 @@ def streamScan(self, seekKey: bytes = None, endKey: bytes = None, prefix: bytes 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 @@ -654,20 +987,79 @@ def streamScanBuffered(self, seekKey: bytes = None, endKey: bytes = None, prefix def _rawStreamSet(self, generator: Generator[Union[KeyHeader, ValueChunkHeader, ValueChunk], None, None]) -> datatypesv2.TxHeader: + """Helper function that grabs generator of chunks and set into immudb + + Args: + generator (Generator[Union[KeyHeader, ValueChunkHeader, ValueChunk], None, None]): Generator + + Returns: + datatypesv2.TxHeader: Transaction header + """ resp = self._stub.streamSet(generator) return dataconverter.convertResponse(resp) 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. 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 - # Not implemented: exportTx - # Not implemented: replicateTx + 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 @@ -712,9 +1104,6 @@ def listTables(self): def describeTable(self, table): return sqldescribe.call(self._stub, self._rs, table) - # Not implemented: verifyRow - -# deprecated def databaseCreate(self, dbName: bytes): warnings.warn("Call to deprecated databaseCreate. Use createDatabase instead", category=DeprecationWarning, diff --git a/immudb/dataconverter.py b/immudb/dataconverter.py index 8e73daf..6a8fcd5 100644 --- a/immudb/dataconverter.py +++ b/immudb/dataconverter.py @@ -3,11 +3,16 @@ import immudb.datatypesv2 as datatypesv2 -def convertRequest(fromDataClass: datatypesv2.GRPCTransformable): - return fromDataClass.getGRPC() - +def convertResponse(fromResponse, toHumanDataClass = True): + """Converts response from GRPC to python dataclass -def convertResponse(fromResponse): + 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: @@ -17,8 +22,11 @@ def convertResponse(fromResponse): if schemaFrom: construct = dict() for field in fromResponse.ListFields(): - construct[field[0].name] = convertResponse(field[1]) - return schemaFrom(**construct) + 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/datatypesv2.py b/immudb/datatypesv2.py index 87bc8bb..d16c56d 100644 --- a/immudb/datatypesv2.py +++ b/immudb/datatypesv2.py @@ -12,10 +12,22 @@ from __future__ import annotations from dataclasses import dataclass from enum import Enum, IntEnum +from this import d 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__) @@ -42,6 +54,9 @@ def _transformDict(self, dictToTransform: Dict[str, Any]): dictToTransform[key] = currentValue.value return dictToTransform + def _getHumanDataClass(self): + return self + @@ -475,7 +490,7 @@ class DatabaseSettings(GRPCTransformable): @dataclass class CreateDatabaseRequest(GRPCTransformable): name: str = None - settings: DatabaseNullableSettings = None + settings: Union[DatabaseNullableSettings, DatabaseSettingsV2] = None ifNotExists: bool = None @@ -485,16 +500,33 @@ class CreateDatabaseResponse(GRPCTransformable): 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: DatabaseNullableSettings = 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): @@ -504,48 +536,94 @@ class DatabaseSettingsRequest(GRPCTransformable): 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): - return schema.NullableUint32(value = self.value) + 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): - return schema.NullableUint64(value = self.value) + 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): - return schema.NullableFloat(value = self.value) + 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): - return schema.NullableBool(value = self.value) + + 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): - return schema.NullableString(value = self.value) + 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): - return schema.NullableMilliseconds(value = self.value) + if self.value == None: + return None + else: + return schema.NullableMilliseconds(value = self.value) + + def _getHumanDataClass(self): + return self.value @dataclass class DatabaseNullableSettings(GRPCTransformable): @@ -568,28 +646,128 @@ class DatabaseNullableSettings(GRPCTransformable): syncFrequency: NullableMilliseconds = None writeBufferSize: NullableUint32 = None ahtSettings: AHTNullableSettings = None - -# @dataclass -# class DatabaseNullableSettings(GRPCTransformable): -# replicationSettings: ReplicationNullableSettings = None -# fileSize: NullableUint32 = None -# maxKeyLen: NullableUint32 = None -# maxValueLen: NullableUint32 = None -# maxTxEntries: Optional[int] = 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): @@ -599,6 +777,9 @@ class ReplicationNullableSettings(GRPCTransformable): masterPort: NullableUint32 = None followerUsername: NullableString = None followerPassword: NullableString = None + + def _getHumanDataClass(self): + return grpcHumanizator(self, ReplicationSettings) @dataclass @@ -617,11 +798,17 @@ class IndexNullableSettings(GRPCTransformable): 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 @@ -721,7 +908,10 @@ class DatabaseListRequestV2(GRPCTransformable): @dataclass class DatabaseListResponseV2(GRPCTransformable): - databases: List[DatabaseWithSettings] = None + databases: List[Union[DatabaseWithSettings, DatabaseWithSettingsV2]] = None + + def _getHumanDataClass(self): + return DatabaseListResponseV2(databases = [toConvert._getHumanDataClass() for toConvert in self.databases]) @dataclass class DatabaseWithSettings(GRPCTransformable): @@ -729,6 +919,14 @@ class DatabaseWithSettings(GRPCTransformable): 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 diff --git a/tests/immu/test_convert_to_grpc.py b/tests/immu/test_convert_to_grpc.py index c502572..f1927fc 100644 --- a/tests/immu/test_convert_to_grpc.py +++ b/tests/immu/test_convert_to_grpc.py @@ -2,6 +2,7 @@ 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(): @@ -19,4 +20,23 @@ def test_converting_to_grpc(): 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 index 6a752f5..700d7d5 100644 --- a/tests/immu/test_create_load_database_v2.py +++ b/tests/immu/test_create_load_database_v2.py @@ -1,14 +1,28 @@ from grpc import RpcError from immudb import ImmudbClient -from immudb.datatypesv2 import CreateDatabaseRequest, DatabaseNullableSettings, NullableUint32, NullableBool +from immudb.datatypesv2 import CreateDatabaseRequest, DatabaseNullableSettings, DatabaseSettingsV2, NullableUint32, NullableBool import uuid import pytest def test_create_database_v2(client: ImmudbClient): name = str(uuid.uuid4()).replace('-', '') - settings = DatabaseNullableSettings( - maxKeyLen=NullableUint32(32) + 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) @@ -31,51 +45,66 @@ def test_update_database_v2(client: ImmudbClient): with pytest.raises(RpcError): client.set(('x' * 32).encode("utf-8"), b'x') - settings = DatabaseNullableSettings( - autoload=NullableBool(value = False) + settings = DatabaseSettingsV2( + autoload=False ) resp = client.updateDatabaseV2(name, settings) + assert resp.settings.autoload == False resp = client.databaseListV2() foundDb = False - # Important - GRPC is not sending False, it would send None + for database in resp.databases: - if database.settings.maxKeyLen.value == 32 and database.name == name and not database.settings.autoload.value: + if database.settings.maxKeyLen == 32 and database.name == name and not database.settings.autoload: foundDb = True assert foundDb == True - settings = DatabaseNullableSettings( - autoload=NullableBool(value = 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.value == 32 and database.name == name and database.settings.autoload.value: + if database.settings.maxKeyLen == 32 and database.name == name and database.settings.autoload: foundDb = True assert foundDb == True def test_list_databases_v2(client: ImmudbClient): name = str(uuid.uuid4()).replace('-', '') - settings = DatabaseNullableSettings( - maxKeyLen=NullableUint32(32) + settings = DatabaseSettingsV2( + maxKeyLen=32 ) client.createDatabaseV2(name, settings, True) resp = client.databaseListV2() foundDb = False for database in resp.databases: - if database.settings.maxKeyLen.value == 32 and database.name == name: + 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(client: ImmudbClient): name = str(uuid.uuid4()).replace('-', '') - settings = DatabaseNullableSettings( - maxKeyLen=NullableUint32(32) + settings = DatabaseSettingsV2( + maxKeyLen=32 ) client.createDatabaseV2(name, settings, True) resp = client.unloadDatabase(name) @@ -89,8 +118,8 @@ def test_load_unload_database(client: ImmudbClient): def test_delete_database(client: ImmudbClient): name = str(uuid.uuid4()).replace('-', '') - settings = DatabaseNullableSettings( - maxKeyLen=NullableUint32(32) + settings = DatabaseSettingsV2( + maxKeyLen=32 ) client.createDatabaseV2(name, settings, True) client.useDatabase(name) @@ -105,12 +134,13 @@ def test_delete_database(client: ImmudbClient): def test_get_database_settings_v2(client: ImmudbClient): name = str(uuid.uuid4()).replace('-', '') - settings = DatabaseNullableSettings( - maxKeyLen=NullableUint32(32) + settings = DatabaseSettingsV2( + maxKeyLen=32 ) client.createDatabaseV2(name, settings, True) client.useDatabase(name) settings = client.getDatabaseSettingsV2() assert settings.database == name - assert settings.settings.maxKeyLen.value == 32 + assert settings.settings.maxKeyLen == 32 + diff --git a/tests/immu/test_export_tx.py b/tests/immu/test_export_tx.py new file mode 100644 index 0000000..60b8637 --- /dev/null +++ b/tests/immu/test_export_tx.py @@ -0,0 +1,33 @@ +import uuid +from immudb import ImmudbClient, datatypesv2 +import uuid +import time + +def test_export_tx_replicate_tx(client: ImmudbClient): + 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 From 333442bace4463e072687fb45a6802e52300b1cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Mon, 12 Sep 2022 00:02:15 +0200 Subject: [PATCH 16/38] Updated docstring --- immudb/client.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index 22ef373..9c0cf75 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -1101,7 +1101,15 @@ def listTables(self): """ return listtables.call(self._stub, self._rs) - def describeTable(self, table): + def describeTable(self, table) -> List[datatypes.ColumnDescription]: + """Describes table provided by argument + + Args: + table (str): Table to describe + + Returns: + List[datatypes.ColumnDescription]: Column descriptions + """ return sqldescribe.call(self._stub, self._rs, table) def databaseCreate(self, dbName: bytes): @@ -1132,7 +1140,6 @@ def safeSet(self, key: bytes, value: bytes): # deprecated ) return verifiedSet.call(self._stub, self._rs, key, value) - # immudb-py only From 6bf7954c5087528fc50d6d15fc42db1aecf20661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Mon, 12 Sep 2022 00:04:33 +0200 Subject: [PATCH 17/38] Autopep --- immudb/client.py | 57 +++--- immudb/constants.py | 4 +- immudb/dataconverter.py | 6 +- immudb/datatypesv2.py | 426 ++++++++++++++++++++++++++-------------- immudb/streamsutils.py | 22 ++- 5 files changed, 332 insertions(+), 183 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index 9c0cf75..f6133cd 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -42,7 +42,7 @@ class ImmudbClient: - def __init__(self, immudUrl=None, rs: RootService = None, publicKeyFile: str = None, timeout=None, max_grpc_message_length = None): + def __init__(self, immudUrl=None, rs: RootService = None, publicKeyFile: str = None, timeout=None, max_grpc_message_length=None): """Immudb client Args: @@ -57,8 +57,9 @@ def __init__(self, immudUrl=None, rs: RootService = None, publicKeyFile: str = N self.timeout = timeout options = [] if max_grpc_message_length: - options = [('grpc.max_receive_message_length', max_grpc_message_length)] - self.channel = grpc.insecure_channel(immudUrl, options = options) + 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() @@ -79,6 +80,7 @@ def loadKey(self, kfile: str): """ with open(kfile) as f: self._vk = ecdsa.VerifyingKey.from_pem(f.read()) + def loadKeyFromString(self, key: str): """Loads public key from parameter @@ -390,7 +392,8 @@ def createDatabaseV2(self, name: str, settings: datatypesv2.DatabaseSettingsV2, Returns: datatypesv2.CreateDatabaseResponseV2: Response contains information about new database """ - request = datatypesv2.CreateDatabaseRequest(name = name, settings = settings, ifNotExists = ifNotExists) + request = datatypesv2.CreateDatabaseRequest( + name=name, settings=settings, ifNotExists=ifNotExists) resp = self._stub.CreateDatabaseV2(request._getGRPC()) return dataconverter.convertResponse(resp) @@ -471,7 +474,6 @@ def useDatabase(self, dbName: bytes): self._rs.init(dbName, self._stub) return resp - def getDatabaseSettingsV2(self) -> datatypesv2.DatabaseSettingsResponseV2: """Returns current database settings @@ -513,7 +515,8 @@ def flushIndex(self, cleanupPercentage: float, synced: bool) -> datatypesv2.Flus def compactIndex(self): """Starts full async index compaction - Routine that creates a fresh index based on the current state, removing all intermediate data generated over time """ - resp = self._stub.CompactIndex(google_dot_protobuf_dot_empty__pb2.Empty()) + resp = self._stub.CompactIndex( + google_dot_protobuf_dot_empty__pb2.Empty()) return resp == google_dot_protobuf_dot_empty__pb2.Empty() def health(self): @@ -738,7 +741,8 @@ def txScan(self, initialTx: int, limit: int = 999, desc: bool = False, entriesSp Returns: datatypesv2.TxList: Transaction list """ - req = datatypesv2.TxScanRequest(initialTx, limit, desc, entriesSpec, sinceTx, noWait) + req = datatypesv2.TxScanRequest( + initialTx, limit, desc, entriesSpec, sinceTx, noWait) resp = self._stub.TxScan(req._getGRPC()) return dataconverter.convertResponse(resp) @@ -838,7 +842,8 @@ def _rawStreamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWai 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) + 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(): @@ -860,7 +865,8 @@ def streamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: b Returns: Tuple[bytes, BufferedStreamReader]: First value is key, second is reader. """ - req = datatypesv2.KeyRequest(key = key, atTx = atTx, sinceTx = sinceTx, noWait = noWait, atRevision = atRevision) + 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() @@ -881,7 +887,8 @@ def streamGetFull(self, key: bytes, atTx: int = None, sinceTx: int = None, noWai Returns: datatypesv2.KeyValue: Key value from immudb """ - req = datatypesv2.KeyRequest(key = key, atTx = atTx, sinceTx = sinceTx, noWait = noWait, atRevision = atRevision) + req = datatypesv2.KeyRequest( + key=key, atTx=atTx, sinceTx=sinceTx, noWait=noWait, atRevision=atRevision) resp = self._stub.streamGet(req._getGRPC()) reader = StreamReader(resp) key = None @@ -904,13 +911,14 @@ def _make_set_stream(self, buffer, key: bytes, length: int, chunkSize: int = 655 Yields: Generator[Chunk, None, None]: Chunk that is cmpatible with proto """ - yield Chunk(content = KeyHeader(key = key, length=len(key)).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) + firstChunk = ValueChunkHeader( + chunk=firstChunk, length=length).getInBytes() + yield Chunk(content=firstChunk) chunk = buffer.read(chunkSize) while chunk: - yield Chunk(content = chunk) + yield Chunk(content=chunk) chunk = buffer.read(chunkSize) 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]: @@ -931,21 +939,22 @@ def streamScan(self, seekKey: bytes = None, endKey: bytes = None, prefix: bytes 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) + 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) + 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) + 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. @@ -969,7 +978,8 @@ def streamScanBuffered(self, seekKey: bytes = None, endKey: bytes = None, prefix 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) + 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 @@ -984,8 +994,6 @@ def streamScanBuffered(self, seekKey: bytes = None, endKey: bytes = None, prefix yield key, BufferedStreamReader(chunks, valueHeader, resp) chunk = next(chunks, None) - - def _rawStreamSet(self, generator: Generator[Union[KeyHeader, ValueChunkHeader, ValueChunk], None, None]) -> datatypesv2.TxHeader: """Helper function that grabs generator of chunks and set into immudb @@ -1010,7 +1018,8 @@ def streamSet(self, key: bytes, buffer, bufferLength: int, chunkSize: int = 6553 Returns: datatypesv2.TxHeader: Transaction header of just set transaction """ - resp = self._rawStreamSet(self._make_set_stream(buffer, key, bufferLength, chunkSize)) + 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: @@ -1024,7 +1033,8 @@ def streamSetFullValue(self, key: bytes, value: bytes, chunkSize: int = 65536) - Returns: datatypesv2.TxHeader: Transaction header """ - resp = self._rawStreamSet(self._make_set_stream(BytesIO(value), key, len(value), chunkSize)) + resp = self._rawStreamSet(self._make_set_stream( + BytesIO(value), key, len(value), chunkSize)) return resp def exportTx(self, tx: int): @@ -1142,7 +1152,6 @@ def safeSet(self, key: bytes, value: bytes): # deprecated # immudb-py only - def getAllValues(self, keys: list): # immudb-py only resp = batchGet.call(self._stub, self._rs, keys) return resp diff --git a/immudb/constants.py b/immudb/constants.py index 27599d5..43dacaf 100644 --- a/immudb/constants.py +++ b/immudb/constants.py @@ -20,8 +20,8 @@ PERMISSION_R = 1 PERMISSION_RW = 2 -PERMISSION_GRANT=0 -PERMISSION_REVOKE=1 +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 index 6a8fcd5..8d83c22 100644 --- a/immudb/dataconverter.py +++ b/immudb/dataconverter.py @@ -3,7 +3,7 @@ import immudb.datatypesv2 as datatypesv2 -def convertResponse(fromResponse, toHumanDataClass = True): +def convertResponse(fromResponse, toHumanDataClass=True): """Converts response from GRPC to python dataclass Args: @@ -18,7 +18,8 @@ def convertResponse(fromResponse, toHumanDataClass = True): for item in fromResponse: all.append(convertResponse(item)) return all - schemaFrom = datatypesv2.__dict__.get(fromResponse.__class__.__name__, None) + schemaFrom = datatypesv2.__dict__.get( + fromResponse.__class__.__name__, None) if schemaFrom: construct = dict() for field in fromResponse.ListFields(): @@ -29,4 +30,3 @@ def convertResponse(fromResponse, toHumanDataClass = True): return schemaFrom(**construct) else: return fromResponse - diff --git a/immudb/datatypesv2.py b/immudb/datatypesv2.py index d16c56d..8dcc77c 100644 --- a/immudb/datatypesv2.py +++ b/immudb/datatypesv2.py @@ -28,18 +28,22 @@ def grpcHumanizator(objectFrom, classTo): 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) + 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__) + raise Exception("Cannot get schema for", + self.__class__.__name__) def _transformDict(self, dictToTransform: Dict[str, Any]): for key in dictToTransform: @@ -58,17 +62,17 @@ 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 @@ -77,10 +81,12 @@ class User(GRPCTransformable): createdat: str = None active: bool = None + @dataclass class UserList(GRPCTransformable): users: List[User] = None + @dataclass class CreateUserRequest(GRPCTransformable): user: bytes = None @@ -88,70 +94,85 @@ class CreateUserRequest(GRPCTransformable): 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 @@ -162,6 +183,7 @@ class Entry(GRPCTransformable): expired: bool = None revision: int = None + @dataclass class Reference(GRPCTransformable): tx: int = None @@ -171,22 +193,27 @@ class Reference(GRPCTransformable): 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 @@ -195,10 +222,12 @@ class ZEntry(GRPCTransformable): score: float = None atTx: int = None + @dataclass class ZEntries(GRPCTransformable): entries: ZEntry = None + @dataclass class ScanRequest(GRPCTransformable): seekKey: bytes @@ -212,19 +241,23 @@ class ScanRequest(GRPCTransformable): 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 @@ -236,18 +269,20 @@ class TxHeader(GRPCTransformable): 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 @@ -258,6 +293,7 @@ class DualProof(GRPCTransformable): lastInclusionProof: List[bytes] = None linearProof: LinearProof = None + @dataclass class Tx(GRPCTransformable): header: TxHeader = None @@ -265,6 +301,7 @@ class Tx(GRPCTransformable): kvEntries: List[Entry] = None zEntries: List[ZEntry] = None + @dataclass class TxEntry(GRPCTransformable): key: bytes = None @@ -273,40 +310,47 @@ class TxEntry(GRPCTransformable): 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 @@ -315,45 +359,54 @@ class KeyRequest(GRPCTransformable): 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 @@ -361,6 +414,7 @@ class ImmutableState(GRPCTransformable): txHash: bytes = None signature: Signature = None + @dataclass class ReferenceRequest(GRPCTransformable): key: bytes = None @@ -370,11 +424,13 @@ class ReferenceRequest(GRPCTransformable): noWait: bool = None preconditions: List[Precondition] = None + @dataclass class VerifiableReferenceRequest(GRPCTransformable): referenceRequest: ReferenceRequest = None proveSinceTx: int = None + @dataclass class ZAddRequest(GRPCTransformable): set: bytes = None @@ -384,10 +440,12 @@ class ZAddRequest(GRPCTransformable): boundRef: bool = None noWait: bool = None + @dataclass class Score(GRPCTransformable): score: float = None + @dataclass class ZScanRequest(GRPCTransformable): set: bytes = None @@ -403,6 +461,7 @@ class ZScanRequest(GRPCTransformable): noWait: bool = None offset: int = None + @dataclass class HistoryRequest(GRPCTransformable): key: bytes = None @@ -417,6 +476,7 @@ class VerifiableZAddRequest(GRPCTransformable): zAddRequest: ZAddRequest = None proveSinceTx: int = None + @dataclass class TxRequest(GRPCTransformable): tx: int = None @@ -425,6 +485,7 @@ class TxRequest(GRPCTransformable): noWait: bool = None keepReferencesUnresolved: bool = None + @dataclass class EntriesSpec(GRPCTransformable): kvEntriesSpec: EntryTypeSpec = None @@ -436,12 +497,14 @@ class EntriesSpec(GRPCTransformable): 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 @@ -451,6 +514,7 @@ class VerifiableTxRequest(GRPCTransformable): noWait: bool = None keepReferencesUnresolved: bool = None + @dataclass class TxScanRequest(GRPCTransformable): initialTx: int = None @@ -460,32 +524,37 @@ class TxScanRequest(GRPCTransformable): sinceTx: int = None noWait: bool = None + @dataclass class TxList(GRPCTransformable): txs: List[Tx] = None + @dataclass class ExportTxRequest(GRPCTransformable): - tx: int = None + tx: int = None + @dataclass class Database(GRPCTransformable): databaseName: str = None + @dataclass class DatabaseSettings(GRPCTransformable): databaseName: str = None - replica: bool = None + replica: bool = None masterDatabase: str = None masterAddress: str = None - masterPort: int = None - followerUsername: str = None - followerPassword: 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 + maxKeyLen: int = None + maxValueLen: int = None + maxTxEntries: int = None + excludeCommitTime: bool = None + @dataclass class CreateDatabaseRequest(GRPCTransformable): @@ -503,6 +572,7 @@ class CreateDatabaseResponse(GRPCTransformable): def _getHumanDataClass(self): return grpcHumanizator(self, CreateDatabaseResponseV2) + @dataclass class CreateDatabaseResponseV2(GRPCTransformable): name: str = None @@ -515,6 +585,7 @@ class UpdateDatabaseRequest(GRPCTransformable): database: str = None settings: Union[DatabaseNullableSettings, DatabaseSettingsV2] = None + @dataclass class UpdateDatabaseResponse(GRPCTransformable): database: str = None @@ -523,27 +594,33 @@ class UpdateDatabaseResponse(GRPCTransformable): 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 @@ -552,11 +629,12 @@ def _getGRPC(self): if self.value == None: return None else: - return schema.NullableUint32(value = self.value) + return schema.NullableUint32(value=self.value) def _getHumanDataClass(self): return self.value + @dataclass class NullableUint64(GRPCTransformable): value: int = None @@ -565,24 +643,26 @@ def _getGRPC(self): if self.value == None: return None else: - return schema.NullableUint64(value = self.value) + 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) + return schema.NullableFloat(value=self.value) def _getHumanDataClass(self): return self.value + @dataclass class NullableBool(GRPCTransformable): value: bool = None @@ -592,13 +672,14 @@ def _getGRPC(self): if self.value == None: return None else: - return schema.NullableBool(value = self.value) + 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 @@ -607,103 +688,112 @@ def _getGRPC(self): if self.value == None: return None else: - return schema.NullableString(value = self.value) + 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) + 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 + 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 + 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() + 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 + 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() + 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 @@ -711,31 +801,33 @@ class AHTSettings(GRPCTransformable): def _getGRPC(self): return schema.AHTNullableSettings( - syncThreshold = NullableUint32(self.syncThreshold)._getGRPC(), - writeBufferSize = NullableUint32(self.writeBufferSize)._getGRPC() + 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 + 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: @@ -748,59 +840,65 @@ def _getGRPC(self): 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 + 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 + 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 + 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 @@ -809,55 +907,67 @@ class AHTNullableSettings(GRPCTransformable): 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 + 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 @@ -865,6 +975,7 @@ class SQLEntry(GRPCTransformable): value: bytes = None metadata: KVMetadata = None + @dataclass class VerifiableSQLEntry(GRPCTransformable): sqlEntry: SQLEntry = None @@ -878,14 +989,17 @@ class VerifiableSQLEntry(GRPCTransformable): ColTypesById: Dict[int, str] = None ColLenById: Dict[int, int] = None + @dataclass class UseDatabaseReply(GRPCTransformable): token: str = None + class PermissionAction(Enum): GRANT = 0 REVOK = 1 + @dataclass class ChangePermissionRequest(GRPCTransformable): action: PermissionAction = None @@ -893,25 +1007,30 @@ class ChangePermissionRequest(GRPCTransformable): 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]) + return DatabaseListResponseV2(databases=[toConvert._getHumanDataClass() for toConvert in self.databases]) + @dataclass class DatabaseWithSettings(GRPCTransformable): @@ -921,43 +1040,52 @@ class DatabaseWithSettings(GRPCTransformable): 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 @@ -971,17 +1099,21 @@ 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 @@ -997,6 +1129,7 @@ class TxMode(Enum): WriteOnly = 1 ReadWrite = 2 + @dataclass class NewTxRequest(GRPCTransformable): mode: TxMode = None @@ -1004,17 +1137,20 @@ class NewTxRequest(GRPCTransformable): @dataclass class NewTxResponse(GRPCTransformable): - transactionID : str = None + 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 \ No newline at end of file + retry_delay: int = None diff --git a/immudb/streamsutils.py b/immudb/streamsutils.py index ba8942b..b3e5d37 100644 --- a/immudb/streamsutils.py +++ b/immudb/streamsutils.py @@ -2,6 +2,7 @@ from dataclasses import dataclass import io + @dataclass class KeyHeader: key: bytes @@ -15,14 +16,17 @@ def getInBytes(self): 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 @@ -38,13 +42,13 @@ def __init__(self, stream): def parseHeader(self, header: bytes): length = int.from_bytes(header[0:8], byteorder='big') - return KeyHeader(length = length, key = header[8:]) + 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) + return ValueChunk(chunk=header[8:], left=self.left) def chunks(self): for chunk in self.streamToRead: @@ -63,12 +67,12 @@ def valueHeaderReader(self, chunk): def valueReader(self, chunk): self.left = self.left - len(chunk.content) - readed = ValueChunk(chunk = chunk.content, left = self.left) + readed = ValueChunk(chunk=chunk.content, left=self.left) if(self.left == 0): self.reader = self.headerReader return readed - + class BufferedStreamReader: def __init__(self, chunksGenerator, valueHeader: ValueChunk, stream): self.chunksGenerator = chunksGenerator @@ -81,12 +85,12 @@ def __init__(self, chunksGenerator, valueHeader: ValueChunk, stream): def __len__(self): return self.size - + def _read_new_chunk(self): nextChunk = next(self.chunksGenerator, None) if(not nextChunk): self.currentChunk = None - return + return self.currentChunk = nextChunk.chunk self.currentChunkOffset = 0 self.currentChunkLength = len(self.currentChunk) @@ -104,13 +108,13 @@ def read(self, length: int = None) -> bytes: self._read_new_chunk() if self.currentChunk == None: self.readed = self.readed + len(bytesToReturn) - return bytesToReturn + return bytesToReturn self.currentChunkOffset = length - len(bytesToReturn) - bytesToReturn = bytesToReturn + self.currentChunk[0:self.currentChunkOffset] + bytesToReturn = bytesToReturn + \ + self.currentChunk[0:self.currentChunkOffset] self.readed = self.readed + length return bytesToReturn def close(self): self.stream.cancel() - From b42d6732e56168ff8aa0d6f56fd6e5bed990f4a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Mon, 12 Sep 2022 00:22:46 +0200 Subject: [PATCH 18/38] Added skips for older immudb versions --- tests/conftest.py | 2 +- tests/immu/test_create_load_database_v2.py | 31 +++++++++++++++++----- tests/immu/test_database_health.py | 8 +++++- tests/immu/test_export_tx.py | 7 ++++- tests/immu/test_flush_index.py | 6 ++++- tests/immu/test_server_info.py | 7 ++++- tests/immu/test_tx_scan.py | 7 ++++- 7 files changed, 56 insertions(+), 12 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index a914ffe..06743e6 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"] +TESTURLS = ["localhost:3322", "localhost:3333", "localhost:3344"] @pytest.fixture(scope="module") diff --git a/tests/immu/test_create_load_database_v2.py b/tests/immu/test_create_load_database_v2.py index 700d7d5..904af88 100644 --- a/tests/immu/test_create_load_database_v2.py +++ b/tests/immu/test_create_load_database_v2.py @@ -3,9 +3,13 @@ from immudb.datatypesv2 import CreateDatabaseRequest, DatabaseNullableSettings, DatabaseSettingsV2, NullableUint32, NullableBool import uuid import pytest +from tests.immuTestClient import ImmuTestClient -def test_create_database_v2(client: ImmudbClient): +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 @@ -32,7 +36,10 @@ def test_create_database_v2(client: ImmudbClient): with pytest.raises(RpcError): client.set(('x' * 32).encode("utf-8"), b'x') -def test_update_database_v2(client: ImmudbClient): +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) @@ -74,7 +81,10 @@ def test_update_database_v2(client: ImmudbClient): assert foundDb == True -def test_list_databases_v2(client: ImmudbClient): +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 @@ -101,7 +111,10 @@ def test_list_databases_v2(client: ImmudbClient): assert foundDb == True -def test_load_unload_database(client: ImmudbClient): +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 @@ -116,7 +129,10 @@ def test_load_unload_database(client: ImmudbClient): assert resp.database == name client.useDatabase(resp.database) -def test_delete_database(client: ImmudbClient): +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 @@ -132,7 +148,10 @@ def test_delete_database(client: ImmudbClient): with pytest.raises(RpcError): resp = client.set(b"x", b"y") -def test_get_database_settings_v2(client: ImmudbClient): +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 diff --git a/tests/immu/test_database_health.py b/tests/immu/test_database_health.py index 5a7a58e..b14a86e 100644 --- a/tests/immu/test_database_health.py +++ b/tests/immu/test_database_health.py @@ -1,6 +1,12 @@ from immudb import ImmudbClient import datetime -def test_database_health(client: ImmudbClient): +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") # login into database is counted as request completed response1 = client.databaseHealth() diff --git a/tests/immu/test_export_tx.py b/tests/immu/test_export_tx.py index 60b8637..696eba0 100644 --- a/tests/immu/test_export_tx.py +++ b/tests/immu/test_export_tx.py @@ -2,8 +2,13 @@ from immudb import ImmudbClient, datatypesv2 import uuid import time +from tests.immuTestClient import ImmuTestClient +import pytest -def test_export_tx_replicate_tx(client: ImmudbClient): +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) diff --git a/tests/immu/test_flush_index.py b/tests/immu/test_flush_index.py index c051117..5624a76 100644 --- a/tests/immu/test_flush_index.py +++ b/tests/immu/test_flush_index.py @@ -1,8 +1,12 @@ from grpc import RpcError from immudb import ImmudbClient import pytest +from tests.immuTestClient import ImmuTestClient -def test_flush_index(client: ImmudbClient): +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): diff --git a/tests/immu/test_server_info.py b/tests/immu/test_server_info.py index cac13a3..8f7bfd5 100644 --- a/tests/immu/test_server_info.py +++ b/tests/immu/test_server_info.py @@ -1,6 +1,11 @@ +import pytest from immudb import ImmudbClient from immudb.datatypesv2 import EntriesSpec, EntryTypeAction, EntryTypeSpec -def test_server_info(client: ImmudbClient): +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 != "" diff --git a/tests/immu/test_tx_scan.py b/tests/immu/test_tx_scan.py index a370d32..edd9ba2 100644 --- a/tests/immu/test_tx_scan.py +++ b/tests/immu/test_tx_scan.py @@ -1,6 +1,11 @@ +import pytest from immudb import ImmudbClient from immudb.datatypesv2 import EntriesSpec, EntryTypeAction, EntryTypeSpec -def test_tx_scan(client: ImmudbClient): +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") From bc979ec6da282816979549dade24fbed8b60f5ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Mon, 12 Sep 2022 08:51:35 +0200 Subject: [PATCH 19/38] Autopep8 fixes --- immudb/datatypesv2.py | 12 ++++++------ immudb/streamsutils.py | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/immudb/datatypesv2.py b/immudb/datatypesv2.py index 8dcc77c..4cd923d 100644 --- a/immudb/datatypesv2.py +++ b/immudb/datatypesv2.py @@ -21,9 +21,9 @@ def grpcHumanizator(objectFrom, classTo): finalKWArgs = dict() for key in objectFrom.__dict__.keys(): - if(objectFrom.__dict__[key] != None and isinstance(objectFrom.__dict__[key], GRPCTransformable)): + if (objectFrom.__dict__[key] != None and isinstance(objectFrom.__dict__[key], GRPCTransformable)): finalKWArgs[key] = objectFrom.__dict__[key]._getHumanDataClass() - elif(objectFrom.__dict__[key] != None): + elif (objectFrom.__dict__[key] != None): finalKWArgs[key] = objectFrom.__dict__[key] else: finalKWArgs[key] = None @@ -34,7 +34,7 @@ class GRPCTransformable: def _getGRPC(self): transformed = self._transformDict(self.__dict__) schemaFrom = schema.__dict__.get(self.__class__.__name__, None) - if(schemaFrom): + if (schemaFrom): return schemaFrom(**transformed) else: # Special case. Message could be nested inside Precondition schema schemaFrom = schema.__dict__["Precondition"].__dict__.get( @@ -48,13 +48,13 @@ def _getGRPC(self): def _transformDict(self, dictToTransform: Dict[str, Any]): for key in dictToTransform: currentValue = dictToTransform[key] - if(isinstance(currentValue, GRPCTransformable)): + if (isinstance(currentValue, GRPCTransformable)): dictToTransform[key] = currentValue._getGRPC() - elif(isinstance(currentValue, list)): + 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)): + elif (isinstance(currentValue, Enum)): dictToTransform[key] = currentValue.value return dictToTransform diff --git a/immudb/streamsutils.py b/immudb/streamsutils.py index b3e5d37..2f16e72 100644 --- a/immudb/streamsutils.py +++ b/immudb/streamsutils.py @@ -61,14 +61,14 @@ def headerReader(self, chunk): def valueHeaderReader(self, chunk): self.reader = self.valueReader readed = self.parseValueHeader(chunk.content) - if(self.left == 0): + 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): + if (self.left == 0): self.reader = self.headerReader return readed @@ -88,7 +88,7 @@ def __len__(self): def _read_new_chunk(self): nextChunk = next(self.chunksGenerator, None) - if(not nextChunk): + if (not nextChunk): self.currentChunk = None return self.currentChunk = nextChunk.chunk @@ -98,13 +98,13 @@ def _read_new_chunk(self): def read(self, length: int = None) -> bytes: if length == None: length = self.size - if(self.readed >= self.size): + if (self.readed >= self.size): return None - if(self.readed + length >= self.size): + 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): + while (len(bytesToReturn) < length): self._read_new_chunk() if self.currentChunk == None: self.readed = self.readed + len(bytesToReturn) From 8fa332a13b803ca6ccf387cfe2927eddff3ed407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Mon, 12 Sep 2022 09:35:56 +0200 Subject: [PATCH 20/38] Autopep fixes --- immudb/datatypesv2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/immudb/datatypesv2.py b/immudb/datatypesv2.py index 4cd923d..9c07099 100644 --- a/immudb/datatypesv2.py +++ b/immudb/datatypesv2.py @@ -52,7 +52,7 @@ def _transformDict(self, dictToTransform: Dict[str, Any]): dictToTransform[key] = currentValue._getGRPC() elif (isinstance(currentValue, list)): for index in range(0, len(currentValue)): - if(isinstance(currentValue[index], GRPCTransformable)): + if (isinstance(currentValue[index], GRPCTransformable)): currentValue[index] = currentValue[index]._getGRPC() elif (isinstance(currentValue, Enum)): dictToTransform[key] = currentValue.value From 81f887e99feeb9af174cd67ac5823ddcc48b1bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Mon, 12 Sep 2022 11:55:04 +0200 Subject: [PATCH 21/38] removed unused imports --- immudb/datatypesv2.py | 3 +-- immudb/streamsutils.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/immudb/datatypesv2.py b/immudb/datatypesv2.py index 9c07099..63e2f4d 100644 --- a/immudb/datatypesv2.py +++ b/immudb/datatypesv2.py @@ -11,8 +11,7 @@ # limitations under the License. from __future__ import annotations from dataclasses import dataclass -from enum import Enum, IntEnum -from this import d +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 diff --git a/immudb/streamsutils.py b/immudb/streamsutils.py index 2f16e72..5b12eff 100644 --- a/immudb/streamsutils.py +++ b/immudb/streamsutils.py @@ -1,6 +1,5 @@ from dataclasses import dataclass -import io @dataclass From 5f80d7e2ea60b83f49b84b907330866cc36d15c1 Mon Sep 17 00:00:00 2001 From: Nick Anderegg Date: Thu, 13 Oct 2022 16:45:41 -0400 Subject: [PATCH 22/38] docs(ImmudbClient): revise and reformat docstring --- immudb/client.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index f6133cd..398d549 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -43,14 +43,20 @@ class ImmudbClient: def __init__(self, immudUrl=None, rs: RootService = None, publicKeyFile: str = None, timeout=None, max_grpc_message_length=None): - """Immudb client + """immudb Client Args: - immudbUrl (str, optional): url in format host:port, ex. localhost:3322 pointing to your immudb instance. Defaults to None. - rs (RootService, optional): object that implements RootService - to be allow to verify requests. Defaults to None. - publicKeyFile (str, optional): path to the public key that would be used to authenticate requests with. Defaults to None. - timeout (int, optional): global timeout for GRPC requests, if None - it would hang until server respond. Defaults to None. - max_grpc_message_length (int, optional): max size for message from the server. If None - it would set defaults (4mb). + 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. + 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" From f10095428a8b7f957e76a57ebbc4b73f8b0e4b99 Mon Sep 17 00:00:00 2001 From: Nick Anderegg Date: Thu, 13 Oct 2022 18:04:45 -0400 Subject: [PATCH 23/38] docs(openSession, openManagedSession): revise docstring --- immudb/client.py | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index 398d549..f1a9276 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -235,20 +235,28 @@ def keepAlive(self): self._stub.KeepAlive(google_dot_protobuf_dot_empty__pb2.Empty()) def openManagedSession(self, username, password, database=b"defaultdb", keepAliveInterval=60): - """Opens managed session and returns ManagedSession object within you can manage SQL transactions + """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. - example of usage: - with client.openManagedSession(username, password) as session: - session.newTx() + + 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): name of database. Defaults to b"defaultdb". - keepAliveInterval (int, optional): specifies how often keep alive packet should be sent. Defaults to 60. + 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 @@ -282,13 +290,20 @@ def __exit__(this, type, value, traceback): return ManagedSession(keepAliveInterval) def openSession(self, username, password, database=b"defaultdb"): - """Opens unmanaged session. Unmanaged means that you have to send keep alive packets yourself. - Managed session does it for you + """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 openManagedSession instead. Args: username (str): username password (str): password - database (bytes, optional): database name to switch to. Defaults to b"defaultdb". + database (bytes, optional): database name to switch to. + Defaults to ``b"defaultdb"``. Returns: Tx: Tx object (handlers/transaction.py) From 2679cffc7f6d1221ce97e2cf80ac79d0437f6bfd Mon Sep 17 00:00:00 2001 From: Nick Anderegg Date: Thu, 13 Oct 2022 18:57:01 -0400 Subject: [PATCH 24/38] docs(ImmudbClient.*): revise and clarify docstrings for various methods --- immudb/client.py | 82 ++++++++++++++++++++++++++++++++++-------------- 1 file changed, 58 insertions(+), 24 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index f1a9276..946ed7f 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -297,12 +297,12 @@ def openSession(self, username, password, database=b"defaultdb"): when you are also managing your application's threading yourself. To have the client manage the session and send keepalive packets - for you, use openManagedSession instead. + for you, use :meth:`ImmudbClient.openManagedSession()` instead. Args: username (str): username password (str): password - database (bytes, optional): database name to switch to. + database (bytes, optional): database to establish session with. Defaults to ``b"defaultdb"``. Returns: @@ -346,10 +346,18 @@ def createUser(self, user, password, permission, database): return createUser.call(self._stub, self._rs, request) def listUsers(self): - """Returns all users on database + """Returns all database users. Returns: - ListUserResponse: List containing all users + 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) @@ -408,7 +416,7 @@ def createDatabaseV2(self, name: str, settings: datatypesv2.DatabaseSettingsV2, Args: name (str): Name of database settings (datatypesv2.DatabaseSettingsV2): Settings of database - ifNotExists (bool): would only create database if it not exist + ifNotExists (bool): only create a database if it does not exist yet. Returns: datatypesv2.CreateDatabaseResponseV2: Response contains information about new database @@ -520,11 +528,19 @@ def setActiveUser(self, active: bool, username: str) -> bool: return resp == google_dot_protobuf_dot_empty__pb2.Empty() def flushIndex(self, cleanupPercentage: float, synced: bool) -> datatypesv2.FlushIndexResponse: - """Routine that creates a fresh index based on the current state, removing all intermediate data generated over time + """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 how much space will be scanned for unreferenced data. Even though this operation blocks transaction processing, choosing a small percentage e.g. 0.1 may not significantly hinder normal operations while reducing used storage space. - synced (bool): If true, fsync after writing data to avoid index regeneration in the case of an unexpected crash + 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 @@ -549,10 +565,10 @@ def health(self): return health.call(self._stub, self._rs) def currentState(self) -> State: - """Return current state of immudb (proof) + """Return current state (proof) of current database. Returns: - State: state of immudb + State: State of current database, proving integrity of its data. """ return currentRoot.call(self._stub, self._rs, None) @@ -596,35 +612,52 @@ def expireableSet(self, key: bytes, value: bytes, expiresAt: datetime.datetime) return setValue.call(self._stub, self._rs, key, value, metadata) def get(self, key: bytes, atRevision: int = None) -> datatypes.GetResponse: - """Gets value for key + """Get value for key. Args: - key (bytes): key - atRevision (int, optional): gets value at revision specified by this argument. It could be relative (-1, -2), or fixed (32). Defaults to None. + 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 + 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 compares with saved state + """Get value for key and verify it against saved state. Args: - key (bytes): Key to retrieve - atRevision (int, optional): Retrieve key at desired revision. -1, -2... -n to get relative revision. Defaults to None. + 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: - datatypes.SafeGetResponse: object that contains informations about transaction and verified state + 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 verifiedGetSince(self, key: bytes, sinceTx: int) -> datatypes.SafeGetResponse: - """Get value for key since tx (immudb will wait that the transaction specified by sinceTx is processed) + """Get value for key since a given transaction (and wait if that transaction is not yet indexed). + + 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. Args: - key (bytes): Key to retrieve - sinceTx (int): transaction id (immudb will wait that the transaction specified by sinceTx is processed) + 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. Returns: datatypes.SafeGetResponse: object that contains informations about transaction and verified state @@ -632,11 +665,12 @@ def verifiedGetSince(self, key: bytes, sinceTx: int) -> datatypes.SafeGetRespons return verifiedGet.call(self._stub, self._rs, key, sinceTx=sinceTx, verifying_key=self._vk) def verifiedGetAt(self, key: bytes, atTx: int) -> datatypes.SafeGetResponse: - """Get value at specified transaction + """Get value for key at a given transaction point. Args: - key (bytes): key to retrieve - atTx (int): at transaction point + key (bytes): Key of value to retrieve. + atTx (int): Identifier of the transaction at which point the key's + value should be retrieved. Returns: datatypes.SafeGetResponse: object that contains informations about transaction and verified state From 4039e5e16cca1d2254b3adccb4fe029076aafaf1 Mon Sep 17 00:00:00 2001 From: Nick Anderegg Date: Thu, 13 Oct 2022 19:42:26 -0400 Subject: [PATCH 25/38] docs(ImmudbClient.*): revise docstrings --- immudb/client.py | 54 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 37 insertions(+), 17 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index 946ed7f..8ec1204 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -91,7 +91,7 @@ def loadKeyFromString(self, key: str): """Loads public key from parameter Args: - key (str): key + key (str): key """ self._vk = ecdsa.VerifyingKey.from_pem(key) @@ -479,7 +479,7 @@ def updateDatabaseV2(self, database: str, settings: datatypesv2.DatabaseSettings """Updates database with provided argument Args: - database (str): Name of database + database (str): Name of database settings (datatypesv2.DatabaseSettingsV2): Settings of database Returns: @@ -550,7 +550,17 @@ def flushIndex(self, cleanupPercentage: float, synced: bool) -> datatypesv2.Flus return dataconverter.convertResponse(resp) def compactIndex(self): - """Starts full async index compaction - Routine that creates a fresh index based on the current state, removing all intermediate data generated over time + """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()) @@ -678,13 +688,20 @@ def verifiedGetAt(self, key: bytes, atTx: int) -> datatypes.SafeGetResponse: 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 key + """Returns history of values for a given key. Args: - key (bytes): Key to retrieve + key (bytes): Key of value to retrieve. offset (int): Offset of history limit (int): Limit of history entries - sortorder (bool): Sort order of history + 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 @@ -692,16 +709,17 @@ def history(self, key: bytes, offset: int, limit: int, sortorder: bool) -> List[ 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 + """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 - current transaction + 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 + datatypes.SetResponse: Set response contains transaction id """ return zadd.call(self._stub, self._rs, zset, score, key, atTx) @@ -713,10 +731,11 @@ def verifiedZAdd(self, zset: bytes, score: float, key: bytes, atTx: int = 0): zset (bytes): collection name score (float): score key (bytes): key name - atTx (int, optional): transaction id to bound score to. Defaults to 0 - current transaction + 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 + datatypes.SetResponse: Set response contains transaction id """ return verifiedzadd.call(self._stub, self._rs, zset, score, key, atTx, self._vk) @@ -788,7 +807,8 @@ def txScan(self, initialTx: int, limit: int = 999, desc: bool = False, entriesSp Args: initialTx (int): initial transaction id limit (int, optional): Limit resulsts. Defaults to 999. - desc (bool, optional): Descending or ascending. Defaults to False. + 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. @@ -828,7 +848,7 @@ def setAll(self, kv: Dict[bytes, bytes]) -> datatypes.SetResponse: kv (Dict[bytes, bytes]): dictionary of keys and values Returns: - datatypes.SetResponse: Set response contains transaction id + datatypes.SetResponse: Set response contains transaction id """ return batchSet.call(self._stub, self._rs, kv) @@ -836,7 +856,7 @@ def getAll(self, keys: List[bytes]) -> Dict[bytes, bytes]: """Returns values for specified keys Args: - keys (List[bytes]): Keys list + keys (List[bytes]): Keys list Returns: Dict[bytes, bytes]: Dictionary of key : value pairs @@ -905,7 +925,7 @@ def _rawStreamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWai 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. + """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 @@ -918,7 +938,7 @@ def streamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: b 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. + Tuple[bytes, BufferedStreamReader]: First value is key, second is reader. """ req = datatypesv2.KeyRequest( key=key, atTx=atTx, sinceTx=sinceTx, noWait=noWait, atRevision=atRevision) @@ -1062,7 +1082,7 @@ def _rawStreamSet(self, generator: Generator[Union[KeyHeader, ValueChunkHeader, return dataconverter.convertResponse(resp) def streamSet(self, key: bytes, buffer, bufferLength: int, chunkSize: int = 65536) -> datatypesv2.TxHeader: - """Sets key into value with streaming method. + """Sets key into value with streaming method. Args: key (bytes): Key From 50e437a30aa2536d7a90923a2b175ed94cb83a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Thu, 20 Oct 2022 10:52:26 +0200 Subject: [PATCH 26/38] Add license --- immudb/dataconverter.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/immudb/dataconverter.py b/immudb/dataconverter.py index 8d83c22..afa426e 100644 --- a/immudb/dataconverter.py +++ b/immudb/dataconverter.py @@ -1,4 +1,14 @@ +# 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 From 07780c9062a88061d842c99cf33e0d7a28e87c02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Thu, 20 Oct 2022 10:57:23 +0200 Subject: [PATCH 27/38] Adding comments --- immudb/client.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index 8ec1204..8300039 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -50,7 +50,8 @@ def __init__(self, immudUrl=None, rs: RootService = None, publicKeyFile: str = N (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. + 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 @@ -256,7 +257,7 @@ def openManagedSession(self, username, password, database=b"defaultdb", keepAliv 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``. + packets should be sent, in seconds. Defaults to ``60s``. Returns: ManagedSession: managed Session object @@ -369,6 +370,12 @@ def changePassword(self, user, newPassword, oldPassword): 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'), From 8e7afe224efac4e3a04fe7d9f8c10ab7dad28c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Thu, 20 Oct 2022 11:08:27 +0200 Subject: [PATCH 28/38] VerifiableSQL --- immudb/client.py | 6 +++++- immudb/datatypesv2.py | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/immudb/client.py b/immudb/client.py index 9c0cf75..e7c0292 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -23,7 +23,7 @@ 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.rootService import * from immudb.grpc import schema_pb2_grpc import warnings @@ -1140,6 +1140,10 @@ def safeSet(self, key: bytes, value: bytes): # deprecated ) return verifiedSet.call(self._stub, self._rs, key, value) + def verifiableSQLGet(self, table, primaryKeys, atTx = None, sinceTx = None): + return verifiedSQLGet.call(self._stub, self._rs, table, primaryKeys, atTx, sinceTx, verifying_key=self._vk) + + # immudb-py only diff --git a/immudb/datatypesv2.py b/immudb/datatypesv2.py index d16c56d..dcef323 100644 --- a/immudb/datatypesv2.py +++ b/immudb/datatypesv2.py @@ -991,6 +991,21 @@ class SQLValue(GRPCTransformable): 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) + + class TxMode(Enum): ReadOnly = 0 From ea8a460917ed7ead822f921cdcc06fbdf3696536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Thu, 20 Oct 2022 13:45:13 +0200 Subject: [PATCH 29/38] VerifiedSQL, 1.4.0 bump --- .github/workflows/ci.yml | 7 +- immudb/datatypesv2.py | 24 +++++ immudb/embedded/store/verification.py | 108 ++++++++++++++++++++- immudb/exceptions.py | 9 ++ immudb/handler/verifiedSQLGet.py | 132 ++++++++++++++++++++++++++ setup.py | 2 +- tests/conftest.py | 3 +- tests/immu/test_database_health.py | 3 +- tests/immu/test_sql_verify.py | 113 ++++++++++++++++++++++ tests/starttestcontainers.sh | 7 +- 10 files changed, 398 insertions(+), 10 deletions(-) create mode 100644 immudb/handler/verifiedSQLGet.py create mode 100644 tests/immu/test_sql_verify.py 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/datatypesv2.py b/immudb/datatypesv2.py index 9cc278c..404f189 100644 --- a/immudb/datatypesv2.py +++ b/immudb/datatypesv2.py @@ -987,6 +987,7 @@ class VerifiableSQLEntry(GRPCTransformable): ColIdsByName: Dict[str, int] = None ColTypesById: Dict[int, str] = None ColLenById: Dict[int, int] = None + verified: bool = False @dataclass @@ -1136,6 +1137,29 @@ class PrimaryKeyIntValue(GRPCTransformable, PrimaryKey): 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): diff --git a/immudb/embedded/store/verification.py b/immudb/embedded/store/verification.py index fb42e91..4247944 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,105 @@ 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) + intVal = round(int(parsed.timestamp() * 1e9), -3) # UnixNano from GO not compatible with python, need to round last int + + encv = bytearray() + encv += KeyValPrefixNotNull + encv += int.to_bytes(intVal, 8, "big") + encv[1] = ord(encv[1:2]) ^ ord(b'\x80') + for x in encv: + print(x, end = " ") + return bytes(encv) \ No newline at end of file diff --git a/immudb/exceptions.py b/immudb/exceptions.py index cfb0b5d..f113505 100644 --- a/immudb/exceptions.py +++ b/immudb/exceptions.py @@ -49,3 +49,12 @@ class ErrMetadataUnsupported(Exception): class ErrPySDKInvalidColumnMode(Exception): pass + +class ErrInvalidValue(Exception): + pass + +class ErrMaxKeyLengthExceeded(Exception): + pass + +class ErrMaxLengthExceeded(Exception): + pass \ No newline at end of file diff --git a/immudb/handler/verifiedSQLGet.py b/immudb/handler/verifiedSQLGet.py new file mode 100644 index 0000000..8049b22 --- /dev/null +++ b/immudb/handler/verifiedSQLGet.py @@ -0,0 +1,132 @@ +# 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 pyrsistent import b +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 import datatypes +from immudb.exceptions import ErrCorruptedData +import immudb.database as database +import immudb.schema as schema +from typing import List +from immudb import datatypesv2 +from immudb.dataconverter import convertResponse + + +import sys +import time + + +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/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..0e1192b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,7 +15,8 @@ # 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"] +# TESTURLS = ["localhost:3322"] @pytest.fixture(scope="module") diff --git a/tests/immu/test_database_health.py b/tests/immu/test_database_health.py index b14a86e..a57ad6a 100644 --- a/tests/immu/test_database_health.py +++ b/tests/immu/test_database_health.py @@ -8,7 +8,8 @@ def test_database_health(wrappedClient: ImmuTestClient): if(not wrappedClient.serverHigherOrEqualsToVersion("1.2.0")): pytest.skip("Immudb version too low") timeNow = datetime.datetime.now() - client.login("immudb", "immudb", "defaultdb") # login into database is counted as request completed + 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) 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/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 From 8fc5e965167eeb90a1ab64a93f79d647bd154e2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Thu, 20 Oct 2022 13:46:46 +0200 Subject: [PATCH 30/38] removed unused dependency --- immudb/handler/verifiedSQLGet.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/immudb/handler/verifiedSQLGet.py b/immudb/handler/verifiedSQLGet.py index 8049b22..f7b4f5d 100644 --- a/immudb/handler/verifiedSQLGet.py +++ b/immudb/handler/verifiedSQLGet.py @@ -10,14 +10,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -from pyrsistent import b 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 import datatypes from immudb.exceptions import ErrCorruptedData -import immudb.database as database import immudb.schema as schema from typing import List from immudb import datatypesv2 From 40ac334d69e17cedad27e5dbd7ceaf3347748fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Thu, 20 Oct 2022 16:31:06 +0200 Subject: [PATCH 31/38] StreamHistory, StreamZScan --- immudb/client.py | 139 +++++++++++++++++++++++++++++++++++--- immudb/datatypesv2.py | 7 ++ immudb/streamsutils.py | 86 +++++++++++++++++++++++ tests/immu/test_stream.py | 92 +++++++++++++++++++++++++ tests/immu/test_zfunc.py | 2 +- 5 files changed, 316 insertions(+), 10 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index 398ad7f..beeb0bb 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -37,7 +37,7 @@ import datetime -from immudb.streamsutils import KeyHeader, StreamReader, ValueChunk, ValueChunkHeader, BufferedStreamReader +from immudb.streamsutils import AtTXHeader, KeyHeader, ScoreHeader, SetHeader, StreamReader, ValueChunk, ValueChunkHeader, BufferedStreamReader, ZScanStreamReader class ImmudbClient: @@ -952,9 +952,10 @@ def streamGet(self, key: bytes, atTx: int = None, sinceTx: int = None, noWait: b resp = self._stub.streamGet(req._getGRPC()) reader = StreamReader(resp) chunks = reader.chunks() - keyHeader = next(chunks) - valueHeader = next(chunks) - return keyHeader.key, BufferedStreamReader(chunks, valueHeader, resp) + 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 @@ -976,10 +977,46 @@ def streamGetFull(self, key: bytes, atTx: int = None, sinceTx: int = None, noWai key = None value = b'' chunks = reader.chunks() - key = next(chunks).key - for it in chunks: - value += it.chunk - return datatypesv2.KeyValue(key, value) + chunk = next(chunks, None) + if chunk != None: + key = chunk.key + for it in chunks: + value += it.chunk + return datatypesv2.KeyValue(key, value) + + + def streamHistory(self, key: bytes, offset: int = None, sinceTx: int = None, limit: int = None, desc: bool = None): + 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): + 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 @@ -1003,6 +1040,90 @@ def _make_set_stream(self, buffer, key: bytes, length: int, chunkSize: int = 655 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[datatypesv2.ZScanEntry, None, None]: + 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 = None, offset: int = None ) -> Generator[datatypesv2.ZScanEntry, None, None]: + 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 @@ -1068,7 +1189,7 @@ def streamScanBuffered(self, seekKey: bytes = None, endKey: bytes = None, prefix streamReader = StreamReader(resp) chunks = streamReader.chunks() - chunk = next(chunks) + chunk = next(chunks, None) while chunk != None: if isinstance(chunk, KeyHeader): key = chunk.key diff --git a/immudb/datatypesv2.py b/immudb/datatypesv2.py index 404f189..dfa6db9 100644 --- a/immudb/datatypesv2.py +++ b/immudb/datatypesv2.py @@ -221,6 +221,13 @@ class ZEntry(GRPCTransformable): 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): diff --git a/immudb/streamsutils.py b/immudb/streamsutils.py index 5b12eff..0620ec2 100644 --- a/immudb/streamsutils.py +++ b/immudb/streamsutils.py @@ -1,5 +1,7 @@ from dataclasses import dataclass +import struct +from this import s @dataclass @@ -11,6 +13,22 @@ def getInBytes(self): return self.length.to_bytes(8, 'big') + self.key +@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 @@ -72,6 +90,74 @@ def valueReader(self, chunk): 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 diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index 844e256..fff8dbd 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -449,3 +449,95 @@ def test_stream_set(client: ImmudbClient): 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 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 From 58ae1b7cb76d2b1f0ccd0399c447ffcea5cc8bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Thu, 20 Oct 2022 18:43:53 +0200 Subject: [PATCH 32/38] stream verifiable get, stream zscan --- immudb/client.py | 61 +++++++++++++++++++++++++++- immudb/handler/verifiedGet.py | 3 -- immudb/handler/verifiedSQLGet.py | 5 --- immudb/handler/verifiedtxbyid.py | 31 ++++++++------ immudb/streamsutils.py | 70 +++++++++++++++++++++++++++++++- tests/immu/test_stream.py | 53 ++++++++++++++++++++++++ 6 files changed, 200 insertions(+), 23 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index beeb0bb..59f8b3b 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -17,6 +17,7 @@ from immudb import grpcutils from immudb import datatypes +from immudb.exceptions import ErrCorruptedData from immudb.grpc.schema_pb2 import Chunk, TxHeader from immudb.handler import (batchGet, batchSet, changePassword, changePermission, createUser, currentRoot, createDatabase, databaseList, deleteKeys, useDatabase, @@ -24,6 +25,8 @@ scan, reference, verifiedreference, zadd, verifiedzadd, zscan, healthcheck, health, txbyid, verifiedtxbyid, sqlexec, sqlquery, 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 @@ -37,7 +40,7 @@ import datetime -from immudb.streamsutils import AtTXHeader, KeyHeader, ScoreHeader, SetHeader, StreamReader, ValueChunk, ValueChunkHeader, BufferedStreamReader, ZScanStreamReader +from immudb.streamsutils import AtTXHeader, KeyHeader, ScoreHeader, SetHeader, StreamReader, ValueChunk, ValueChunkHeader, BufferedStreamReader, VerifiedGetStreamReader, ZScanStreamReader class ImmudbClient: @@ -984,6 +987,62 @@ def streamGetFull(self, key: bytes, atTx: int = None, sinceTx: int = None, noWai 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): + 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): + 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): request = datatypesv2.HistoryRequest(key = key, offset = offset, limit = limit, desc = desc, sinceTx = sinceTx) 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 index f7b4f5d..961b5d9 100644 --- a/immudb/handler/verifiedSQLGet.py +++ b/immudb/handler/verifiedSQLGet.py @@ -20,11 +20,6 @@ from immudb import datatypesv2 from immudb.dataconverter import convertResponse - -import sys -import time - - 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] diff --git a/immudb/handler/verifiedtxbyid.py b/immudb/handler/verifiedtxbyid.py index 482ecbe..49f1c46 100644 --- a/immudb/handler/verifiedtxbyid.py +++ b/immudb/handler/verifiedtxbyid.py @@ -19,25 +19,14 @@ from immudb.embedded import store 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 sourcealh = schema.DigestFromProto(state.txHash) targetid = vtx.tx.header.id targetalh = dualProof.targetTxHeader.Alh() + print(sourceid, sourcealh, targetid, targetalh) else: sourceid = vtx.tx.header.id sourcealh = dualProof.sourceTxHeader.Alh() @@ -66,3 +55,19 @@ 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 index 0620ec2..cd0ab2e 100644 --- a/immudb/streamsutils.py +++ b/immudb/streamsutils.py @@ -2,12 +2,17 @@ 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 @@ -37,7 +42,6 @@ class ValueChunkHeader: def getInBytes(self): return self.length.to_bytes(8, 'big') + self.chunk - @dataclass class ValueChunk: chunk: bytes @@ -50,6 +54,70 @@ class FullKeyValue: 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 diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index fff8dbd..2b72b02 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -418,6 +418,13 @@ def test_stream_get_full(client: ImmudbClient): 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")) @@ -518,6 +525,7 @@ def test_stream_zscan_buffered(client: ImmudbClient): 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) @@ -541,3 +549,48 @@ def test_stream_zscan_buffered(client: ImmudbClient): assert index == 2 assert lastFind == 5.0 # limit = 2, minScore = 3.5 + assert True == False + + +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 \ No newline at end of file From cba57851af063779acc88cb0802ce71ee7816b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Thu, 20 Oct 2022 21:11:56 +0200 Subject: [PATCH 33/38] Verified Set --- immudb/client.py | 45 ++++++++++++++++++++++++++- immudb/embedded/store/verification.py | 2 -- immudb/handler/verifiedtxbyid.py | 1 - immudb/streamsutils.py | 8 +++++ tests/immu/test_stream.py | 38 +++++++++++++++++++++- 5 files changed, 89 insertions(+), 5 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index 59f8b3b..ca5c722 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -40,7 +40,7 @@ import datetime -from immudb.streamsutils import AtTXHeader, KeyHeader, ScoreHeader, SetHeader, StreamReader, ValueChunk, ValueChunkHeader, BufferedStreamReader, VerifiedGetStreamReader, ZScanStreamReader +from immudb.streamsutils import AtTXHeader, KeyHeader, ProvenSinceHeader, ScoreHeader, SetHeader, StreamReader, ValueChunk, ValueChunkHeader, BufferedStreamReader, VerifiedGetStreamReader, ZScanStreamReader class ImmudbClient: @@ -1099,6 +1099,20 @@ def _make_set_stream(self, buffer, key: bytes, length: int, chunkSize: int = 655 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): + 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[datatypesv2.ZScanEntry, None, None]: @@ -1268,6 +1282,35 @@ def _rawStreamSet(self, generator: Generator[Union[KeyHeader, ValueChunkHeader, resp = self._stub.streamSet(generator) return dataconverter.convertResponse(resp) + + + def _raw_verifiable_stream_set(self, generator): + resp = self._stub.streamVerifiableSet(generator) + return resp + + + def streamVerifiedSet(self, key: bytes, buffer, bufferLength: int, chunkSize: int = 65536) -> datatypesv2.TxHeader: + 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) -> datatypesv2.TxHeader: + 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. diff --git a/immudb/embedded/store/verification.py b/immudb/embedded/store/verification.py index 4247944..1e3db41 100644 --- a/immudb/embedded/store/verification.py +++ b/immudb/embedded/store/verification.py @@ -238,6 +238,4 @@ def encodeAsKey(val, colType, maxLen): encv += KeyValPrefixNotNull encv += int.to_bytes(intVal, 8, "big") encv[1] = ord(encv[1:2]) ^ ord(b'\x80') - for x in encv: - print(x, end = " ") return bytes(encv) \ No newline at end of file diff --git a/immudb/handler/verifiedtxbyid.py b/immudb/handler/verifiedtxbyid.py index 49f1c46..4616226 100644 --- a/immudb/handler/verifiedtxbyid.py +++ b/immudb/handler/verifiedtxbyid.py @@ -26,7 +26,6 @@ def verify(vtx, state, verifying_key, rs): sourcealh = schema.DigestFromProto(state.txHash) targetid = vtx.tx.header.id targetalh = dualProof.targetTxHeader.Alh() - print(sourceid, sourcealh, targetid, targetalh) else: sourceid = vtx.tx.header.id sourcealh = dualProof.sourceTxHeader.Alh() diff --git a/immudb/streamsutils.py b/immudb/streamsutils.py index cd0ab2e..2808cc6 100644 --- a/immudb/streamsutils.py +++ b/immudb/streamsutils.py @@ -17,6 +17,14 @@ class KeyHeader: 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: diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index 2b72b02..9d4400c 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -449,6 +449,7 @@ def fake_stream(length = 10240): chunk = ref.read(128) + def test_stream_set(client: ImmudbClient): resp = client._rawStreamSet(fake_stream()) assert resp.id > 0 @@ -593,4 +594,39 @@ def test_stream_verifiable_get_buffered(client: ImmudbClient): assert resp.key == key assert resp.verified == True assert value.read() == b'test2'*1024 - assert resp.refkey == None \ No newline at end of file + 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 \ No newline at end of file From 433a5fabb1944e35204668aa417485eec55560d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Thu, 20 Oct 2022 21:12:55 +0200 Subject: [PATCH 34/38] removed bad assert --- tests/immu/test_stream.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index 9d4400c..f472c53 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -550,7 +550,6 @@ def test_stream_zscan_buffered(client: ImmudbClient): assert index == 2 assert lastFind == 5.0 # limit = 2, minScore = 3.5 - assert True == False def test_stream_verifiable_get(client: ImmudbClient): From ff66cce52eadc744add86e5fef15a08574988c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Thu, 20 Oct 2022 23:39:52 +0200 Subject: [PATCH 35/38] Stream Exec All --- immudb/client.py | 64 +++++++++++++++++++++++++++-- immudb/datatypes.py | 9 +++++ tests/conftest.py | 1 - tests/immu/test_stream.py | 85 ++++++++++++++++++++++++++++++++++++--- 4 files changed, 148 insertions(+), 11 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index ca5c722..4c29986 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -18,7 +18,7 @@ from immudb import grpcutils from immudb import datatypes from immudb.exceptions import ErrCorruptedData -from immudb.grpc.schema_pb2 import Chunk, TxHeader +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, @@ -764,9 +764,9 @@ def scan(self, key: bytes, prefix: bytes, desc: bool, limit: int, sinceTx: int = """ return scan.call(self._stub, self._rs, key, prefix, desc, limit, sinceTx) - 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) -> schema_pb2.ZEntries: + 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: @@ -1289,6 +1289,62 @@ def _raw_verifiable_stream_set(self, 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): + 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): + resp = self._stub.streamExecAll(generator) + return resp + + def streamExecAll(self, ops: List[Union[datatypes.KeyValue, datatypes.StreamingKeyValue, datatypes.ZAddRequest, datatypes.ReferenceRequest]], noWait=False) -> TxHeader: + return self._raw_stream_exec_all(self._make_stream_exec_all_stream(ops, noWait)) + + def streamVerifiedSet(self, key: bytes, buffer, bufferLength: int, chunkSize: int = 65536) -> datatypesv2.TxHeader: state = self._rs.get() resp = self._raw_verifiable_stream_set(self._make_verifiable_set_stream( diff --git a/immudb/datatypes.py b/immudb/datatypes.py index 5a5edfd..1482cd4 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,14 @@ class KeyValue(): value: bytes +@dataclass +class StreamingKeyValue(): + key: bytes + value: BytesIO + length: int + + + @dataclass class ZAddRequest(): set: bytes diff --git a/tests/conftest.py b/tests/conftest.py index 0e1192b..f3d80ce 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -16,7 +16,6 @@ # See .github/workflows/ci.yml for the automated tests TESTURLS = ["localhost:3322", "localhost:3333", "localhost:3344", "localhost:3355"] -# TESTURLS = ["localhost:3322"] @pytest.fixture(scope="module") diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index f472c53..48af7f9 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -2,7 +2,7 @@ from io import BytesIO import uuid from grpc import RpcError -from immudb import ImmudbClient, datatypesv2 +from immudb import ImmudbClient, datatypes, datatypesv2 import pytest from immudb.grpc.schema_pb2 import Chunk from immudb.streamsutils import KeyHeader, ValueChunkHeader @@ -598,7 +598,7 @@ def test_stream_verifiable_get_buffered(client: ImmudbClient): def test_verifiable_stream_set(client: ImmudbClient): - keyToSet = str(uuid.uuid4).encode("utf-8") + keyToSet = str(uuid.uuid4()).encode("utf-8") kk = BytesIO(b'123123') resp = client.streamVerifiedSet(keyToSet, kk, 6, 100) assert resp.id > 0 @@ -606,7 +606,7 @@ def test_verifiable_stream_set(client: ImmudbClient): assert client.get(keyToSet).value == b'123123' - keyToSet = str(uuid.uuid4).encode("utf-8") + keyToSet = str(uuid.uuid4()).encode("utf-8") kk = BytesIO(b'123123'*1024) resp = client.streamVerifiedSet(keyToSet, kk, 6*1024, 100) assert resp.id > 0 @@ -616,16 +616,89 @@ def test_verifiable_stream_set(client: ImmudbClient): def test_verifiable_stream_set_fullvalue(client: ImmudbClient): - keyToSet = str(uuid.uuid4).encode("utf-8") + 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") + 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 \ No newline at end of file + 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) + ]) + 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 From d268d966c08f2a107320638ccd7f1a4bbbad0a20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Thu, 20 Oct 2022 23:41:38 +0200 Subject: [PATCH 36/38] Auto pep 8 --- immudb/client.py | 72 +++++++++++++-------------- immudb/datatypes.py | 1 - immudb/datatypesv2.py | 27 +++++++--- immudb/embedded/store/verification.py | 33 ++++++------ immudb/exceptions.py | 5 +- immudb/handler/verifiedSQLGet.py | 24 +++++---- immudb/handler/verifiedtxbyid.py | 2 +- immudb/streamsutils.py | 17 ++++--- 8 files changed, 102 insertions(+), 79 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index 4c29986..9fd2470 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -987,10 +987,11 @@ def streamGetFull(self, key: bytes, atTx: int = None, sinceTx: int = None, noWai 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): + def streamVerifiedGet(self, key: bytes = None, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None): 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) + 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() @@ -1001,7 +1002,8 @@ def streamVerifiedGet(self,key: bytes = None, atTx: int = None, sinceTx: int = N inclusionProof = next(chunks) for chunk in chunks: value += chunk.chunk - verified = verifyTransaction(verifiableTx, state, self._vk, self._rs) + verified = verifyTransaction( + verifiableTx, state, self._vk, self._rs) if(len(verified) == 0): raise ErrCorruptedData return datatypes.SafeGetResponse( @@ -1017,7 +1019,8 @@ def streamVerifiedGet(self,key: bytes = None, atTx: int = None, sinceTx: int = N def streamVerifiedGetBuffered(self, key: bytes = None, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None): 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) + 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() @@ -1025,10 +1028,11 @@ def streamVerifiedGetBuffered(self, key: bytes = None, atTx: int = None, sinceTx if key != None: verifiableTx = next(chunks) inclusionProof = next(chunks) - verified = verifyTransaction(verifiableTx, state, self._vk, self._rs) + verified = verifyTransaction( + verifiableTx, state, self._vk, self._rs) if(len(verified) == 0): raise ErrCorruptedData - toRet = datatypes.SafeGetResponse( + toRet = datatypes.SafeGetResponse( id=verifiableTx.tx.header.id, key=key.key, value=None, @@ -1040,12 +1044,9 @@ def streamVerifiedGetBuffered(self, key: bytes = None, atTx: int = None, sinceTx 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): - request = datatypesv2.HistoryRequest(key = key, offset = offset, limit = limit, desc = desc, sinceTx = sinceTx) + request = datatypesv2.HistoryRequest( + key=key, offset=offset, limit=limit, desc=desc, sinceTx=sinceTx) resp = self._stub.streamHistory(request._getGRPC()) key = None value = None @@ -1062,7 +1063,8 @@ def streamHistory(self, key: bytes, offset: int = None, sinceTx: int = None, lim 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): - request = datatypesv2.HistoryRequest(key = key, offset = offset, limit = limit, desc = desc, sinceTx = sinceTx) + request = datatypesv2.HistoryRequest( + key=key, offset=offset, limit=limit, desc=desc, sinceTx=sinceTx) resp = self._stub.streamHistory(request._getGRPC()) key = None valueHeader = None @@ -1099,7 +1101,6 @@ def _make_set_stream(self, buffer, key: bytes, length: int, chunkSize: int = 655 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): header = ProvenSinceHeader(provenSinceTx) yield Chunk(content=header.getInBytes()) @@ -1113,16 +1114,17 @@ def _make_verifiable_set_stream(self, buffer, key: bytes, length: int, provenSin 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[datatypesv2.ZScanEntry, None, None]: + 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[datatypesv2.ZScanEntry, None, None]: 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) + 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 @@ -1149,22 +1151,21 @@ def streamZScanBuffered(self, set: bytes = None, seekKey: bytes = None, atTx = chunk.seenAtTx else: - yield datatypesv2.ZScanEntry(set = set, key = key, score = score, atTx = atTx), BufferedStreamReader(chunks, chunk, resp) - + 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 = None, offset: int = None ) -> Generator[datatypesv2.ZScanEntry, None, 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 = None, offset: int = None) -> Generator[datatypesv2.ZScanEntry, None, None]: 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) + 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 @@ -1175,7 +1176,7 @@ def streamZScan(self, set: bytes = None, seekKey: bytes = 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) + yield datatypesv2.ZScanEntry(set=set, key=key, value=value, score=score, atTx=atTx) set = chunk.set value = b'' atTx = None @@ -1195,7 +1196,7 @@ def streamZScan(self, set: bytes = None, seekKey: bytes = None, 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) + 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 @@ -1282,22 +1283,18 @@ def _rawStreamSet(self, generator: Generator[Union[KeyHeader, ValueChunkHeader, resp = self._stub.streamSet(generator) return dataconverter.convertResponse(resp) - - def _raw_verifiable_stream_set(self, generator): 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): + def _make_stream_exec_all_stream(self, ops: List[Union[datatypes.KeyValue, datatypes.StreamingKeyValue, datatypes.ZAddRequest, datatypes.ReferenceRequest]], noWait=False, chunkSize=65536): 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()) + yield Chunk(content=concated + KeyHeader(key=op.key, length=len(op.key)).getInBytes()) buffer = BytesIO(op.value) firstChunk = buffer.read(chunkSize) firstChunk = ValueChunkHeader( @@ -1310,7 +1307,7 @@ def _make_stream_exec_all_stream(self, ops: List[Union[datatypes.KeyValue, datat 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()) + yield Chunk(content=concated + KeyHeader(key=op.key, length=len(op.key)).getInBytes()) buffer = op.value firstChunk = buffer.read(chunkSize) firstChunk = ValueChunkHeader( @@ -1323,7 +1320,7 @@ def _make_stream_exec_all_stream(self, ops: List[Union[datatypes.KeyValue, datat elif type(op) == datatypes.ZAddRequest: concated = int.to_bytes(1, 8, 'big') concated += int.to_bytes(zadd, 1, 'big') - zAdd=schema_pb2.ZAddRequest( + zAdd = schema_pb2.ZAddRequest( set=op.set, score=op.score, key=op.key, @@ -1334,8 +1331,7 @@ def _make_stream_exec_all_stream(self, ops: List[Union[datatypes.KeyValue, datat serialized = zAdd.SerializeToString() lengthOf = len(serialized) lengthBytes = int.to_bytes(lengthOf, 8, 'big') - yield Chunk(content = concated + lengthBytes + serialized) - + yield Chunk(content=concated + lengthBytes + serialized) def _raw_stream_exec_all(self, generator): resp = self._stub.streamExecAll(generator) @@ -1344,7 +1340,6 @@ def _raw_stream_exec_all(self, generator): def streamExecAll(self, ops: List[Union[datatypes.KeyValue, datatypes.StreamingKeyValue, datatypes.ZAddRequest, datatypes.ReferenceRequest]], noWait=False) -> TxHeader: return self._raw_stream_exec_all(self._make_stream_exec_all_stream(ops, noWait)) - def streamVerifiedSet(self, key: bytes, buffer, bufferLength: int, chunkSize: int = 65536) -> datatypesv2.TxHeader: state = self._rs.get() resp = self._raw_verifiable_stream_set(self._make_verifiable_set_stream( @@ -1511,12 +1506,13 @@ def safeSet(self, key: bytes, value: bytes): # deprecated ) return verifiedSet.call(self._stub, self._rs, key, value) - def verifiableSQLGet(self, table, primaryKeys, atTx = None, sinceTx = None): + def verifiableSQLGet(self, table, primaryKeys, atTx=None, sinceTx=None): 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) return resp diff --git a/immudb/datatypes.py b/immudb/datatypes.py index 1482cd4..4098ef0 100644 --- a/immudb/datatypes.py +++ b/immudb/datatypes.py @@ -67,7 +67,6 @@ class StreamingKeyValue(): length: int - @dataclass class ZAddRequest(): set: bytes diff --git a/immudb/datatypesv2.py b/immudb/datatypesv2.py index dfa6db9..c09064f 100644 --- a/immudb/datatypesv2.py +++ b/immudb/datatypesv2.py @@ -221,6 +221,7 @@ class ZEntry(GRPCTransformable): score: float = None atTx: int = None + @dataclass class ZScanEntry(): set: bytes = None @@ -229,6 +230,7 @@ class ZScanEntry(): score: float = None atTx: int = None + @dataclass class ZEntries(GRPCTransformable): entries: ZEntry = None @@ -1130,43 +1132,56 @@ class SQLValue(GRPCTransformable): 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) + return schema.SQLValue(null=None) + @dataclass class PrimaryKeyIntValue(GRPCTransformable, PrimaryKey): value: int + def _getGRPC(self): - return schema.SQLValue(n = self.value) + return schema.SQLValue(n=self.value) + @dataclass class PrimaryKeyVarCharValue(GRPCTransformable, PrimaryKey): value: str + def _getGRPC(self): - return schema.SQLValue(s = self.value) + return schema.SQLValue(s=self.value) + @dataclass class PrimaryKeyBoolValue(GRPCTransformable, PrimaryKey): value: bool + def _getGRPC(self): - return schema.SQLValue(b = self.value) + return schema.SQLValue(b=self.value) + @dataclass class PrimaryKeyBlobValue(GRPCTransformable, PrimaryKey): value: bytes + def _getGRPC(self): - return schema.SQLValue(bs = self.value) + return schema.SQLValue(bs=self.value) + @dataclass class PrimaryKeyTsValue(GRPCTransformable, PrimaryKey): value: int + def _getGRPC(self): - return schema.SQLValue(ts = self.value) + return schema.SQLValue(ts=self.value) class TxMode(Enum): diff --git a/immudb/embedded/store/verification.py b/immudb/embedded/store/verification.py index 1e3db41..5ffd31c 100644 --- a/immudb/embedded/store/verification.py +++ b/immudb/embedded/store/verification.py @@ -140,8 +140,8 @@ 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'' @@ -149,9 +149,9 @@ def sqlMapKey(prefix: bytes, mappingPrefix: str, encValues: List[bytes]): mkey += prefix off += len(prefix) - + mkey += mappingPrefix.encode("utf-8") - + off += len(mappingPrefix) for ev in encValues: @@ -160,35 +160,35 @@ def sqlMapKey(prefix: bytes, mappingPrefix: str, encValues: List[bytes]): return mkey + def encodeID(id: int): encId = b'' - encId += int.to_bytes(id, 4, "big") + encId += int.to_bytes(id, 4, "big") return encId + def encodeAsKey(val, colType, maxLen): - maxKeyLen = 256 # pkg/client/sql.go + 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") + encv += int.to_bytes(len(strVal), 4, "big") return encv elif isinstance(colType, datatypesv2.PrimaryKeyIntValue): @@ -199,14 +199,14 @@ def encodeAsKey(val, colType, maxLen): encv = bytearray() encv += KeyValPrefixNotNull - encv += int.to_bytes(intVal, 8, "big") + 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 += str(val).encode("utf-8") encv += b'\x00' * (maxLen - len(val)) encv += int.to_bytes(len(val), 4, "big") return bytes(encv) @@ -223,7 +223,7 @@ def encodeAsKey(val, colType, maxLen): encv = bytearray() encv += KeyValPrefixNotNull - encv += val + encv += val encv += b'\x00' * (maxLen - len(val)) encv += int.to_bytes(len(val), 4, "big") return bytes(encv) @@ -232,10 +232,11 @@ def encodeAsKey(val, colType, maxLen): raise ErrCorruptedData() parsed = datetime.datetime.fromtimestamp(val / 1e6) - intVal = round(int(parsed.timestamp() * 1e9), -3) # UnixNano from GO not compatible with python, need to round last int + # 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 += int.to_bytes(intVal, 8, "big") encv[1] = ord(encv[1:2]) ^ ord(b'\x80') - return bytes(encv) \ No newline at end of file + return bytes(encv) diff --git a/immudb/exceptions.py b/immudb/exceptions.py index f113505..cbf7627 100644 --- a/immudb/exceptions.py +++ b/immudb/exceptions.py @@ -50,11 +50,14 @@ class ErrMetadataUnsupported(Exception): class ErrPySDKInvalidColumnMode(Exception): pass + class ErrInvalidValue(Exception): pass + class ErrMaxKeyLengthExceeded(Exception): pass + class ErrMaxLengthExceeded(Exception): - pass \ No newline at end of file + pass diff --git a/immudb/handler/verifiedSQLGet.py b/immudb/handler/verifiedSQLGet.py index 961b5d9..b520bfa 100644 --- a/immudb/handler/verifiedSQLGet.py +++ b/immudb/handler/verifiedSQLGet.py @@ -20,17 +20,18 @@ 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 + sqlGetRequest=schema_pb2.SQLGetRequest( + table=table, + pkValues=pkValues, + atTx=atTx, + sinceTx=sinceTx ), - proveSinceTx = state.txId + proveSinceTx=state.txId ) ventry = service.VerifiableSQLGet(req) entrySpecDigest = store.EntrySpecDigestFor( @@ -52,10 +53,11 @@ def call(service: schema_pb2_grpc.ImmuServiceStub, rs: RootService, table: str, valbuf += pkEncval pkKey = store.sqlMapKey(b'\x02', 'R.', [ - store.encodeID(dbID), store.encodeID(tableID), store.encodeID(0), valbuf + 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) + e = store.EntrySpec(key=pkKey, value=ventry.sqlEntry.value, md=None) if state.txId <= vTx: eh = schema.DigestFromProto( @@ -110,9 +112,11 @@ def call(service: schema_pb2_grpc.ImmuServiceStub, rs: RootService, table: str, 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), + 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), + inclusionProof=datatypesv2.InclusionProof( + leaf=inclusionProof.leaf, width=inclusionProof.width, terms=inclusionProof.terms), DatabaseId=dbID, TableId=tableID, PKIDs=simpleList, diff --git a/immudb/handler/verifiedtxbyid.py b/immudb/handler/verifiedtxbyid.py index 4616226..0a15ac6 100644 --- a/immudb/handler/verifiedtxbyid.py +++ b/immudb/handler/verifiedtxbyid.py @@ -19,6 +19,7 @@ from immudb.embedded import store import immudb.schema as schema + def verify(vtx, state, verifying_key, rs): dualProof = schema.DualProofFromProto(vtx.dualProof) if state.txId <= vtx.tx.header.id: @@ -56,7 +57,6 @@ def verify(vtx, state, verifying_key, rs): return ret - def call(service: schema_pb2_grpc.ImmuServiceStub, rs: RootService, tx: int, verifying_key=None): state = rs.get() request = schema_pb2.VerifiableTxRequest( diff --git a/immudb/streamsutils.py b/immudb/streamsutils.py index 2808cc6..449dbd5 100644 --- a/immudb/streamsutils.py +++ b/immudb/streamsutils.py @@ -17,6 +17,7 @@ class KeyHeader: def getInBytes(self): return self.length.to_bytes(8, 'big') + self.key + @dataclass class ProvenSinceHeader: provenSinceTx: int @@ -24,7 +25,8 @@ class ProvenSinceHeader: def getInBytes(self): toBytes = self.provenSinceTx.to_bytes(8, 'big') length2 = int.to_bytes(8, 8, 'big') - return length2 + toBytes + return length2 + toBytes + @dataclass class SetHeader: @@ -34,14 +36,17 @@ class SetHeader: 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 @@ -50,6 +55,7 @@ class ValueChunkHeader: def getInBytes(self): return self.length.to_bytes(8, 'big') + self.chunk + @dataclass class ValueChunk: chunk: bytes @@ -69,7 +75,6 @@ def __init__(self, stream): self.valueLength = -1 self.left = -1 - def parseVerifiableTx(self, header): verifiable = VerifiableTx() verifiable.ParseFromString(header[8:]) @@ -87,7 +92,7 @@ def parseHeader(self, header: bytes): 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) + 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') @@ -190,13 +195,12 @@ def parseValueHeader(self, header: bytes): 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) - + 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) + return AtTXHeader(seenAtTx=atTx) def chunks(self): for chunk in self.streamToRead: @@ -234,6 +238,7 @@ def valueReader(self, chunk): self.reader = self.setHeaderReader return readed + class BufferedStreamReader: def __init__(self, chunksGenerator, valueHeader: ValueChunk, stream): self.chunksGenerator = chunksGenerator From 3ae005557498ce344b5694fba8eb8cab675dab51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Fri, 21 Oct 2022 09:08:37 +0200 Subject: [PATCH 37/38] Adjustin pep8 --- immudb/client.py | 5 ++--- immudb/embedded/store/verification.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index 9fd2470..8d6ce16 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -1004,7 +1004,7 @@ def streamVerifiedGet(self, key: bytes = None, atTx: int = None, sinceTx: int = value += chunk.chunk verified = verifyTransaction( verifiableTx, state, self._vk, self._rs) - if(len(verified) == 0): + if (len(verified) == 0): raise ErrCorruptedData return datatypes.SafeGetResponse( id=verifiableTx.tx.header.id, @@ -1030,7 +1030,7 @@ def streamVerifiedGetBuffered(self, key: bytes = None, atTx: int = None, sinceTx inclusionProof = next(chunks) verified = verifyTransaction( verifiableTx, state, self._vk, self._rs) - if(len(verified) == 0): + if (len(verified) == 0): raise ErrCorruptedData toRet = datatypes.SafeGetResponse( id=verifiableTx.tx.header.id, @@ -1512,7 +1512,6 @@ def verifiableSQLGet(self, table, primaryKeys, atTx=None, sinceTx=None): # immudb-py only - def getAllValues(self, keys: list): # immudb-py only resp = batchGet.call(self._stub, self._rs, keys) return resp diff --git a/immudb/embedded/store/verification.py b/immudb/embedded/store/verification.py index 5ffd31c..a66141d 100644 --- a/immudb/embedded/store/verification.py +++ b/immudb/embedded/store/verification.py @@ -214,7 +214,7 @@ def encodeAsKey(val, colType, maxLen): encv = bytearray() encv += KeyValPrefixNotNull - if(val == True): + if (val == True): encv += b'\x01' else: encv += b'\x00' From 0380aac9fef66addf92a3674d3046c4f7ba7ee59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Ra=C5=BAniewski?= Date: Fri, 21 Oct 2022 09:46:02 +0200 Subject: [PATCH 38/38] Documentation update --- immudb/client.py | 221 ++++++++++++++++++++++++++++++++++---- tests/immu/test_stream.py | 1 + 2 files changed, 204 insertions(+), 18 deletions(-) diff --git a/immudb/client.py b/immudb/client.py index 8d6ce16..dfb1a55 100644 --- a/immudb/client.py +++ b/immudb/client.py @@ -987,7 +987,22 @@ def streamGetFull(self, key: bytes, atTx: int = None, sinceTx: int = None, noWai 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): + 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( @@ -1016,7 +1031,22 @@ def streamVerifiedGet(self, key: bytes = None, atTx: int = None, sinceTx: int = revision=atRevision ) - def streamVerifiedGetBuffered(self, key: bytes = None, atTx: int = None, sinceTx: int = None, noWait: bool = None, atRevision: int = None): + 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( @@ -1044,7 +1074,19 @@ def streamVerifiedGetBuffered(self, key: bytes = None, atTx: int = None, sinceTx 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): + 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()) @@ -1062,7 +1104,19 @@ def streamHistory(self, key: bytes, offset: int = None, sinceTx: int = None, lim 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): + 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()) @@ -1102,6 +1156,18 @@ def _make_set_stream(self, buffer, key: bytes, length: int, chunkSize: int = 655 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()) @@ -1116,7 +1182,27 @@ def _make_verifiable_set_stream(self, buffer, key: bytes, length: int, provenSin 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[datatypesv2.ZScanEntry, None, 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: @@ -1157,7 +1243,26 @@ def streamZScanBuffered(self, set: bytes = None, seekKey: bytes = 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 = None, offset: int = None) -> Generator[datatypesv2.ZScanEntry, None, 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: @@ -1271,11 +1376,11 @@ def streamScanBuffered(self, seekKey: bytes = None, endKey: bytes = None, prefix yield key, BufferedStreamReader(chunks, valueHeader, resp) chunk = next(chunks, None) - def _rawStreamSet(self, generator: Generator[Union[KeyHeader, ValueChunkHeader, ValueChunk], None, None]) -> datatypesv2.TxHeader: - """Helper function that grabs generator of chunks and set into immudb + 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[Union[KeyHeader, ValueChunkHeader, ValueChunk], None, None]): Generator + generator (Generator[Chunk, None, None]): Generator Returns: datatypesv2.TxHeader: Transaction header @@ -1283,11 +1388,29 @@ def _rawStreamSet(self, generator: Generator[Union[KeyHeader, ValueChunkHeader, resp = self._stub.streamSet(generator) return dataconverter.convertResponse(resp) - def _raw_verifiable_stream_set(self, generator): + 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): + 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: @@ -1333,14 +1456,45 @@ def _make_stream_exec_all_stream(self, ops: List[Union[datatypes.KeyValue, datat lengthBytes = int.to_bytes(lengthOf, 8, 'big') yield Chunk(content=concated + lengthBytes + serialized) - def _raw_stream_exec_all(self, generator): - resp = self._stub.streamExecAll(generator) + 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) -> TxHeader: + 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, bufferLength: int, chunkSize: int = 65536) -> datatypesv2.TxHeader: + 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)) @@ -1351,7 +1505,18 @@ def streamVerifiedSet(self, key: bytes, buffer, bufferLength: int, chunkSize: in verified=verified[0] == key, ) - def streamVerifiedSetFullValue(self, key: bytes, value: bytes, chunkSize: int = 65536) -> datatypesv2.TxHeader: + 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)) @@ -1369,7 +1534,7 @@ def streamSet(self, key: bytes, buffer, bufferLength: int, chunkSize: int = 6553 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. Defaults to 65536. + chunkSize (int, optional): Specifies chunk size while sending. Defaults to 65536. Returns: datatypesv2.TxHeader: Transaction header of just set transaction @@ -1506,12 +1671,32 @@ def safeSet(self, key: bytes, value: bytes): # deprecated ) return verifiedSet.call(self._stub, self._rs, key, value) - def verifiableSQLGet(self, table, primaryKeys, atTx=None, sinceTx=None): + 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) return resp diff --git a/tests/immu/test_stream.py b/tests/immu/test_stream.py index 48af7f9..9a60722 100644 --- a/tests/immu/test_stream.py +++ b/tests/immu/test_stream.py @@ -692,6 +692,7 @@ def test_stream_exec_all_zadd(client: ImmudbClient): ), 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)