use of org.neo4j.kernel.impl.query.clientconnection.ShellConnectionInfo in project neo4j by neo4j.
the class Start method createTransactionContext.
private TransactionalContext createTransactionContext(String queryText, Map<String, Object> queryParameters, Session session) {
DependencyResolver dependencyResolver = getDependencyResolver();
GraphDatabaseQueryService graph = dependencyResolver.resolveDependency(GraphDatabaseQueryService.class);
TransactionalContextFactory contextFactory = Neo4jTransactionalContextFactory.create(graph, new PropertyContainerLocker());
InternalTransaction transaction = graph.beginTransaction(KernelTransaction.Type.implicit, SecurityContext.AUTH_DISABLED);
return contextFactory.newContext(new ShellConnectionInfo(session.getId()), transaction, queryText, queryParameters);
}
use of org.neo4j.kernel.impl.query.clientconnection.ShellConnectionInfo in project neo4j by neo4j.
the class ClientConnectionInfoTest method connectionDetailsForShellSession.
@Test
public void connectionDetailsForShellSession() throws Exception {
// given
ClientConnectionInfo clientConnection = new ShellConnectionInfo(1).withUsername("FULL");
// when
String connectionDetails = clientConnection.asConnectionDetails();
// then
assertEquals("shell-session\tshell\t1\tFULL", connectionDetails);
}
Aggregations