DuckDb
Represents the DuckDB database type.
This class provides methods to convert data from a ResultSet to the appropriate type for DuckDB, and to generate the corresponding column schema.
Properties
The name of the database as specified in the JDBC URL.
Specifies the default batch size for fetching rows from the database during query execution.
Default mapping of Java SQL Types to KType.
Specifies the default timeout in seconds for database queries.
the name of the class of the DuckDB JDBC driver
The table type(s) (TABLE_TYPE) of ordinary tables in the SQL database, used by the readAllSqlTables functions as a filter when querying the database for all the tables it has using DatabaseMetaData.getTables.
Functions
Builds a DataColumn from the given (preprocessed) values, adhering to targetColumnSchema.
Builds a SELECT query for reading from a table.
Constructs a SQL query with a limit clause.
How to retrieve the correct table metadata when using DataFrame.readAllSqlTables and DataFrameSchema.readAllSqlTables. The names of these can be found in the DatabaseMetaData implementation of the DuckDB JDBC integration.
Configures the provided PreparedStatement for optimized read operations.
Creates a database connection using the provided configuration.
Returns the type of the objects returned by getValueFromResultSet for the given column. Also called type J.
Returns the type of the objects returned by preprocessValue for the given column. Also called type D.
Retrieves column metadata from a JDBC ResultSet.
Returns the target schema of the given column which buildDataColumn will adhere to. This schema corresponds to type P, in the sense that it will describe the schema of DataColumn<P>.
Extracts a value from the result set for the given column.
How to filter out system tables from user-created ones when using DataFrame.readAllSqlTables and DataFrameSchema.readAllSqlTables.
How a column type from JDBC, sqlTypeName, is read in Java/Kotlin. The returned type must exactly follow ResultSet.getObject of your specific database's JDBC driver. Returning null defer the implementation to the default one (which may not always be correct).
Parses "X" and "X123" into "X", and "X" into "X"
Parses "MAP(X, Y)" into "X" and "Y", taking parentheses into account
Parses
(Potentially) preprocesses the value for the given column before collecting it in a DataFrame DataColumn.
Quotes an identifier (table or column name) according to database-specific rules.
Helper function to convert this list of values to a DataColumn<P>.