| Home | Trees | Indices | Help |
|
|---|
|
|
object --+
|
_Coltypes --+
|
DBConfig
|
|||
|
|||
|
|||
|
Inherited from |
|||
|
|||
COLS_DEFAULT =
|
|||
|
|||
|
Inherited from |
|||
|
|||
@param engineStr: SQLAlchemy engine str
@param tablename: str
@param drop: If False, an eventually existing table is not deleted but extended. Only true makes sense with rotation.
@param cols: Specifies all log table column names and types.
default=None. If None, the DBConfig.COLS_DEFAULT is used.
You may use the COLS_DEFAULT as a base for you own column configuration.
Required is a 3-tuple of (col-name:str,col-type,kwargs:dict) where
col-name is the desired DB column; this name can be used as kwarg in the log() calls later
col-type is DBConfig.Integer or DBConfig.String
kwargs is optional (can be left out) and contains kwargs for the sqlalchemy Column.
Example:
To add an own integer column, take the default columns, and add your
own pair of (column-name,column-type) like that:
cols=DBConfig.COLS_DEFAULT + (("mycolumn",DBConfig.Integer))
To define you column as primary key, use
cols=DBConfig.COLS_DEFAULT + (("mycolumn",DBConfig.Integer,{"primary_key":True}))
|
|
|||
COLS_DEFAULT
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Thu May 20 11:46:17 2010 | http://epydoc.sourceforge.net |