Package org.geotools.data.duckdb
Class DuckDBDataStoreFactory
Object
JDBCDataStoreFactory
AbstractDuckDBDataStoreFactory
DuckDBDataStoreFactory
- All Implemented Interfaces:
DataAccessFactory
,DataStoreFactorySpi
,Factory
public class DuckDBDataStoreFactory
extends AbstractDuckDBDataStoreFactory
implements DataStoreFactorySpi
-
Nested Class Summary
Nested classes/interfaces inherited from interface DataAccessFactory
DataAccessFactory.Param
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected File
base location to store temporary filesstatic final DataAccessFactory.Param
Parameter for DuckDB database filestatic final DataAccessFactory.Param
Parameter for memory only databaseFields inherited from class AbstractDuckDBDataStoreFactory
FETCHSIZE, NAMESPACE, SCREENMAP, SIMPLIFY
Fields inherited from class JDBCDataStoreFactory
BATCH_INSERT_SIZE, CALLBACK_FACTORY, DATABASE, DATASOURCE, DBTYPE, EVICTOR_TESTS_PER_RUN, EXPOSE_PK, HOST, MAX_OPEN_PREPARED_STATEMENTS, MAXCONN, MAXWAIT, MIN_EVICTABLE_TIME, MINCONN, PASSWD, PK_METADATA_TABLE, PORT, SCHEMA, SQL_ON_BORROW, SQL_ON_RELEASE, TEST_WHILE_IDLE, TIME_BETWEEN_EVICTOR_RUNS, USER, VALIDATECONN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addDatabaseSpecificParameters
(Map<String, Object> parameters) Allows subclasses to add their specific parametersprotected SQLDialect
createSQLDialect
(JDBCDataStore dataStore) Creates the dialect that the datastore uses for communication with the underlying database.The base location for any temporary files.protected String
Returns a string to identify the type of the database.Describe the nature of the datasource constructed by this factory.Name suitable for display to end user.protected String
getJDBCUrl
(Map<String, ?> params) Builds up the JDBC url in a jdbc::// : / Override if you need a different setup void
setBaseDirectory
(File baseDirectory) Sets the base location for any temporary files.protected JDBCDataStore
setupDataStore
(JDBCDataStore dataStore, Map<String, ?> params) Allows subclasses to perform additional setup for their specific datastoresMethods inherited from class AbstractDuckDBDataStoreFactory
createDataSource, createDataStoreInternal, getDriverClassName, getValidationQuery, setupParameters
Methods inherited from class JDBCDataStoreFactory
canProcess, checkDBType, checkDBType, createDataSource, createDataStore, createNewDataStore, createSQLDialect, getImplementationHints, getParametersInfo, isAvailable
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface DataAccessFactory
canProcess, getParametersInfo, isAvailable
Methods inherited from interface DataStoreFactorySpi
createDataStore, createNewDataStore
Methods inherited from interface Factory
getImplementationHints
-
Field Details
-
IN_MEMORY
Parameter for memory only database -
DB_PATH
Parameter for DuckDB database file -
baseDirectory
base location to store temporary files
-
-
Constructor Details
-
DuckDBDataStoreFactory
public DuckDBDataStoreFactory()
-
-
Method Details
-
setBaseDirectory
Sets the base location for any temporary files.- Parameters:
baseDirectory
- A directory.
-
getBaseDirectory
The base location for any temporary files. -
getDisplayName
Description copied from interface:DataAccessFactory
Name suitable for display to end user.A non localized display name for this data store type.
- Specified by:
getDisplayName
in interfaceDataAccessFactory
- Overrides:
getDisplayName
in classJDBCDataStoreFactory
- Returns:
- A short name suitable for display in a user interface.
-
getDescription
Description copied from interface:DataAccessFactory
Describe the nature of the datasource constructed by this factory.A non localized description of this data store type.
- Specified by:
getDescription
in interfaceDataAccessFactory
- Returns:
- A human readable description that is suitable for inclusion in a list of available datasources.
-
addDatabaseSpecificParameters
Description copied from class:AbstractDuckDBDataStoreFactory
Allows subclasses to add their specific parameters- Specified by:
addDatabaseSpecificParameters
in classAbstractDuckDBDataStoreFactory
-
getDatabaseID
Description copied from class:JDBCDataStoreFactory
Returns a string to identify the type of the database.Example: 'postgis'.
- Specified by:
getDatabaseID
in classJDBCDataStoreFactory
-
getJDBCUrl
Description copied from class:JDBCDataStoreFactory
Builds up the JDBC url in a jdbc::// : / Override if you need a different setup - Specified by:
getJDBCUrl
in classAbstractDuckDBDataStoreFactory
- Throws:
IOException
-
createSQLDialect
Description copied from class:JDBCDataStoreFactory
Creates the dialect that the datastore uses for communication with the underlying database.- Specified by:
createSQLDialect
in classJDBCDataStoreFactory
- Parameters:
dataStore
- The datastore.
-
setupDataStore
protected JDBCDataStore setupDataStore(JDBCDataStore dataStore, Map<String, ?> params) throws IOExceptionDescription copied from class:AbstractDuckDBDataStoreFactory
Allows subclasses to perform additional setup for their specific datastores- Specified by:
setupDataStore
in classAbstractDuckDBDataStoreFactory
- Throws:
IOException
-