Package Camelot :: Package camelot :: Package types :: Class Code
[frames] | no frames]

Class Code

source code


SQLAlchemy column type to store codes. Where a code is a list of strings on which a regular expression can be enforced.

This column type accepts and returns a list of strings and stores them as a string joined with points.

eg: ['08', 'AB'] is stored as 08.AB

../_static/editors/CodeEditor_editable.png
Nested Classes
  impl
A variable length Unicode string.
Instance Methods
 
__init__(self, parts, separator=u'.', **kwargs)
eg ['99', 'AA']. For valid input masks, see QLineEdit
source code
 
bind_processor(self, dialect)
Defines a bind parameter processing function.
source code
 
result_processor(self, dialect)
Defines a result-column processing function.
source code

Inherited from sqlalchemy.types.TypeDecorator: __getattr__, compare_values, copy, copy_value, dialect_impl, get_col_spec, get_dbapi_type, is_mutable, load_dialect_impl, process_bind_param, process_result_value

Inherited from sqlalchemy.types.AbstractType: __repr__, adapt_operator

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

__init__(self, parts, separator=u'.', **kwargs)
(Constructor)

source code 
eg ['99', 'AA']. For valid input masks, see QLineEdit
Parameters:
  • parts - a list of input masks specifying the mask for each part,
Overrides: object.__init__

bind_processor(self, dialect)

source code 
Defines a bind parameter processing function.
Overrides: sqlalchemy.types.AbstractType.bind_processor
(inherited documentation)

result_processor(self, dialect)

source code 
Defines a result-column processing function.
Overrides: sqlalchemy.types.AbstractType.result_processor
(inherited documentation)