Package com.datastax.astra.client.model
Class FindOneAndReplaceOptions
java.lang.Object
com.datastax.astra.client.model.CommandOptions<FindOneAndReplaceOptions>
com.datastax.astra.client.model.FindOneAndReplaceOptions
Options used in the `findAndReplace` command.
-
Field Summary
Fields inherited from class com.datastax.astra.client.model.CommandOptions
embeddingAuthProvider, httpClientOptions, observers, token
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprojection
(Projection... projection) Syntax sugar as delete option is only a sortBuilder Pattern, update the returnDocument flagBuilder Pattern, update the returnDocument flagAdd a criteria with $vector in the sort clauseSyntax sugar as delete option is only a sort Could be like Map.of("$vectorize", "command, "field1", 1, "field2", -1);Syntax sugar as delete option is only a sortAdd a criteria with $vectorize in the sort clause.Syntax sugar as delete option is only a sort Could be like Map.of("$vectorize", "command, "field1", 1, "field2", -1);Builder Pattern, update the upsert flag.Methods inherited from class com.datastax.astra.client.model.CommandOptions
embeddingAPIKey, embeddingAuthProvider, getEmbeddingAuthProvider, getHttpClientOptions, getToken, httpClientOptions, registerObserver, registerObserver, token, unregisterObserver, unregisterObserver
-
Constructor Details
-
FindOneAndReplaceOptions
public FindOneAndReplaceOptions()Default constructor.
-
-
Method Details
-
sort
Syntax sugar as delete option is only a sort- Parameters:
sort
- add a filter- Returns:
- current command.
-
sort
Syntax sugar as delete option is only a sort Could be like Map.of("$vectorize", "command, "field1", 1, "field2", -1);- Parameters:
rawSort
- raw sort clause- Returns:
- current command.
-
sort
Syntax sugar as delete option is only a sort Could be like Map.of("$vectorize", "command, "field1", 1, "field2", -1);- Parameters:
sorClause
- sort clause as a document- Returns:
- current command.
-
sort
Add a criteria with $vectorize in the sort clause.- Parameters:
vectorize
- an expression to look for vectorizationsorts
- The sort criteria to be applied to the findOne operation.- Returns:
- current command
-
sort
Add a criteria with $vector in the sort clause- Parameters:
vector
- vector floatsorts
- The sort criteria to be applied to the findOne operation.- Returns:
- current command
-
projection
Syntax sugar as delete option is only a sort- Parameters:
projection
- add a filter- Returns:
- current command.
-
returnDocumentAfter
Builder Pattern, update the returnDocument flag- Returns:
- self reference
-
returnDocumentBefore
Builder Pattern, update the returnDocument flag- Returns:
- self reference
-
upsert
Builder Pattern, update the upsert flag.- Parameters:
upsert
- upsert flag- Returns:
- self reference
-