Home | Trees | Indices | Help |
|
---|
|
A variable length Unicode string. The ``Unicode`` type is a :class:`String` which converts Python ``unicode`` objects (i.e., strings that are defined as ``u'somevalue'``) into encoded bytestrings when passing the value to the database driver, and similarly decodes values from the database back into Python ``unicode`` objects. When using the ``Unicode`` type, it is only appropriate to pass Python ``unicode`` objects, and not plain ``str``. If a bytestring (``str``) is passed, a runtime warning is issued. If you notice your application raising these warnings but you're not sure where, the Python ``warnings`` filter can be used to turn these warnings into exceptions which will illustrate a stack trace:: import warnings warnings.simplefilter('error') Bytestrings sent to and received from the database are encoded using the dialect's :attr:`~sqlalchemy.engine.base.Dialect.encoding`, which defaults to `utf-8`. A synonym for String(length, convert_unicode=True, assert_unicode='warn').
Instance Methods | |||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from |
Properties | |
Inherited from |
Method Details |
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sat Jun 12 15:42:08 2010 | http://epydoc.sourceforge.net |