I used to only create one database so I used the default database name 'neo4j-default'. Now I need to create one more database, and I want to explicitly give the db a name. How to do that?
Is this the official Python driver or the Py2Neo?
If it's the official one you can do this:
with driver.session(database="example_database", fetch_size=100) as session:
result = session.run("MATCH (a:Person) RETURN a.name AS name")
# do something with the result...
I am using Python official bolt api. Regarding the 'fetch_size',
The fetch size used for requesting messages from Neo4j.
Does this mean for each cypher request, or read_transaction, it returns the number of fetch_size records from the DB? How is it related to the 'limit' keyword in cypher statement?
with driver.session(database="example_database", fetch_size=100) as session:
result = session.run("MATCH (a:Person) RETURN a.name AS name")
Actually, I was asking for how to create a db with a db name, not how to connect to a specific db. This statement below gives me the 'default' neo4j db name: my_driver = GraphDatabase.driver(self.uri, auth=(self.username, self.password), encrypted=False)