Skip to content

Commit 96cc018

Browse files
committed
fix: return response type for createQueryPartitions and createReadPartitions
1 parent 5ca878f commit 96cc018

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

src/batch-transaction.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,22 @@ export interface TransactionIdentifier {
4343
}
4444

4545
export type CreateReadPartitionsResponse = [
46-
google.spanner.v1.IPartitionReadRequest,
46+
ReadRequest[],
4747
google.spanner.v1.IPartitionResponse,
4848
];
4949

5050
export type CreateReadPartitionsCallback = ResourceCallback<
51-
google.spanner.v1.IPartitionReadRequest,
51+
ReadRequest[],
5252
google.spanner.v1.IPartitionResponse
5353
>;
5454

5555
export type CreateQueryPartitionsResponse = [
56-
google.spanner.v1.IPartitionQueryRequest,
56+
ExecuteSqlRequest[],
5757
google.spanner.v1.IPartitionResponse,
5858
];
5959

6060
export type CreateQueryPartitionsCallback = ResourceCallback<
61-
google.spanner.v1.IPartitionQueryRequest,
61+
ExecuteSqlRequest[],
6262
google.spanner.v1.IPartitionResponse
6363
>;
6464

test/mockserver/mockspanner.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import Status = google.rpc.Status;
3030
import Any = google.protobuf.Any;
3131
import QueryMode = google.spanner.v1.ExecuteSqlRequest.QueryMode;
3232
import NullValue = google.protobuf.NullValue;
33+
import {ExecuteSqlRequest, ReadRequest} from '../../src/transaction';
3334

3435
const PROTO_PATH = 'spanner.proto';
3536
const IMPORT_PATH = __dirname + '/../../../protos';
@@ -1067,10 +1068,7 @@ export class MockSpanner {
10671068
}
10681069

10691070
partitionQuery(
1070-
call: grpc.ServerUnaryCall<
1071-
protobuf.PartitionQueryRequest,
1072-
protobuf.PartitionResponse
1073-
>,
1071+
call: grpc.ServerUnaryCall<ExecuteSqlRequest[], protobuf.PartitionResponse>,
10741072
callback: protobuf.Spanner.PartitionQueryCallback,
10751073
) {
10761074
this.pushRequest(call.request!, call.metadata);
@@ -1085,10 +1083,7 @@ export class MockSpanner {
10851083
}
10861084

10871085
partitionRead(
1088-
call: grpc.ServerUnaryCall<
1089-
protobuf.PartitionReadRequest,
1090-
protobuf.PartitionResponse
1091-
>,
1086+
call: grpc.ServerUnaryCall<ReadRequest[], protobuf.PartitionResponse>,
10921087
callback: protobuf.Spanner.PartitionReadCallback,
10931088
) {
10941089
this.pushRequest(call.request!, call.metadata);

0 commit comments

Comments
 (0)