File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed
astra-db-client/src/test/java/com/dtsx/astra/sdk/documentation Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 55import io .stargate .sdk .json .domain .UpdateQuery ;
66
77public 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}
You can’t perform that action at this time.
0 commit comments