Class SQLStore

java.lang.Object
org.apache.sis.storage.DataStore
org.apache.sis.storage.sql.SQLStore
All Implemented Interfaces:
AutoCloseable, Aggregate, Resource, Localized

public class SQLStore extends DataStore implements Aggregate
A data store capable to read and create features from a spatial database. SQLStore requires a DataSource to be specified (indirectly) at construction time. The DataSource should provide pooled connections, because SQLStore will frequently opens and closes them.
Since:
1.0
Version:
1.3
Author:
Johann Sorel (Geomatys), Martin Desruisseaux (Geomatys)
  • Constructor Details

    • SQLStore

      public SQLStore(SQLStoreProvider provider, StorageConnector connector, ResourceDefinition... resources) throws DataStoreException
      Creates a new SQLStore for the given data source and tables, views or queries. The given connector shall contain a DataSource instance. Tables or views to include in the store are specified by the resources argument. Only the main tables need to be specified; dependencies will be followed automatically.
      Parameters:
      provider - the factory that created this DataStore instance, or null if unspecified.
      connector - information about the storage (JDBC data source, etc).
      resources - tables, views or queries to include in this store.
      Throws:
      DataStoreException - if an error occurred while creating the data store for the given storage.
      Since:
      1.1
  • Method Details