Skip to content

add ability to remove feature types

Jody Garnett edited this page Apr 11, 2015 · 8 revisions
  • Motivation: Complete the schema management API with a remove schema call

  • Contact: Daniele Romagnoli

  • Tagline: We add, we update... we don't remove?

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:

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:

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

This proposal was approved, but has been on hold waiting funding:

Tasks

This section is used to make sure your proposal is complete (did you remember documentation?) and has enough paid or volunteer time lined up to be a success

        | :white_check_mark: | :no_entry: | :warning:               | :negative_squared_cross_mark: |

------------|--------------------|------------|-------------------------|-------------------------------| no progress | done | impeded | lack mandate/funds/time | volunteer needed |

  1. DataStore API changed based on Description\

    1. ✅Update Interfaces
    2. ✅Unsupported Operation for ContentDataStore and AbstractDataStore
  2. Implement for JDBCDataStore

    1. ✅ Implement using drop table
    2. ⚠️Individual Dialects may need additional hooks to allow for spatial index maintenance, geometry columns and so on
    3. ✅ https://github.com/geotools/geotools/pull/308
  3. ⚠️User Guide - datastore code example

  4. Implement Shapefile DataStore

    1. ⚠️ Implementation will need to remove associated sidecar files
    2. https://osgeo-org.atlassian.net/browse/GEOT-4613
  5. Implement DirectoryDataStore

    1. ⚠️Implementation will need to delegate to FileDataStore (and may require API change)
  6. ⚠️ Implement PropertyDataStore

  7. ⚠️Backport JDBCDataStore implementation to stable series

Clone this wiki locally