Skip to content

Commit 3ea96b3

Browse files
committed
update to 1.0.18
1 parent fe2fd51 commit 3ea96b3

36 files changed

+6877
-18
lines changed

RELEASE.MD

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33

44
This page is mean to help developer to release this the SDK.
55

6+
## CQLSH
7+
8+
```console
9+
# Get the latest compose with DSE
10+
curl -o docker-compose-dse.yml https://raw.githubusercontent.com/datastax/astra-db-java/refs/heads/main/docker-compose.yml
11+
# Start docker
12+
docker-compose -f ./docker-compose-dse.yml up -d
13+
14+
15+
```
16+
617
## Run the Test
718

819
### Prerequisites
@@ -31,3 +42,4 @@ cd ~/.ssh
3142
ssh-add githubff4j
3243
```
3344

45+

astra-db-java/src/main/java/com/datastax/astra/client/Database.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,18 @@ public Stream<String> listCollectionNames() {
222222
.stream();
223223
}
224224

225+
/**
226+
* Gets the names of all the tables in this database.
227+
*
228+
* @return
229+
* a stream containing all the names of all the collections in this database
230+
*/
231+
public Stream<String> listTableNames() {
232+
Command findTables = Command.create("listTables");
233+
return runCommand(findTables)
234+
.getStatusKeyAsList("tables", String.class)
235+
.stream();
236+
}
225237
/**
226238
* Finds all the tables in this database.
227239
*

astra-db-java/src/main/java/com/datastax/astra/client/model/tables/ColumnDefinition.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.model.tables;
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
import lombok.NoArgsConstructor;
525

astra-db-java/src/main/java/com/datastax/astra/client/model/tables/ColumnDefinitionApiSupport.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.model.tables;
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
import lombok.NoArgsConstructor;
525

astra-db-java/src/main/java/com/datastax/astra/client/model/tables/PrimaryKey.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.model.tables;
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.fasterxml.jackson.annotation.JsonProperty;
424
import lombok.Data;
525
import lombok.NoArgsConstructor;

astra-db-java/src/main/java/com/datastax/astra/client/model/tables/Row.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.model.tables;
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.client.model.collections.Document;
424
import com.datastax.astra.client.model.types.DataAPIKeywords;
525
import com.datastax.astra.client.model.types.ObjectId;

astra-db-java/src/main/java/com/datastax/astra/client/model/tables/TableDefinition.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.model.tables;
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
import lombok.NoArgsConstructor;
525

astra-db-java/src/test/resources/create-tables.cql

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,30 @@
1-
CREATE TABLE test_types_tables (
2-
user_id uuid,
3-
order_id uuid,
4-
order_date timestamp,
5-
address frozen<tuple<text, text, int>>,
6-
age int,
7-
is_active boolean,
8-
login_attempts set<int>,
9-
name text,
10-
photo blob,
11-
preferences map<text, text>,
12-
salary decimal,
13-
tags list<text>,
14-
PRIMARY KEY (user_id, order_id, order_date)
15-
) WITH CLUSTERING ORDER BY (order_id ASC, order_date DESC);
1+
CREATE TABLE table_types (
2+
p_ascii ascii,
3+
p_blob blob,
4+
p_boolean boolean,
5+
p_bigint bigint,
6+
p_date date,
7+
p_decimal decimal,
8+
p_double double,
9+
p_duration duration,
10+
p_float float,
11+
p_inet inet,
12+
p_int int,
13+
p_smallint smallint,
14+
p_text text,
15+
p_time time,
16+
p_timestamp timestamp,
17+
p_tinyint tinyint,
18+
p_varint varint,
19+
p_uuid uuid,
20+
p_set set<int>,
21+
p_map map<text, text>,
22+
p_list list<text>,
23+
--p_tuple tuple<text, text, int>,
24+
PRIMARY KEY (p_uuid, p_text, p_int)
25+
) WITH CLUSTERING ORDER BY (p_text ASC, p_int DESC);
26+
27+
blob, boolean, date, decimal, double, duration, float, inet, int, list, map, set, smallint, text, time, timestamp, tinyint, uuid, vector
1628

1729

1830
INSERT INTO test_types_tables (

cassio-cql/pom.xml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<artifactId>cassio-cql</artifactId>
5+
<name>cassio-cql</name>
6+
7+
<parent>
8+
<groupId>com.datastax.astra</groupId>
9+
<artifactId>astra-db-java-parent</artifactId>
10+
<version>2.0.0-SNAPSHOT</version>
11+
</parent>
12+
13+
<properties>
14+
<openai-java.version>0.18.2</openai-java.version>
15+
<langchain4j.version>0.27.0</langchain4j.version>
16+
<okhttp.version>4.12.0</okhttp.version>
17+
<cassandra-drivers.version>4.17.0</cassandra-drivers.version>
18+
<okio-jvm.version>3.7.0</okio-jvm.version>
19+
</properties>
20+
21+
<dependencies>
22+
23+
<dependency>
24+
<groupId>org.slf4j</groupId>
25+
<artifactId>slf4j-api</artifactId>
26+
</dependency>
27+
28+
<dependency>
29+
<groupId>com.squareup.okhttp3</groupId>
30+
<artifactId>okhttp</artifactId>
31+
<version>${okhttp.version}</version>
32+
</dependency>
33+
34+
<dependency>
35+
<groupId>com.squareup.okio</groupId>
36+
<artifactId>okio-jvm</artifactId>
37+
<version>${okio-jvm.version}</version>
38+
</dependency>
39+
40+
<dependency>
41+
<groupId>org.projectlombok</groupId>
42+
<artifactId>lombok</artifactId>
43+
</dependency>
44+
45+
<!-- CQL API (CassioIO) -->
46+
<dependency>
47+
<groupId>com.datastax.oss</groupId>
48+
<artifactId>java-driver-core</artifactId>
49+
<version>${cassandra-drivers.version}</version>
50+
</dependency>
51+
52+
<dependency>
53+
<groupId>com.datastax.astra</groupId>
54+
<artifactId>astra-sdk-devops</artifactId>
55+
</dependency>
56+
57+
<!-- TEST -->
58+
<dependency>
59+
<groupId>org.junit.jupiter</groupId>
60+
<artifactId>junit-jupiter-engine</artifactId>
61+
<scope>test</scope>
62+
</dependency>
63+
<dependency>
64+
<groupId>ch.qos.logback</groupId>
65+
<artifactId>logback-classic</artifactId>
66+
<scope>test</scope>
67+
</dependency>
68+
69+
<dependency>
70+
<groupId>dev.langchain4j</groupId>
71+
<artifactId>langchain4j</artifactId>
72+
<version>${langchain4j.version}</version>
73+
<scope>test</scope>
74+
</dependency>
75+
<dependency>
76+
<groupId>dev.langchain4j</groupId>
77+
<artifactId>langchain4j-open-ai</artifactId>
78+
<version>${langchain4j.version}</version>
79+
<scope>test</scope>
80+
</dependency>
81+
<dependency>
82+
<groupId>dev.langchain4j</groupId>
83+
<artifactId>langchain4j-document-parser-apache-pdfbox</artifactId>
84+
<version>${langchain4j.version}</version>
85+
<scope>test</scope>
86+
</dependency>
87+
</dependencies>
88+
89+
<build>
90+
<plugins>
91+
<plugin>
92+
<groupId>org.apache.maven.plugins</groupId>
93+
<artifactId>maven-compiler-plugin</artifactId>
94+
<configuration>
95+
<source>11</source>
96+
<target>11</target>
97+
</configuration>
98+
</plugin>
99+
</plugins>
100+
</build>
101+
102+
<licenses>
103+
<license>
104+
<name>Apache-2.0</name>
105+
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
106+
<distribution>repo</distribution>
107+
<comments>A business-friendly OSS license</comments>
108+
</license>
109+
</licenses>
110+
111+
</project>

0 commit comments

Comments
 (0)