Table of Contents

Class: ISQLConnection ./src/peak/storage/interfaces.py

A ManagedConnection that talks SQL

Base Classes   
IManagedConnection
Methods   
getRowConverter
setTxnState
  getRowConverter 
getRowConverter ( description,  post=None )

Get row-convert function for a given DBAPI description (or None)

For the given description, which is a DBAPI cursor result description (i.e. sequence of tuples describing result columns), return a conversion function which will map the values in a row, to application-specific datatypes. (The database-type to application-type mapping should be controlled via the connection's configuration properties.)

The created conversion function will accept a single database result row, and return a sequence of values. post is an optional postprocessing function which will be passed the entire sequence of converted values as a single argument. The return value of post will then be returned from the conversion function.

Note that if no postprocessing function is supplied, and no columns in the given description require type conversion, this method may return None, indicating that no conversion of any kind is required.

  setTxnState 
setTxnState ( outsideTxn )

Set the connection's PEAK and DB transaction state to match


Table of Contents

This document was automatically generated on Mon Apr 22 01:11:04 2024 by HappyDoc version 2.1