File: //opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyc
�
��4]c @ s� d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d e f d
� � YZ d e j e j
e f d � � YZ d
e f d � � YZ d S( i����Ni ( t _StringTypei ( t exc( t sql( t util( t sqltypest _EnumeratedValuesc B s e Z d � Z e d � � Z RS( c C sA | j d d � | _ | j d k r� t | � r� d } x� | D]} } t | � d k rb d | _ Pn | d k r{ | d } n t | � d k s� | d | k s� | d | k r= d | _ Pq= q= Wd | _ n | j d k rt j d | j j � | j | � } n | | _ t
g | D] } t | � ^ qd g � } | | f S( Nt quotingt autoi t unquotedi i����t quoteds| Manually quoting %s value literals is deprecated. Supply unquoted values and use the quoting= option in cases of ambiguity.( t popR t lent NoneR t warn_deprecatedt __class__t __name__t
_strip_valuest _enumerated_valuest max( t selft valuest kwt qt et vt length( ( sW /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyt _init_values s*
2 ,c C sv g } xi | D]a } | d d !d k s9 | d d !d k ra | d d !j | d d | d � } n | j | � q
W| S( Ni i t "t 'i����i ( t replacet append( t clsR t strip_valuest a( ( sW /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyR 2 s
&(( R t
__module__R t classmethodR ( ( ( sW /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyR s t ENUMc B sM e Z d Z d Z e Z d � Z e d � � Z d � Z d � Z
d � Z RS( s MySQL ENUM type.R$ c O s= | j d d � | j | | � t j | d | j | �d S( s~ Construct an ENUM.
E.g.::
Column('myenum', ENUM("foo", "bar", "baz"))
:param enums: The range of valid values for this ENUM. Values will be
quoted when generating the schema according to the quoting flag (see
below). This object may also be a PEP-435-compliant enumerated
type.
.. versionadded: 1.1 added support for PEP-435-compliant enumerated
types.
:param strict: This flag has no effect.
.. versionchanged:: The MySQL ENUM type as well as the base Enum
type now validates all Python data values.
:param charset: Optional, a column-level character set for this string
value. Takes precedence to 'ascii' or 'unicode' short-hand.
:param collation: Optional, a column-level collation for this string
value. Takes precedence to 'binary' short-hand.
:param ascii: Defaults to False: short-hand for the ``latin1``
character set, generates ASCII in schema.
:param unicode: Defaults to False: short-hand for the ``ucs2``
character set, generates UNICODE in schema.
:param binary: Defaults to False: short-hand, pick the binary
collation type that matches the column's character set. Generates
BINARY in schema. This does not affect the type of data stored,
only the collation of character data.
:param quoting: Defaults to 'auto': automatically determine enum value
quoting. If all enum values are surrounded by the same quoting
character, then use 'quoted' mode. Otherwise, use 'unquoted' mode.
'quoted': values in enums are already quoted, they will be used
directly when generating the schema - this usage is deprecated.
'unquoted': values in enums are not quoted, they will be escaped and
surrounded by single quotes when generating the schema.
Previous versions of this type always required manually quoted
values to be supplied; future versions will always quote the string
literals for you. This is a transitional option.
t strictR N( R
R t
_enum_initR t __init__R ( R t enumsR ( ( sW /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyR'