Skip to content

Commit bde2d7d

Browse files
committed
road to fix the build
1 parent fd3df65 commit bde2d7d

File tree

29 files changed

+126
-172
lines changed

29 files changed

+126
-172
lines changed

astra-db-java/src/main/java/com/datastax/astra/client/core/commands/CommandOptions.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -141,23 +141,6 @@ public T embeddingAuthProvider(EmbeddingHeadersProvider embeddingAuthProvider) {
141141
return (T) this;
142142
}
143143

144-
/**
145-
* Provide the embedding service API key.
146-
*
147-
* @param embeddingServiceApiKey
148-
* embedding service key
149-
* @return
150-
* service key
151-
* @deprecated
152-
* has been replaced by {@link #embeddingAuthProvider(EmbeddingHeadersProvider)}
153-
*/
154-
@Deprecated
155-
@SuppressWarnings("unchecked")
156-
public T embeddingAPIKey(String embeddingServiceApiKey) {
157-
this.embeddingAuthProvider = new EmbeddingAPIKeyHeaderProvider(embeddingServiceApiKey);
158-
return (T) this;
159-
}
160-
161144
/**
162145
* Allow to register a listener for the command.
163146
* @param name

astra-db-java/src/main/java/com/datastax/astra/client/core/options/TimeoutOptions.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
package com.datastax.astra.client.core.options;
22

3+
/*-
4+
* #%L
5+
* Data API Java Client
6+
* --
7+
* Copyright (C) 2024 DataStax
8+
* --
9+
* Licensed under the Apache License, Version 2.0
10+
* You may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
* #L%
21+
*/
22+
323
import lombok.Data;
424

525
@Data

astra-db-java/src/main/java/com/datastax/astra/client/tables/Table.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -623,8 +623,6 @@ public void deleteOne(Filter filter, TableDeleteOneOptions deleteOneOptions) {
623623
* the query filter to apply the delete operation
624624
* @param options
625625
* the options to apply to the operation
626-
* @return
627-
* the result of the remove many operation
628626
*/
629627
public void deleteMany(Filter filter, TableDeleteManyOptions options) {
630628
AtomicInteger totalCount = new AtomicInteger(0);

astra-db-java/src/main/java/com/datastax/astra/internal/api/DataAPIDocumentResponse.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
package com.datastax.astra.internal.api;
22

3+
/*-
4+
* #%L
5+
* Data API Java Client
6+
* --
7+
* Copyright (C) 2024 DataStax
8+
* --
9+
* Licensed under the Apache License, Version 2.0
10+
* You may not use this file except in compliance with the License.
11+
* You may obtain a copy of the License at
12+
*
13+
* http://www.apache.org/licenses/LICENSE-2.0
14+
*
15+
* Unless required by applicable law or agreed to in writing, software
16+
* distributed under the License is distributed on an "AS IS" BASIS,
17+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18+
* See the License for the specific language governing permissions and
19+
* limitations under the License.
20+
* #L%
21+
*/
22+
323
import com.datastax.astra.internal.serdes.tables.RowSerializer;
424
import com.fasterxml.jackson.annotation.JsonProperty;
525
import lombok.Getter;

cassio-cql/src/main/java/com/dtsx/cassio/ClusteredMetadataVectorRecord.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* row_id timeuuid,
1818
* attributes_blob text,
1919
* body_blob text,
20-
* metadata_s map<text, text>,
21-
* vector vector<float, 1536>,
20+
* metadata_s map&lt;text, text&gt;,
21+
* vector vector&lt;float, 1536&gt;,
2222
* PRIMARY KEY (partition_id, row_id)
2323
* ) WITH CLUSTERING ORDER BY (row_id DESC);
2424
* --------------------------------------------------------------------------

examples/src/main/java/QuickStartHCD.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
import com.datastax.astra.client.collections.Collection;
22
import com.datastax.astra.client.DataAPIClient;
3+
import com.datastax.astra.client.collections.CollectionOptions;
4+
import com.datastax.astra.client.collections.documents.Document;
5+
import com.datastax.astra.client.core.auth.EmbeddingAPIKeyHeaderProvider;
6+
import com.datastax.astra.client.core.commands.CommandOptions;
37
import com.datastax.astra.client.databases.Database;
48
import com.datastax.astra.client.admin.DataAPIDatabaseAdmin;
5-
import com.datastax.astra.client.core.CollectionOptions;
6-
import com.datastax.astra.client.core.CommandOptions;
7-
import com.datastax.astra.client.core.Document;
89
import com.datastax.astra.client.collections.commands.FindOneOptions;
9-
import com.datastax.astra.client.core.NamespaceOptions;
1010
import com.datastax.astra.client.core.vector.SimilarityMetric;
1111
import com.datastax.astra.client.core.auth.UsernamePasswordTokenProvider;
12+
import com.datastax.astra.client.keyspaces.KeyspaceOptions;
1213

1314
import java.util.Optional;
1415

1516
import static com.datastax.astra.client.DataAPIClients.DEFAULT_ENDPOINT_LOCAL;
16-
import static com.datastax.astra.client.core.options.DataAPIOptions.DataAPIDestination.HCD;
17+
import static com.datastax.astra.client.DataAPIDestination.HCD;
1718
import static com.datastax.astra.client.core.options.DataAPIOptions.builder;
18-
import static com.datastax.astra.client.core.Filters.eq;
19+
import static com.datastax.astra.client.core.query.Filters.eq;
1920

2021
public class QuickStartHCD {
2122

@@ -46,7 +47,7 @@ public static void main(String[] args) {
4647
((DataAPIDatabaseAdmin) client
4748
.getDatabase(dataApiUrl)
4849
.getDatabaseAdmin())
49-
.createNamespace(keyspaceName, NamespaceOptions.simpleStrategy(1));
50+
.createKeyspace(keyspaceName, KeyspaceOptions.simpleStrategy(1));
5051
System.out.println("3/7 - Keyspace '" + keyspaceName + "'created ");
5152

5253
Database db = client.getDatabase(dataApiUrl, keyspaceName);
@@ -58,7 +59,7 @@ public static void main(String[] args) {
5859
.vectorDimension(openAiEmbeddingDimension)
5960
.vectorize(openAiProvider, openAiModel)
6061
.build(),
61-
new CommandOptions<>().embeddingAPIKey(openAiKey));
62+
new CommandOptions<>().embeddingAuthProvider(new EmbeddingAPIKeyHeaderProvider(openAiKey)));
6263
System.out.println("5/7 - Collection created with OpenAI embeddings");
6364

6465
// Insert some documents

examples/src/main/java/QuickStartLocal.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import com.datastax.astra.client.collections.Collection;
22
import com.datastax.astra.client.DataAPIClient;
3+
import com.datastax.astra.client.collections.documents.Document;
34
import com.datastax.astra.client.databases.Database;
4-
import com.datastax.astra.client.core.Document;
55
import com.datastax.astra.client.collections.commands.FindIterable;
66
import com.datastax.astra.client.core.auth.UsernamePasswordTokenProvider;
77

8-
import static com.datastax.astra.client.core.options.DataAPIOptions.DataAPIDestination.CASSANDRA;
8+
import static com.datastax.astra.client.DataAPIDestination.CASSANDRA;
99
import static com.datastax.astra.client.core.options.DataAPIOptions.builder;
1010
import static com.datastax.astra.client.core.vector.SimilarityMetric.COSINE;
1111

examples/src/main/java/QuickStartTraining.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import com.datastax.astra.client.collections.Collection;
22
import com.datastax.astra.client.DataAPIClient;
3+
import com.datastax.astra.client.collections.CollectionOptions;
4+
import com.datastax.astra.client.collections.documents.Document;
35
import com.datastax.astra.client.core.options.DataAPIOptions;
46
import com.datastax.astra.client.databases.Database;
5-
import com.datastax.astra.client.core.CollectionOptions;
6-
import com.datastax.astra.client.core.Document;
77
import com.datastax.astra.client.collections.commands.FindIterable;
88

99
import static com.datastax.astra.client.core.vector.SimilarityMetric.COSINE;

examples/src/main/java/Quickstart.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import com.datastax.astra.client.collections.Collection;
22
import com.datastax.astra.client.DataAPIClient;
3+
import com.datastax.astra.client.collections.documents.Document;
34
import com.datastax.astra.client.core.options.DataAPIOptions;
45
import com.datastax.astra.client.databases.Database;
5-
import com.datastax.astra.client.core.Document;
66
import com.datastax.astra.client.collections.commands.FindIterable;
77
import com.datastax.astra.client.collections.commands.FindOptions;
88

examples/src/main/java/com/datastax/astra/LIveCoding.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)