Example #1
0
class CypherEngine(object):

    def __init__(self,db):
        self._engine = ExecutionEngine(db)
        self._parser = CypherParser()
    
    def execute(self, query, **params):
        if len(params.keys()) > 0:
            return ExecutionResult(self._engine.execute(query,to_java(params)))
        return ExecutionResult(self._engine.execute(query))
        
    def prepare(self,query):
        return self._parser.parse(query)
Example #2
0
class CypherEngine(object):

    def __init__(self,db):
        self._engine = ExecutionEngine(db)
    
    def execute(self, query, **params):
        if len(params.keys()) > 0:
            return ExecutionResult(self._engine.execute(query,to_java(params)))
        return ExecutionResult(self._engine.execute(query))
            
    def prepare(self,query):
        ''' Deprecated. Cypher automatically caches query plans now,
        so there is no reason to manually pre-parse queries.
        
        This method simply returns the string you give it now.
        '''
        return query
Example #3
0
class CypherEngine(object):
    def __init__(self, db):
        self._engine = ExecutionEngine(db)

    def execute(self, query, **params):
        if len(params.keys()) > 0:
            return ExecutionResult(self._engine.execute(
                query, to_java(params)))
        return ExecutionResult(self._engine.execute(query))

    def prepare(self, query):
        ''' Deprecated. Cypher automatically caches query plans now,
        so there is no reason to manually pre-parse queries.
        
        This method simply returns the string you give it now.
        '''
        return query
Example #4
0
 def __init__(self,db):
     self._engine = ExecutionEngine(db)
Example #5
0
 def __init__(self, db):
     self._engine = ExecutionEngine(db)
Example #6
0
 def __init__(self,db):
     self._engine = ExecutionEngine(db)
     self._parser = CypherParser()