Skip to content

Update 2.0 Branch #46

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 72 commits into from
Apr 4, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
242fa57
Update dependent job name
msmygit Nov 21, 2024
040d39f
Merge pull request #30 from datastax/2.0-beta
clun Nov 30, 2024
086aa17
Merge pull request #31 from datastax/2.0-beta
clun Nov 30, 2024
f0c9d0a
reducing to 1838474 warnings
clun Nov 30, 2024
de15941
less warnings
clun Nov 30, 2024
edda748
Add a getTable sample + options
clun Dec 2, 2024
521379a
javadoc
clun Dec 2, 2024
8889da7
Fixing Build
clun Dec 2, 2024
4da67b0
add sample
clun Dec 2, 2024
3ed6293
sample
clun Dec 2, 2024
43931f9
update list tables
clun Dec 3, 2024
4fbb79b
update list tables
clun Dec 3, 2024
163f010
Add Sample + simple syntax for creste index
clun Dec 3, 2024
395f50f
list indexes
clun Dec 3, 2024
b6206e6
Allow operations from the on other keyspace
clun Dec 3, 2024
b0a0eca
update examples
clun Dec 3, 2024
6bc862b
Fix #32: remove accidental debug System.out.println()
tatu-at-datastax Dec 3, 2024
ab80aec
update examples
clun Dec 4, 2024
3f8361e
Merge pull request #34 from tatu-at-datastax/main
clun Dec 4, 2024
98e9de3
update examples
clun Dec 4, 2024
e789bfa
update examples
clun Dec 4, 2024
e39a405
update examples
clun Dec 4, 2024
7e1039b
add samples
clun Dec 4, 2024
38d60ba
Mapping Row=> Bean and deserialization
clun Dec 5, 2024
2386880
Mapping Row=> Bean and deserialization
clun Dec 5, 2024
de5bf9a
double typing cursor and specialization
clun Dec 5, 2024
91ba89c
double typing cursor and specialization
clun Dec 5, 2024
0fa781c
double typing cursor and specialization
clun Dec 5, 2024
acaf500
double typing cursor and specialization
clun Dec 5, 2024
241b110
samples for updateOne
clun Dec 5, 2024
ce35c3c
samples for updateOne
clun Dec 5, 2024
143a3a4
update
clun Dec 6, 2024
6a1eef6
Samples for DataAPIVector
clun Dec 6, 2024
49557db
javadocs, javadoc, javadoc
clun Dec 7, 2024
b366490
javadocs, javadoc, javadoc
clun Dec 7, 2024
c08267d
javadocs, javadoc, javadoc...46 to go
clun Dec 7, 2024
05af2bc
javadocs, javadoc, javadoc...28 to go
clun Dec 8, 2024
97c8ce0
Fix all warnings, javadocs and compiling issue
clun Dec 9, 2024
a5dfb11
fixes
clun Dec 9, 2024
b6db3d5
[maven-release-plugin] prepare release 2.0.0-PREVIEW
clun Dec 9, 2024
9e4539c
[maven-release-plugin] prepare for next development iteration
clun Dec 9, 2024
eac62bc
[maven-release-plugin] rollback the release of 2.0.0-PREVIEW
clun Dec 9, 2024
8a52aca
removing samples and tools from the build
clun Dec 9, 2024
e0d900e
[maven-release-plugin] prepare release 2.0.0-PREVIEW
clun Dec 9, 2024
b433672
[maven-release-plugin] prepare for next development iteration
clun Dec 9, 2024
e2f3482
Split the controls to avoid NPE
clun Dec 9, 2024
02716eb
fixing #35 and aligning version
clun Dec 9, 2024
ecd471f
Remove Sort from deleteOne
clun Dec 10, 2024
15c5e86
Adding controls on serializations
clun Dec 10, 2024
78c7aea
update samples
clun Dec 10, 2024
5233a1c
Adjust the Java dist version to 17 by default
msmygit Jan 6, 2025
0cd195a
test
clun Jan 28, 2025
76fcffd
tmp update cursor and document dot notation
clun Jan 29, 2025
fb1791a
Changing collection to cursor, iprove distinct, fix getSortVector, ad…
clun Jan 30, 2025
762fb0c
remove secret
clun Jan 30, 2025
4dd9849
fix error on update
clun Jan 30, 2025
f606652
fix error on update
clun Jan 30, 2025
fda3b58
ok
clun Feb 11, 2025
52c3cef
update
clun Feb 11, 2025
6dd92a4
[maven-release-plugin] prepare release 2.0.0-PREVIEW1
clun Feb 11, 2025
46a7129
[maven-release-plugin] prepare for next development iteration
clun Feb 11, 2025
266b0a5
push the json loader to the repo
clun Mar 5, 2025
856867a
removing CRTP
clun Mar 7, 2025
d91d707
FindAndRerank
clun Mar 11, 2025
9548ffc
FindAndRerank
clun Mar 11, 2025
1daf15c
FindAndRerank
clun Mar 11, 2025
e32fb25
FindAndRerank
clun Mar 14, 2025
49d5c2e
FindAndRerank
clun Mar 14, 2025
cd00bbb
FindAndRerank
clun Mar 14, 2025
e2f2668
Update find and Rerank, start reworking the tests
clun Mar 27, 2025
c575a1f
test for BYOV
clun Mar 28, 2025
f6c8288
more test
clun Mar 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
javadocs, javadoc, javadoc...28 to go
  • Loading branch information
clun committed Dec 8, 2024
commit 05af2bca3464593e5dd179269d7502ffdbda2cf8
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ public static DataAPIClient clientHCD() {
* </ul>
* This setup allows developers to focus on application logic rather than database configuration or connectivity.
*
* @param username The username for authenticating with the Data API. This username should have the necessary
* @param password The password for authenticating with the Data API. This password should be kept secure and
* @return A {@link Database} client configured for use with a local Stargate instance, including a default
* keyspace for immediate interaction. This client abstracts database connectivity and administrative tasks,
* streamlining development workflows.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ public static SerdesOptions getSerdesOptions() {
/**
* Register an observer with its className.
*
* @param name observer name
* @param observer command observer
* @return instance of the command options
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -615,6 +615,7 @@ public Collection<Document> getCollection(String collectionName) {
*
* @param collectionName The name of the collection to retrieve.
* @param documentClass The class type of the documents stored in the collection.
* @param <T> The type of the documents stored in the collection.
* @return A {@link Collection} object representing the specified collection, configured with the provided options.
*/
public <T> Collection<T> getCollection(String collectionName, Class<T> documentClass) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
import static com.datastax.astra.client.core.commands.CommandType.TABLE_ADMIN;
import static com.datastax.astra.client.tables.Table.DEFAULT_TABLE_SERIALIZER;

/**
* Options for dropping an index on a table.
*/
@Setter
@Accessors(fluent = true, chain = true)
public class DropTableIndexOptions extends BaseOptions<DropTableIndexOptions> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
import static com.datastax.astra.client.core.commands.CommandType.TABLE_ADMIN;
import static com.datastax.astra.client.tables.Table.DEFAULT_TABLE_SERIALIZER;

/**
* Options for dropping a table.
*/
@Setter
@Accessors(fluent = true, chain = true)
public class DropTableOptions extends BaseOptions<DropTableOptions> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ public class ColumnTypeMapper {
*/
private static final Map<Class<?>, ColumnTypes> typeMapping = new HashMap<>();

/**
* Static initializer block that populates the type mapping.
*/
static {
// Primitive and wrapper types
typeMapping.put(Integer.class, ColumnTypes.INT);
Expand Down Expand Up @@ -104,6 +107,11 @@ public class ColumnTypeMapper {
typeMapping.put(Object.class, ColumnTypes.UNSUPPORTED);
}

/**
* Private constructor to prevent instantiation.
*/
private ColumnTypeMapper() {}

/**
* Retrieves the Cassandra column type corresponding to the given Java class.
* If the type is not explicitly mapped, {@code ColumnTypes.UNSUPPORTED} is returned.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

/**
* Table Name, if not provided the class name will be used
* @return the table name
*/
String value() default "";
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,46 @@
import java.io.Serializable;
import java.util.List;

@Getter @Setter
/**
* Represents the response of a Data API operation involving documents.
* <p>
* This class provides a structured representation of a document response,
* including its unique identifier(s) and status. The class is serializable
* and integrates with JSON serialization frameworks like Jackson.
* </p>
*/
@Getter
@Setter
public class DataAPIDocumentResponse implements Serializable {

/**
* A list of objects representing the unique identifier(s) of the document.
* <p>
* This field is annotated with {@link JsonProperty} to map it to the {@code "_id"}
* key in JSON.
* </p>
*/
@JsonProperty("_id")
private List<Object> id;

/**
* The status of the document operation, such as "SUCCESS" or "FAILED".
*/
private String status;

/**
* Default constructor for serialization frameworks.
*/
public DataAPIDocumentResponse() {}

/**
* Converts the {@code DataAPIDocumentResponse} object into a string representation.
* This implementation uses {@link RowSerializer#marshall(Object)} for serialization.
*
* @return a string representation of this object
*/
@Override
public String toString() {
return new RowSerializer().marshall(this);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
* such as status information, error details, and data returned by 'find' operations. It provides flexibility to handle
* various types of responses within a unified framework.
*/
@Getter
@Setter
@Getter @Setter
public class DataAPIResponse implements Serializable {

/**
Expand Down Expand Up @@ -129,6 +128,14 @@ public <T> Map<String, T> getStatusKeyAsMap(@NonNull String key, Class<T> target
.constructMapType(Map.class, String.class, targetClass));
}

/**
* Retrieves a single object from the 'status' map based on the provided key, casting it to the specified class.
* This method is suitable for cases where the status information contains a single object under a specific key.
*
* @param targetClass The class to which the object should be cast.
* @param <T> The type of the object to be returned.
* @return The object associated with the specified key, cast to the specified class; {@code null} if the key does not exist.
*/
public <T> T getStatus(Class<T> targetClass) {
return serializer.getMapper().convertValue(status, targetClass);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
import java.util.List;
import java.util.Map;

/**
* Status of the Data API.
*/
@Getter @Setter
public class DataAPIStatus {

Expand Down Expand Up @@ -84,6 +87,12 @@ public class DataAPIStatus {
@JsonIgnore
private DataAPISerializer serializer;

/**
* Default constructor.
*/
public DataAPIStatus() {
}

/**
* Access the insertedIds mapping.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,16 @@ public Map<String, Integer> getPartitionSort() {
return cc;
}

/**
* Create a table command based on the annotated fields.
*
* @param tableName
* the table name
* @param clazz
* the class
* @return
* a document representing the table command
*/
public static Document createTableCommand(String tableName, Class<?> clazz) {
EntityBeanDefinition<?> bean = new EntityBeanDefinition<>(clazz);
if (Utils.hasLength(bean.getName()) && !bean.getName().equals(tableName)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
import lombok.Data;

import java.lang.reflect.Method;
import java.lang.reflect.Type;

/**
* Definition of a field in an entity.
*/
@Data
public class EntityFieldDefinition {

Expand All @@ -55,4 +57,9 @@ public class EntityFieldDefinition {
// @PartitionSort
private Integer partitionSortPosition;
private SortOrder partitionSortOrder;

/**
* Default constructor.
*/
public EntityFieldDefinition() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ public class DurationDeserializer extends JsonDeserializer<Duration> {
*/
private static final Pattern NEGATIVE_PATTERN = Pattern.compile("^-(.*)");

/**
* Default constructor.
*/
public DurationDeserializer() {}

/**
* Deserializes a JSON string into a {@link Duration} object.
* <p>
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy