Skip to content

Commit d217e02

Browse files
authored
Merge pull request #115 from djsauble/patch-30
Update UpdateMany.java
2 parents 545a9b8 + b2ac598 commit d217e02

File tree

1 file changed

+10
-11
lines changed
  • astra-db-client/src/test/java/com/dtsx/astra/sdk/documentation

1 file changed

+10
-11
lines changed

astra-db-client/src/test/java/com/dtsx/astra/sdk/documentation/UpdateMany.java

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,15 @@
55
import io.stargate.sdk.json.domain.UpdateQuery;
66

77
public class UpdateMany {
8-
public static void main(String[] args) {
9-
AstraDB db = new AstraDB("<token>", "<api_endpoint>");
10-
AstraDBCollection collection = db.collection("collection_vector1");
8+
public static void main(String[] args) {
9+
AstraDB db = new AstraDB("<token>", "<api_endpoint>");
10+
AstraDBCollection collection = db.collection("collection_vector1");
1111

12-
// Insert rows defined by key/value
13-
collection.updateMany(UpdateQuery.builder()
14-
.updateSet("product_name", 12.99)
15-
.where("product_name")
16-
.isEqualsTo("HealthyFresh - Beef raw dog food")
17-
.build()
18-
);
19-
}
12+
// Update multiple documents based on a query
13+
collection.updateMany(UpdateQuery.builder()
14+
.updateSet("product_name", 12.99)
15+
.where("product_name")
16+
.isEqualsTo("HealthyFresh - Beef raw dog food")
17+
.build());
18+
}
2019
}

0 commit comments

Comments
 (0)