connect

fun connect(): Pair<Session, SessionFactory>

Connects to the neo4j db.

Return

a Pair of Optionals of the Session and the SessionFactory, if it is possible to connect to neo4j. If it is not possible, the return value is a Pair of empty Optionals.

Throws

, if the thread is interrupted while it try´s to connect to the neo4j db.

, if there is no connection to bolt://localhost:7687 possible