You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Trejkaz <tr...@trypticon.org> on 2017/02/22 02:33:44 UTC

Opening Derby database from a Path (not a File, not a String)

Hi all.

A while ago I opened this ticket to allow opening a database from an NIO2 Path.

https://issues.apache.org/jira/browse/DERBY-6912

I want to be able to open from a Path because everything other file we
modify is done via a Path, allowing more universal abstraction of
where the data actually goes.

Does anyone else on the mailing list have any creative workarounds
which might work well enough until the improvement itself is
implemented?

To re-summarise the problems:

* Path cannot be reversibly converted to String.

* BasicEmbeddedDataSource40 forces me to provide the databaseName
  as a String.

* Even if I somehow found a way to pack the Path into the additional
  options for the connection,
  StorageFactory#init(String, String, String, String) only passes through
  basic information, not giving me access to the additional options.

TX