Package com.dtsx.astra.sdk.cassio
Class CassIO
java.lang.Object
com.dtsx.astra.sdk.cassio.CassIO
Utility to work with CassIO and Astra
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic com.datastax.oss.driver.api.core.CqlSession
Accessing the session.static com.datastax.oss.driver.api.core.CqlSession
init
(com.datastax.oss.driver.api.core.CqlSession cqlSession) Initialization from db is and region.static com.datastax.oss.driver.api.core.CqlSession
Initialization from db is and region.static com.datastax.oss.driver.api.core.CqlSession
Initialization from db is and region.static com.datastax.oss.driver.api.core.CqlSession
Initialization from db is and region.static MetadataVectorTable
metadataVectorTable
(String tableName, int vectorDimension) Create a new table to store vectors.
-
Constructor Details
-
CassIO
public CassIO()Default constructor.
-
-
Method Details
-
getCqlSession
public static com.datastax.oss.driver.api.core.CqlSession getCqlSession()Accessing the session.- Returns:
- the cassandra session
-
init
public static com.datastax.oss.driver.api.core.CqlSession init(com.datastax.oss.driver.api.core.CqlSession cqlSession) Initialization from db is and region.- Parameters:
cqlSession
- cassandra connection- Returns:
- the cassandra session initialized
-
init
public static com.datastax.oss.driver.api.core.CqlSession init(String token, UUID dbId, String dbRegion) Initialization from db is and region.- Parameters:
token
- astra tokendbId
- database identifier.dbRegion
- database region,- Returns:
- the cassandra session initialized
-
init
public static com.datastax.oss.driver.api.core.CqlSession init(String token, UUID dbId, String dbRegion, String keyspace) Initialization from db is and region.- Parameters:
token
- astra tokendbId
- database identifier.dbRegion
- database region,keyspace
- destination keyspace- Returns:
- the cassandra session initialized
-
init
public static com.datastax.oss.driver.api.core.CqlSession init(String token, UUID dbId, String dbRegion, String keyspace, AstraEnvironment env) Initialization from db is and region.- Parameters:
token
- astra tokendbId
- database identifier.dbRegion
- database region,keyspace
- destination keyspaceenv
- destination environment- Returns:
- the cassandra session initialized
-
metadataVectorTable
Create a new table to store vectors.- Parameters:
tableName
- table namevectorDimension
- vector dimension- Returns:
- table to store vector
-