comet.datapool¶
The comet.datapool module provides global connection access for the current session and facilities to establish the global comet data connection.
Methods¶
- comet.datapool.getConnection()¶
Get the current global data connection if it is established.
- Returns
The active data connection
The type is dependant of the connection itself:
- Return type
- Available
- CScript
- comet.datapool.getSessionID()¶
Get the session ID of the current publishing server connection.
- Returns
The session ID if available, else empty str.
- Return type
- Available
- CScript
- comet.datapool.loginSOAP(host, user='', password='', language='', client='', lazy=True)¶
Establish the global data connection by connecting to a SOAP service, e.g. a publishing server.
- Parameters
- Returns
The new connection
- Return type
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter host is empty.
CometError – On internal error
- Available
- CScript
- comet.datapool.loginDB(host, user='', password='', database='', client='', lazy=True)¶
Establish the global data connection by connecting to an SQL database.
- Parameters
- Returns
The new connection
- Return type
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter host is empty.
CometError – On internal error
- Available
- CScript
- comet.datapool.loginXML(path)¶
Establish the global data connection by connecting to a local XML pool.
- Parameters
path (str) – The path to the local XML pool
- Return type
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter path is empty.
CometError – On internal error
- Available
- CScript
- comet.datapool.logout()¶
Disconnect the global data connection.
- Return type
- CScript