swat.cas.datamsghandlers.DBAPI

class swat.cas.datamsghandlers.DBAPI(module, cursor, nrecs=1000, transformers=None)

Bases: swat.cas.datamsghandlers.CASDataMsgHandler

Create a Python DB-API 2.0 compliant data message handler

Parameters
moduledatabase module

The database module used to create the cursor. This is used for the data type constants for determining column types.

cursorCursor object

The cursor where the results should be fetched from.

nrecsint, optional

The number of records to fetch and upload at a time.

Returns
DBAPI data message handler object
__init__(self, module, cursor, nrecs=1000, transformers=None)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self, module, cursor[, nrecs, …])

Initialize self.

finish(self, connection)

Finish the data sending operation

getone(self, connection, \*\*kwargs)

Get a single response from the server

getrow(self, row)

Return a row of values from the data source

send(self, connection, nrecs)

Send the records to the connection

write(self, row, values)

Write the value to the row and column specified in the buffer

Attributes

args

Property that generates the CAS action parameters for CAS actions that use a data message handler.