Package twisted :: Package enterprise :: Module util
[frames | no frames]

Module twisted.enterprise.util

Classes
_TableInfo (internal)
_TableRelationship (Internal)

Exceptions
DBError  

Function Summary
  defaultFactoryMethod(rowClass, data, kw)
Used by loadObjects to create rowObject instances.
  getKeyColumn(rowClass, name)
  makeKW(rowClass, args)
Utility method to construct a dictionary for the attributes of an object from set of args.
  quote(value, typeCode, string_escaper)
Add quotes for text types and no quotes for integer types.

Variable Summary
dict dbTypeMap = {'real': 1, 'smallint': 1, 'float8': 1, 'var...
int NOQUOTE = 1                                                                     
int USEQUOTE = 2                                                                     

Function Details

defaultFactoryMethod(rowClass, data, kw)

Used by loadObjects to create rowObject instances.

makeKW(rowClass, args)

Utility method to construct a dictionary for the attributes of an object from set of args. This also fixes the case of column names.

quote(value, typeCode, string_escaper=<function safe at 0x8345294>)

Add quotes for text types and no quotes for integer types. NOTE: uses Postgresql type codes..

Variable Details

dbTypeMap

Type:
dict
Value:
{'bigint': 1,
 'bool': 2,
 'boolean': 2,
 'bytea': 2,
 'char': 2,
 'date': 2,
 'float4': 1,
 'float8': 1,
...                                                                    

NOQUOTE

Type:
int
Value:
1                                                                     

USEQUOTE

Type:
int
Value:
2                                                                     

Generated by Epydoc 2.0 on Sat May 15 20:08:17 2004 http://epydoc.sf.net