Package ai.starlake.jdbc
Class StarlakeSession
java.lang.Object
ai.starlake.jdbc.StarlakeSession
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStarlakeSession(StarlakeConnection conn, String id, Map<String, String> options) StarlakeSession(StarlakeConnection conn, Map<String, String> options) -
Method Summary
Modifier and TypeMethodDescriptionvoidconnectionProperties(String jdbcUrl) Extracts the values of "db" and "schema" from a JDBC URL.voidstatic Stringstatic StringgetHistoryTable(String sessionId) static StringgetMappingTable(String sessionId) static StarlakeSessiongetPersistingSession(StarlakeConnection conn, String id, Map<String, String> options) ai.starlake.transpiler.schema.CaseInsensitiveLinkedHashMap<net.sf.jsqlparser.schema.Table>booleanstatic booleanbooleanbooleanstatic booleanrewriteSql(net.sf.jsqlparser.statement.Statement st, String sqlStr) setEndInstant(Instant endInstant) setStatus(StarlakeSession.Status status)
-
Field Details
-
BASE62
- See Also:
-
LOGGER
-
dbObjects
public final ai.starlake.jdbc.DBObjects dbObjects
-
-
Constructor Details
-
StarlakeSession
public StarlakeSession(StarlakeConnection conn, String id, Map<String, String> options) throws SQLException- Throws:
SQLException
-
StarlakeSession
- Throws:
SQLException
-
-
Method Details
-
connectionProperties
Extracts the values of "db" and "schema" from a JDBC URL. Both values are optional and may be null.- Parameters:
jdbcUrl- The JDBC connection URL.- Returns:
- A map with keys "db" and "schema", values may be null if not present.
-
isPersistent
public boolean isPersistent() -
isTrue
-
isTrue
-
isFalse
-
isFalse
-
getMappingTable
-
getMappingTable
-
getHistoryTable
-
getHistoryTable
-
getPersistingSession
public static StarlakeSession getPersistingSession(StarlakeConnection conn, String id, Map<String, String> options) throws SQLException- Throws:
SQLException
-
generateUniqueID
-
drop
-
apply
-
rewriteSql
public String rewriteSql(net.sf.jsqlparser.statement.Statement st, String sqlStr) throws SQLException - Throws:
SQLException
-
getSessionId
-
getStatus
-
setStatus
-
getStartInstant
-
getEndInstant
-
setEndInstant
-
getReplacementTables
public ai.starlake.transpiler.schema.CaseInsensitiveLinkedHashMap<net.sf.jsqlparser.schema.Table> getReplacementTables() -
getStatements
-