Skip to content

Commit 2d7b82d

Browse files
committed
chore: update schema
1 parent dc3569d commit 2d7b82d

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
lines changed

proto/schema.proto

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
/*
22
Copyright 2021 CodeNotary, Inc. All rights reserved.
3+
34
Licensed under the Apache License, Version 2.0 (the "License");
45
you may not use this file except in compliance with the License.
56
You may obtain a copy of the License at
7+
68
http://www.apache.org/licenses/LICENSE-2.0
9+
710
Unless required by applicable law or agreed to in writing, software
811
distributed under the License is distributed on an "AS IS" BASIS,
912
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -473,7 +476,7 @@ service ImmuService {
473476
rpc CreateDatabase(Database) returns (google.protobuf.Empty);
474477
rpc DatabaseList (google.protobuf.Empty) returns (DatabaseListResponse);
475478
rpc UseDatabase(Database) returns (UseDatabaseReply);
476-
rpc CleanIndex(google.protobuf.Empty) returns (google.protobuf.Empty);
479+
rpc CompactIndex(google.protobuf.Empty) returns (google.protobuf.Empty);
477480
rpc ChangePermission(ChangePermissionRequest) returns (google.protobuf.Empty);
478481
rpc SetActiveUser (SetActiveUserRequest) returns (google.protobuf.Empty);
479482
// Streams

src/client.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class ImmudbClient {
8888
return new Promise((resolve) => resolve(ImmudbClient.instance));
8989
} catch (err) {
9090
await ImmudbClient.instance.shutdown();
91-
return new Promise((reject) => reject(err));
91+
return new Promise((_, reject) => reject(err));
9292
}
9393
}
9494

@@ -1633,11 +1633,11 @@ class ImmudbClient {
16331633
}
16341634
}
16351635

1636-
async cleanIndex (): Promise<empty.Empty | undefined> {
1636+
async compactIndex (): Promise<empty.Empty | undefined> {
16371637
try {
16381638
const req = new empty.Empty()
16391639

1640-
return new Promise((resolve, reject) => this.client.cleanIndex(req, this._metadata, (err, res) => {
1640+
return new Promise((resolve, reject) => this.client.compactIndex(req, this._metadata, (err, res) => {
16411641
if (err) {
16421642
console.error('cleanIndex error', err);
16431643

src/proto/schema_grpc_pb.d.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ interface IImmuServiceService extends grpc.ServiceDefinition<grpc.UntypedService
4040
createDatabase: IImmuServiceService_ICreateDatabase;
4141
databaseList: IImmuServiceService_IDatabaseList;
4242
useDatabase: IImmuServiceService_IUseDatabase;
43-
cleanIndex: IImmuServiceService_ICleanIndex;
43+
compactIndex: IImmuServiceService_ICompactIndex;
4444
changePermission: IImmuServiceService_IChangePermission;
4545
setActiveUser: IImmuServiceService_ISetActiveUser;
4646
streamGet: IImmuServiceService_IstreamGet;
@@ -329,8 +329,8 @@ interface IImmuServiceService_IUseDatabase extends grpc.MethodDefinition<schema_
329329
responseSerialize: grpc.serialize<schema_pb.UseDatabaseReply>;
330330
responseDeserialize: grpc.deserialize<schema_pb.UseDatabaseReply>;
331331
}
332-
interface IImmuServiceService_ICleanIndex extends grpc.MethodDefinition<google_protobuf_empty_pb.Empty, google_protobuf_empty_pb.Empty> {
333-
path: "/immudb.schema.ImmuService/CleanIndex";
332+
interface IImmuServiceService_ICompactIndex extends grpc.MethodDefinition<google_protobuf_empty_pb.Empty, google_protobuf_empty_pb.Empty> {
333+
path: "/immudb.schema.ImmuService/CompactIndex";
334334
requestStream: false;
335335
responseStream: false;
336336
requestSerialize: grpc.serialize<google_protobuf_empty_pb.Empty>;
@@ -516,7 +516,7 @@ export interface IImmuServiceServer {
516516
createDatabase: grpc.handleUnaryCall<schema_pb.Database, google_protobuf_empty_pb.Empty>;
517517
databaseList: grpc.handleUnaryCall<google_protobuf_empty_pb.Empty, schema_pb.DatabaseListResponse>;
518518
useDatabase: grpc.handleUnaryCall<schema_pb.Database, schema_pb.UseDatabaseReply>;
519-
cleanIndex: grpc.handleUnaryCall<google_protobuf_empty_pb.Empty, google_protobuf_empty_pb.Empty>;
519+
compactIndex: grpc.handleUnaryCall<google_protobuf_empty_pb.Empty, google_protobuf_empty_pb.Empty>;
520520
changePermission: grpc.handleUnaryCall<schema_pb.ChangePermissionRequest, google_protobuf_empty_pb.Empty>;
521521
setActiveUser: grpc.handleUnaryCall<schema_pb.SetActiveUserRequest, google_protobuf_empty_pb.Empty>;
522522
streamGet: grpc.handleServerStreamingCall<schema_pb.KeyRequest, schema_pb.Chunk>;
@@ -626,9 +626,9 @@ export interface IImmuServiceClient {
626626
useDatabase(request: schema_pb.Database, callback: (error: grpc.ServiceError | null, response: schema_pb.UseDatabaseReply) => void): grpc.ClientUnaryCall;
627627
useDatabase(request: schema_pb.Database, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: schema_pb.UseDatabaseReply) => void): grpc.ClientUnaryCall;
628628
useDatabase(request: schema_pb.Database, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: schema_pb.UseDatabaseReply) => void): grpc.ClientUnaryCall;
629-
cleanIndex(request: google_protobuf_empty_pb.Empty, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
630-
cleanIndex(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
631-
cleanIndex(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
629+
compactIndex(request: google_protobuf_empty_pb.Empty, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
630+
compactIndex(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
631+
compactIndex(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
632632
changePermission(request: schema_pb.ChangePermissionRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
633633
changePermission(request: schema_pb.ChangePermissionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
634634
changePermission(request: schema_pb.ChangePermissionRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
@@ -769,9 +769,9 @@ export class ImmuServiceClient extends grpc.Client implements IImmuServiceClient
769769
public useDatabase(request: schema_pb.Database, callback: (error: grpc.ServiceError | null, response: schema_pb.UseDatabaseReply) => void): grpc.ClientUnaryCall;
770770
public useDatabase(request: schema_pb.Database, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: schema_pb.UseDatabaseReply) => void): grpc.ClientUnaryCall;
771771
public useDatabase(request: schema_pb.Database, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: schema_pb.UseDatabaseReply) => void): grpc.ClientUnaryCall;
772-
public cleanIndex(request: google_protobuf_empty_pb.Empty, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
773-
public cleanIndex(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
774-
public cleanIndex(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
772+
public compactIndex(request: google_protobuf_empty_pb.Empty, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
773+
public compactIndex(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
774+
public compactIndex(request: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
775775
public changePermission(request: schema_pb.ChangePermissionRequest, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
776776
public changePermission(request: schema_pb.ChangePermissionRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;
777777
public changePermission(request: schema_pb.ChangePermissionRequest, metadata: grpc.Metadata, options: Partial<grpc.CallOptions>, callback: (error: grpc.ServiceError | null, response: google_protobuf_empty_pb.Empty) => void): grpc.ClientUnaryCall;

src/proto/schema_grpc_pb.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
// Original file comments:
44
//
55
// Copyright 2021 CodeNotary, Inc. All rights reserved.
6+
//
67
// Licensed under the Apache License, Version 2.0 (the "License");
78
// you may not use this file except in compliance with the License.
89
// You may obtain a copy of the License at
10+
//
911
// http://www.apache.org/licenses/LICENSE-2.0
12+
//
1013
// Unless required by applicable law or agreed to in writing, software
1114
// distributed under the License is distributed on an "AS IS" BASIS,
1215
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -903,8 +906,8 @@ var ImmuServiceService = exports.ImmuServiceService = {
903906
responseSerialize: serialize_immudb_schema_UseDatabaseReply,
904907
responseDeserialize: deserialize_immudb_schema_UseDatabaseReply,
905908
},
906-
cleanIndex: {
907-
path: '/immudb.schema.ImmuService/CleanIndex',
909+
compactIndex: {
910+
path: '/immudb.schema.ImmuService/CompactIndex',
908911
requestStream: false,
909912
responseStream: false,
910913
requestType: google_protobuf_empty_pb.Empty,

0 commit comments

Comments
 (0)