generated agent-1
This commit is contained in:
@ -11,6 +11,8 @@ class Neo4jConnection:
|
||||
# Create the schema
|
||||
self.create_schema()
|
||||
|
||||
self.test_retrieval()
|
||||
|
||||
# Close the connection
|
||||
self.close()
|
||||
|
||||
@ -21,6 +23,11 @@ class Neo4jConnection:
|
||||
with self.driver.session() as session:
|
||||
session.write_transaction(self._create_constraints_and_indexes)
|
||||
|
||||
def test_retrieval(tx):
|
||||
#run MATCH (n) RETURN n LIMIT 25
|
||||
result = tx.run("MATCH (n) RETURN n LIMIT 25;")
|
||||
|
||||
|
||||
@staticmethod
|
||||
def _create_constraints_and_indexes(tx):
|
||||
# Constraints and indexes for Person
|
||||
|
@ -1,10 +1,3 @@
|
||||
class Person:
|
||||
def __init__(self, person_id, name, age):
|
||||
self.person_id = person_id
|
||||
self.name = name
|
||||
self.age = age
|
||||
|
||||
|
||||
class Memory:
|
||||
def __init__(self, memory_id, content, timestamp, importance, relevance, associated_tags):
|
||||
self.memory_id = memory_id
|
||||
|
Reference in New Issue
Block a user