neo4j-labs / rdflib-neo4j

RDFLib Store backed by neo4j + n10s
Apache License 2.0
55 stars 6 forks source link

Question about resetting store state after __flushBuffer #3

Closed bkiers closed 1 month ago

bkiers commented 1 year ago

Hi, I am in the process of porting the logic inside CypherNeo4jStore to C#. While going through the code and when __flushBuffer is called, I see self.bufferActualSize is being reset to 0:

def __flushBuffer(self):
    assert self.__open, "The Store must be open."

    for key in self.queryBuffer.keys():
        try:
            self.session.run(self.queryBuffer[key], params = self.paramBuffer[key])
        except TypeError:
            print("query:",self.queryBuffer[key],"params:",self.paramBuffer[key])

    self.bufferActualSize = 0

but I also expected that self.paramBuffer to be reset as well (and perhaps self.queryBuffer too). Or am I missing something?

alfredorubin96 commented 1 month ago

Hi @bkiers, thank you for asking. From last year we moved the whole syntax and we offer the code in this repo as a python library. Let us know if you need any help!