예제 #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)
예제 #2
0
파일: cypher.py 프로젝트: Brackets/neo4j
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
예제 #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
예제 #4
0
파일: cypher.py 프로젝트: Brackets/neo4j
 def __init__(self,db):
     self._engine = ExecutionEngine(db)
예제 #5
0
 def __init__(self, db):
     self._engine = ExecutionEngine(db)
예제 #6
0
 def __init__(self,db):
     self._engine = ExecutionEngine(db)
     self._parser = CypherParser()