Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Motivation:

Complete the schema management API with a remove schema call

Contact:

full name Daniele Romagnoli

Tracker:

http://jira

JIRA
serverjira.codehaus.org
/browse/
keyGEOT-
XXXX
2333

Tagline:

Excerpt

We add, we update... we don't remove?

Table of Contents

Description

The current DataAccess/DataStore API provides means to create and update a schema, but not a way to remove it.
The DataAccess interface will be modified as follows:

Code Block
interface DataAccess {
     ...
      /**
     * Used to permanently remove a schema from the underlying storage
     * <p>
     * This functionality is similar to an "drop table" statement in SQL. Implementation
     * is optional; it may not be supported by all servers or files.
     * @param typeName
     * @throws IOException if the operation failed
     * @throws UnsupportedOperation if functionality is not available
     */
    void removeSchema(Name typeName) throws IOException;
     ...

}

Whilst the DataStore interface will see the following new method:

Code Block
interface DataStore {
     ...
      /**
     * Used to permanently remove a schema from the underlying storage
     * <p>
     * This functionality is similar to an "drop table" statement in SQL. Implementation
     * is optional; it may not be supported by all servers or files.
     * @param typeName
     * @throws IOException if the operation failed
     * @throws UnsupportedOperation if functionality is not available
     */
    void removeSchema(String typeName) throws IOException;
     ...

}

The code base will be modified, on trunk only, so that the new methods are implemented by throwing an UnsupportedOperationException in the common base classes, and making sure all the code base keeps on building.
Moreover, the support to actually drop the schemas will be implemented in the JDBC data stores.

Status

Voting has not started yetThis proposal was approved, but has been on hold waiting funding:

...

 

no progress

(tick)

done

(error)

impeded

(warning)

lack mandate/funds/time

(question)

volunteer needed

  1. DataStore API changed based on BEFORE / AFTERDescription
    1. (tick)Update
    default implementation
  2. Update wiki (both module matrix and upgrade to to 2.5 pages) |
  3. Remove deprecated code from GeoTools project
  4. Update the user guide
  5. Update or provided sample code in demo
  6. review user documentation

Documentation Changes

We may want to show the new API support in some example.

    1. Interfaces
    2. (tick)Unsupported Operation for ContentDataStore and AbstractDataStore
  1. Implement for JDBCDataStore
    1. (tick) Implement using drop table
    2. (warning)Individual Dialects may need additional hooks to allow for spatial index maintenance, geometry columns and so on
    3. (tick) https://github.com/geotools/geotools/pull/308
  2. (warning)User Guide - datastore code example
  3. Implement Shapefile DataStore
    1. (warning) Implementation will need to remove associated sidecar files
    2. https://jira.codehaus.org/browse/GEOT-4613
  4. Implement DirectoryDataStore
    1. (warning)Implementation will need to delegate to FileDataStore (and may require API change)
  5. (warning) Implement PropertyDataStore
  6. (warning)Backport JDBCDataStore implementation to stable series