Package com.illumon.iris.db.tables.utils
Class JdbcHelpers
java.lang.Object
com.illumon.iris.db.tables.utils.JdbcHelpers
Tools for reading data from a JDBC source into an in-memory Deephaven table.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOptions applicable when reading JDBC data into a Deephaven in-memory table. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TableReturn a JDBC query result as an in-memory Deephaven table.static TablereadJdbc(String jdbcDriver, String jdbcUrl, String query, JdbcHelpers.ReadJdbcOptions options) Return a JDBC query result as an in-memory Deephaven table.static TableReturn a JDBC query result as an in-memory Deephaven table.static TablereadJdbc(String jdbcDriver, String jdbcUrl, String user, String password, String query, JdbcHelpers.ReadJdbcOptions options) Return a JDBC query result as an in-memory Deephaven table.static TablereadJdbc(String jdbcDriver, String jdbcUrl, String user, String password, String catalog, String schema, String query, JdbcHelpers.ReadJdbcOptions options) Return a JDBC query result as an in-memory Deephaven table.static TableReturn a JDBC query result as an in-memory Deephaven table.static TablereadJdbc(ResultSet resultSet, JdbcHelpers.ReadJdbcOptions options, StatusCallback progress) Return a JDBC query result as an in-memory Deephaven table.static TablereadJdbc(ResultSet resultSet, StatusCallback progress) Return a JDBC query result as an in-memory Deephaven table.static JdbcHelpers.ReadJdbcOptionsReturns a new options object that the user can use to customize a readJdbc operation.
-
Constructor Details
-
JdbcHelpers
public JdbcHelpers()
-
-
Method Details
-
readJdbc
public static Table readJdbc(String jdbcDriver, String jdbcUrl, String user, String password, String query) throws IOException, SQLException Return a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
jdbcDriver- JDBC driver to usejdbcUrl- JDBC URL/connection stringuser- JDBC userpassword- JDBC passwordquery- an SQL query- Returns:
- in memory table with results of the given query
- Throws:
IOException- if an error occurs with Schema generation or table writingSQLException- is a JDBC related error occurs
-
readJdbc
public static Table readJdbc(String jdbcDriver, String jdbcUrl, String user, String password, String query, JdbcHelpers.ReadJdbcOptions options) throws IOException, SQLException Return a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
jdbcDriver- JDBC driver to usejdbcUrl- JDBC URL/connection stringuser- JDBC userpassword- JDBC passwordquery- an SQL queryoptions- options to apply to the read/mapping operation- Returns:
- in memory table with results of the given query
- Throws:
IOException- if an error occurs with Schema generation or table writingSQLException- is a JDBC related error occurs
-
readJdbc
public static Table readJdbc(String jdbcDriver, String jdbcUrl, String query) throws IOException, SQLException Return a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
jdbcDriver- JDBC driver to usejdbcUrl- JDBC URL/connection stringquery- an SQL query- Returns:
- in memory table with results of the given query
- Throws:
IOException- if an error occurs with Schema generation or table writingSQLException- if a JDBC-related error occurs
-
readJdbc
public static Table readJdbc(String jdbcDriver, String jdbcUrl, String query, JdbcHelpers.ReadJdbcOptions options) throws IOException, SQLException Return a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
jdbcDriver- JDBC driver to usejdbcUrl- JDBC URL/connection stringquery- an SQL queryoptions- options to apply to the read/mapping operation- Returns:
- in memory table with results of the given query
- Throws:
IOException- if an error occurs with Schema generation or table writingSQLException- if a JDBC-related error occurs
-
readJdbc
public static Table readJdbc(String jdbcDriver, String jdbcUrl, String user, String password, String catalog, String schema, String query, JdbcHelpers.ReadJdbcOptions options) throws IOException, SQLException Return a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
jdbcDriver- JDBC driver to usejdbcUrl- JDBC URL/connection stringuser- JDBC userpassword- JDBC passwordcatalog- the desired JDBC system catalog (specify null for default)schema- the desired JDBC schema (specify null for default)query- an SQL queryoptions- options to apply to the read/mapping operation- Returns:
- in memory table with results of the given query
- Throws:
IOException- if an error occurs with Schema generation or table writingSQLException- if a JDBC-related error occurs
-
readJdbc
Return a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
resultSet- an open JDBC ResultSet- Returns:
- in memory table with results of the given ResultSet
- Throws:
IOException- if an error occurs with Schema generation or table writing
-
readJdbc
Return a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
resultSet- an open JDBC ResultSetprogress- status callback- Returns:
- in memory table with results of the given ResultSet
- Throws:
IOException- if an error occurs with Schema generation or table writing
-
readJdbc
public static Table readJdbc(ResultSet resultSet, JdbcHelpers.ReadJdbcOptions options, StatusCallback progress) throws IOException Return a JDBC query result as an in-memory Deephaven table. Standard JDBC-to-Deephaven type mapping applies.- Parameters:
resultSet- an open JDBC ResultSetoptions- options to apply to the read/mapping operationprogress- status callback- Returns:
- in memory table with results of the given ResultSet
- Throws:
IOException- if an error occurs with Schema generation or table writing
-
readJdbcOptions
Returns a new options object that the user can use to customize a readJdbc operation.- Returns:
- a new ReadJdbcOptions object
-