@@ -67,7 +67,8 @@ private DatastoreException invalidResponseException(String method, IOException e
6767 }
6868
6969 public AllocateIdsResponse allocateIds (AllocateIdsRequest request ) throws DatastoreException {
70- try (InputStream is = remoteRpc .call ("allocateIds" , request )) {
70+ try (InputStream is =
71+ remoteRpc .call ("allocateIds" , request , request .getProjectId (), request .getDatabaseId ())) {
7172 return AllocateIdsResponse .parseFrom (is );
7273 } catch (IOException exception ) {
7374 throw invalidResponseException ("allocateIds" , exception );
@@ -76,47 +77,54 @@ public AllocateIdsResponse allocateIds(AllocateIdsRequest request) throws Datast
7677
7778 public BeginTransactionResponse beginTransaction (BeginTransactionRequest request )
7879 throws DatastoreException {
79- try (InputStream is = remoteRpc .call ("beginTransaction" , request )) {
80+ try (InputStream is =
81+ remoteRpc .call (
82+ "beginTransaction" , request , request .getProjectId (), request .getDatabaseId ())) {
8083 return BeginTransactionResponse .parseFrom (is );
8184 } catch (IOException exception ) {
8285 throw invalidResponseException ("beginTransaction" , exception );
8386 }
8487 }
8588
8689 public CommitResponse commit (CommitRequest request ) throws DatastoreException {
87- try (InputStream is = remoteRpc .call ("commit" , request )) {
90+ try (InputStream is =
91+ remoteRpc .call ("commit" , request , request .getProjectId (), request .getDatabaseId ())) {
8892 return CommitResponse .parseFrom (is );
8993 } catch (IOException exception ) {
9094 throw invalidResponseException ("commit" , exception );
9195 }
9296 }
9397
9498 public LookupResponse lookup (LookupRequest request ) throws DatastoreException {
95- try (InputStream is = remoteRpc .call ("lookup" , request )) {
99+ try (InputStream is =
100+ remoteRpc .call ("lookup" , request , request .getProjectId (), request .getDatabaseId ())) {
96101 return LookupResponse .parseFrom (is );
97102 } catch (IOException exception ) {
98103 throw invalidResponseException ("lookup" , exception );
99104 }
100105 }
101106
102107 public ReserveIdsResponse reserveIds (ReserveIdsRequest request ) throws DatastoreException {
103- try (InputStream is = remoteRpc .call ("reserveIds" , request )) {
108+ try (InputStream is =
109+ remoteRpc .call ("reserveIds" , request , request .getProjectId (), request .getDatabaseId ())) {
104110 return ReserveIdsResponse .parseFrom (is );
105111 } catch (IOException exception ) {
106112 throw invalidResponseException ("reserveIds" , exception );
107113 }
108114 }
109115
110116 public RollbackResponse rollback (RollbackRequest request ) throws DatastoreException {
111- try (InputStream is = remoteRpc .call ("rollback" , request )) {
117+ try (InputStream is =
118+ remoteRpc .call ("rollback" , request , request .getProjectId (), request .getDatabaseId ())) {
112119 return RollbackResponse .parseFrom (is );
113120 } catch (IOException exception ) {
114121 throw invalidResponseException ("rollback" , exception );
115122 }
116123 }
117124
118125 public RunQueryResponse runQuery (RunQueryRequest request ) throws DatastoreException {
119- try (InputStream is = remoteRpc .call ("runQuery" , request )) {
126+ try (InputStream is =
127+ remoteRpc .call ("runQuery" , request , request .getProjectId (), request .getDatabaseId ())) {
120128 return RunQueryResponse .parseFrom (is );
121129 } catch (IOException exception ) {
122130 throw invalidResponseException ("runQuery" , exception );
@@ -125,7 +133,9 @@ public RunQueryResponse runQuery(RunQueryRequest request) throws DatastoreExcept
125133
126134 public RunAggregationQueryResponse runAggregationQuery (RunAggregationQueryRequest request )
127135 throws DatastoreException {
128- try (InputStream is = remoteRpc .call ("runAggregationQuery" , request )) {
136+ try (InputStream is =
137+ remoteRpc .call (
138+ "runAggregationQuery" , request , request .getProjectId (), request .getDatabaseId ())) {
129139 return RunAggregationQueryResponse .parseFrom (is );
130140 } catch (IOException exception ) {
131141 throw invalidResponseException ("runAggregationQuery" , exception );
0 commit comments