swat.cas.table.CASTable.get_connection¶
-
CASTable.
get_connection
(self)¶ Get the registered connection object
When a connection is registered with a CASTable object, CAS actions can be called on it as if they were instance methods.
- Returns
- CAS object
If a connection exists on the CASTable
- Raises
- SWATError
If no connection is available either because it wasn’t set, or because the connection object was released.
Examples
>>> conn = swat.CAS() >>> tbl = CASTable('my-table') >>> tbl.set_connection(conn) >>> conn is tbl.get_connection() True