Package logilab :: Package common :: Module sqlgen
[frames] | no frames]

Module sqlgen

source code

Help to generate SQL strings usable by the Python DB-API.

:author: Logilab
:copyright: 2000-2008 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
:license: General Public License version 2 - http://www.gnu.org/licenses

Classes
  BaseTable
Another helper class to ease SQL table manipulation.
  SQLGenerator
Helper class to generate SQL strings to use with python's DB-API.
Functions
 
name_fields(cursor, records)
Take a cursor and a list of records fetched with that cursor, then return a list of dictionaries (one for each record) whose keys are column names and values are records' values.
source code
 
sql_repr(type, val) source code
Variables
  __package__ = None
hash(x)
Function Details

name_fields(cursor, records)

source code 

Take a cursor and a list of records fetched with that cursor, then return a
list of dictionaries (one for each record) whose keys are column names and
values are records' values.

:param cursor: cursor used to execute the query
:param records: list returned by fetch*()