DatabaseRemote¶
- class dsviper.DatabaseRemote¶
Bases:
objectA low-level class used to access a CRUD like database from a remote repository through the Databasing interface. Use the high-level static factory method Database.connect(…) or Database.connect_local(…). Use the high-level static method Database.databases(…) or Database.databases_local(…) to retrieve the list of the databases from a server.
Note: Not directly instantiable.
- close() None¶
Close the database.
- static connect(database: str, host: str, service: str = '54322') DatabaseRemote¶
Connect to a server and use the database.
- static connect_local(database: str, socket_path: str) DatabaseRemote¶
Connect to socket_path and use the database.
- databases(host: str, service: str = '54322') list[str]¶
Connect to a server and return the list of databases.
- databases_local(socket_path: str) list[str]¶
Connect to a server and return the list of databases.
- databasing() Databasing¶
Return the Databasing interface.
- is_closed() bool¶
Return True the connection is closed.