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
Fields Modifier and Type Field Description protected FilebaseDirectorybase location to store temporary filesstatic DataAccessFactory.ParamDB_PATHParameter for DuckDB database filestatic DataAccessFactory.ParamIN_MEMORYParameter for memory only database-
Fields 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 Constructor Description DuckDBDataStoreFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddDatabaseSpecificParameters(Map<String,Object> parameters)Allows subclasses to add their specific parametersprotected SQLDialectcreateSQLDialect(JDBCDataStore dataStore)Creates the dialect that the datastore uses for communication with the underlying database.FilegetBaseDirectory()The base location for any temporary files.protected StringgetDatabaseID()Returns a string to identify the type of the database.StringgetDescription()Describe the nature of the datasource constructed by this factory.StringgetDisplayName()Name suitable for display to end user.protected StringgetJDBCUrl(Map<String,?> params)Builds up the JDBC url in a jdbc::// : / Override if you need a different setup voidsetBaseDirectory(File baseDirectory)Sets the base location for any temporary files.protected JDBCDataStoresetupDataStore(JDBCDataStore dataStore, Map<String,?> params)Allows subclasses to perform additional setup for their specific datastores-
Methods 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 Detail
-
IN_MEMORY
public static final DataAccessFactory.Param IN_MEMORY
Parameter for memory only database
-
DB_PATH
public static final DataAccessFactory.Param DB_PATH
Parameter for DuckDB database file
-
baseDirectory
protected File baseDirectory
base location to store temporary files
-
-
Method Detail
-
setBaseDirectory
public void setBaseDirectory(File baseDirectory)
Sets the base location for any temporary files.- Parameters:
baseDirectory- A directory.
-
getBaseDirectory
public File getBaseDirectory()
The base location for any temporary files.
-
getDisplayName
public String getDisplayName()
Description copied from interface:DataAccessFactoryName suitable for display to end user.A non localized display name for this data store type.
- Specified by:
getDisplayNamein interfaceDataAccessFactory- Overrides:
getDisplayNamein classJDBCDataStoreFactory- Returns:
- A short name suitable for display in a user interface.
-
getDescription
public String getDescription()
Description copied from interface:DataAccessFactoryDescribe the nature of the datasource constructed by this factory.A non localized description of this data store type.
- Specified by:
getDescriptionin interfaceDataAccessFactory- Returns:
- A human readable description that is suitable for inclusion in a list of available datasources.
-
addDatabaseSpecificParameters
protected void addDatabaseSpecificParameters(Map<String,Object> parameters)
Description copied from class:AbstractDuckDBDataStoreFactoryAllows subclasses to add their specific parameters- Specified by:
addDatabaseSpecificParametersin classAbstractDuckDBDataStoreFactory
-
getDatabaseID
protected String getDatabaseID()
Description copied from class:JDBCDataStoreFactoryReturns a string to identify the type of the database.Example: 'postgis'.
- Specified by:
getDatabaseIDin classJDBCDataStoreFactory
-
getJDBCUrl
protected String getJDBCUrl(Map<String,?> params) throws IOException
Description copied from class:JDBCDataStoreFactoryBuilds up the JDBC url in a jdbc::// : / Override if you need a different setup - Specified by:
getJDBCUrlin classAbstractDuckDBDataStoreFactory- Throws:
IOException
-
createSQLDialect
protected SQLDialect createSQLDialect(JDBCDataStore dataStore)
Description copied from class:JDBCDataStoreFactoryCreates the dialect that the datastore uses for communication with the underlying database.- Specified by:
createSQLDialectin classJDBCDataStoreFactory- Parameters:
dataStore- The datastore.
-
setupDataStore
protected JDBCDataStore setupDataStore(JDBCDataStore dataStore, Map<String,?> params) throws IOException
Description copied from class:AbstractDuckDBDataStoreFactoryAllows subclasses to perform additional setup for their specific datastores- Specified by:
setupDataStorein classAbstractDuckDBDataStoreFactory- Throws:
IOException
-
-