Hi,
currently the JDBCDataStore allows to create feature types. Recently, we
added the ability
to drop existing ones.

One bit of functionality that is still missing is the ability to manipulate
indexes, create and
drop them, which would come in handy for all those situation where you know
you'll
be filtering a lot on a certain (group) of fields, point in case, SLDs that
perform scale
based attribute selections, or the creation of a new type whose
time/elevation attributes
are meant to be exposed to the client for filtering (e..g, WMS with
time/elevation support).

Now, creating an index has a basic shared syntax:

CREATE INDEX NAME on TABLE(ATTRIBUTE_1, ..., ATTRIBUTE_N)

but many database support extras which are specific to the database, like
the type of index
to be created. So a basic createIndex statement would look as:

JDBCDataStore.createIndex(String typeName, String IndexName, List<String>
attributes, Hints hints)

where the hints portion allows for database specific extras, in case a
certain dialect decides
to handle them.
Alternatively, we could have a JDBCIndex  bean with the same attributes:

class JDBCIndex {
  String typeName
  String indexName;
   List<String> attributes;
   Hints hints;

   public JDBCIndex(String typeName, String Indexname, String attribute);
   public JDBCIndex(String typeName, String indexName, String... attribute);

   ...
}

The above would come in handy the day we also want to be able to  list the
indexes,
and drop them, as it would support:

List<JDBCIndex> getIndices(String typeName);
void dropIndex(String typeName, String indexName);

I'm not suggesting to implement this now (we had only createSchema for
years and
we managed to get by anyways) but believe it's still important to think
about a future
in which those will be added, making the current design thinking about the
needs
of a drop and list.

Cheers
Andrea

-- 
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more
information.
==

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39  339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to