Example #1
0
        private TransactionalContext CreateTransactionContext(GraphDatabaseQueryService graph, InternalTransaction tx, string query)
        {
            PropertyContainerLocker     locker         = new PropertyContainerLocker();
            TransactionalContextFactory contextFactory = Neo4jTransactionalContextFactory.create(graph, locker);

            return(contextFactory.NewContext(ClientConnectionInfo.EMBEDDED_CONNECTION, tx, query, EMPTY_MAP));
        }
Example #2
0
        public virtual TransactionalContext Create(HttpServletRequest request, GraphDatabaseQueryService service, Transaction_Type type, LoginContext loginContext, string query, IDictionary <string, object> queryParameters)
        {
            TransactionalContextFactory contextFactory   = Neo4jTransactionalContextFactory.create(service, _locker);
            ClientConnectionInfo        clientConnection = HttpConnectionInfoFactory.create(request);
            InternalTransaction         transaction      = service.BeginTransaction(type, loginContext);

            return(contextFactory.NewContext(clientConnection, transaction, query, ValueUtils.asMapValue(queryParameters)));
        }
        private static TransactionalContextFactory NewTransactionalContextFactory(GraphDatabaseAPI db)
        {
            GraphDatabaseQueryService queryService = ResolveDependency(db, typeof(GraphDatabaseQueryService));

            return(Neo4jTransactionalContextFactory.create(queryService, _locker));
        }