Wolfgang-Schuetzelhofer / jcypher

Java access to Neo4J graph databases at multiple levels of abstraction
Apache License 2.0
86 stars 15 forks source link

make dbaccess implementation fully configurable at instantiation time #33

Closed jknack closed 6 years ago

jknack commented 7 years ago

DBAccessFactory it is nice for quick start, but will be nice to have a way to manually instantiated/configure DBAccess implementations.

For example make BoltDBAccess fully configurable via constructor:

public BoltDBAccess(Driver driver) {
  ...
}

public BoltDBAccess(String uri, AuthToken token) {
  ...
}

Similar for embedded implementation:

public EmbeddedDBAccess(GraphDatabaseService db) {
  ...
}

Each implementation has a clear contract of what dependencies needs.

Here are some other benefits of such solution:

What do you think?

Wolfgang-Schuetzelhofer commented 7 years ago

Good idea, I will consider this for the next release.

Best regards