memgraph / pymgclient

Python Memgraph Client
https://memgraph.github.io/pymgclient/
Apache License 2.0
43 stars 5 forks source link

Add the possibility to connect to a specific database #61

Open andrejtonev opened 7 months ago

andrejtonev commented 7 months ago

Add multi-tenant capability.

conn = mgclient.connect(address...., database="db")

will return a connection that is limited to the defined database.

andrejtonev commented 7 months ago

@kgolubic We have added the ability to define the landing database via pymgclient. mgclient.connect(database="your db", ...) The connection is then locked to the defined db, you cannot switch to another one later on.

andrejtonev commented 7 months ago

FYI @Josipmrden this PR requires a fix in memgraph. Should be delivered via https://github.com/memgraph/memgraph/pull/1884