Package rrlog :: Package server :: Module dbwriter_sa :: Class DBLogWriter
[hide private]
[frames] | no frames]

Class DBLogWriter

source code

object --+
         |
        DBLogWriter

USes SQLAlchemy (sa), Assigned to 1 Table

Instance Methods [hide private]
 
__init__(self, config, format_dict=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
{}
_format_dict(self, job)
Default formatting method.
source code
 
estimateLineCount(self)
For performance reasons, it is allowed to estimate instead count exactly.
source code
SQLAlchemy Table
getTable(self) source code
 
writeNow(self, job)
Write without buffering, return when written
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Static Methods [hide private]
 
createColumns(colsConfig)
There is no primary key column; these are content columns only.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, config, format_dict=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Parameters:
  • config - DBConfig
Overrides: object.__init__

_format_dict(self, job)

source code 

Default formatting method.

Returns: {}
{colname:fieldcontent} for a single row

createColumns(colsConfig)
Static Method

source code 

There is no primary key column; these are content columns only.

Parameters:
  • colsConfig - (col-name:str,col-type,kwargs:dict) where col-type is DBConfig.Integer or DBConfig.String kwargs is optional and contains kwargs for Column() of sqlalchemy example: ("ipadress",DBConfig.String,{"default":"127.0.0.1"})
Returns:
[] of SQLAlchemy Column that make up my log table

estimateLineCount(self)

source code 

For performance reasons, it is allowed to estimate instead count exactly. (Remark: This implementation is working exactly.)

Returns:
count of already written lines