Skip to content

Commit a8c35ab

Browse files
committed
Mark entity bindings as unsupported operation and deprecated
Fix Status
1 parent bc07a35 commit a8c35ab

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

google-cloud-datastore/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@
4040
</exclusion>
4141
</exclusions>
4242
</dependency>
43+
<dependency>
44+
<groupId>io.grpc</groupId>
45+
<artifactId>grpc-core</artifactId>
46+
</dependency>
4347
<dependency>
4448
<groupId>${project.groupId}</groupId>
4549
<artifactId>google-cloud-core</artifactId>

google-cloud-datastore/src/main/java/com/google/cloud/datastore/GqlQuery.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import com.google.common.primitives.Booleans;
2828
import com.google.common.primitives.Doubles;
2929
import com.google.common.primitives.Longs;
30-
30+
import io.grpc.Status;
3131
import java.io.Serializable;
3232
import java.util.ArrayList;
3333
import java.util.Arrays;
@@ -282,9 +282,9 @@ public Builder<V> setBinding(String name, Key... value) {
282282
* @param value a {@link FullEntity} object or a list of {@link FullEntity} objects that binds
283283
* to a given name
284284
*/
285+
@Deprecated
285286
public Builder<V> setBinding(String name, FullEntity<?>... value) {
286-
namedBindings.put(name, toBinding(EntityValue.MARSHALLER, Arrays.asList(value)));
287-
return this;
287+
throw new DatastoreException(Status.Code.UNIMPLEMENTED.value(), "Binding entities is not supported.", "UNIMPLEMENTED");
288288
}
289289

290290
/**
@@ -378,9 +378,9 @@ public Builder<V> addBinding(Key... value) {
378378
* @param value a {@link FullEntity} object or a list of {@link FullEntity} objects to be set as
379379
* a new positional binding
380380
*/
381+
@Deprecated
381382
public Builder<V> addBinding(FullEntity<?>... value) {
382-
positionalBindings.add(toBinding(EntityValue.MARSHALLER, Arrays.asList(value)));
383-
return this;
383+
throw new DatastoreException(Status.Code.UNIMPLEMENTED.value(), "Binding entities is not supported.", "UNIMPLEMENTED");
384384
}
385385

386386
/**

0 commit comments

Comments
 (0)