ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ 4]c@sddlZddlmZddlmZddlmZddlmZddlmZd efd YZd ej ej efd YZ d efdYZ dS(iNi(t _StringTypei(texc(tsql(tutil(tsqltypest_EnumeratedValuescBs eZdZedZRS(cCsA|jdd|_|jdkrt|rd}x|D]}}t|dkrbd|_Pn|dkr{|d}nt|dks|d|ks|d|kr=d|_Pq=q=Wd|_n|jdkrtjd|jj|j|}n||_ t g|D]}t|^qdg}||fS( Ntquotingtautoitunquotediitquoteds|Manually quoting %s value literals is deprecated. Supply unquoted values and use the quoting= option in cases of ambiguity.( tpopRtlentNoneRtwarn_deprecatedt __class__t__name__t _strip_valuest_enumerated_valuestmax(tselftvaluestkwtqtetvtlength((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyt _init_valuess*    2   ,cCsvg}xi|D]a}|dd!dks9|dd!dkra|dd!j|dd|d}n|j|q W|S(Niit"t'ii(treplacetappend(tclsRt strip_valuesta((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyR2s  &((Rt __module__Rt classmethodR(((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyRs tENUMcBsMeZdZdZeZdZedZdZ dZ dZ RS(sMySQL ENUM type.R$cOs=|jdd|j||tj|d|j|dS(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. tstrictRN(R R t _enum_initRt__init__R(RtenumsR((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyR'Ds5cKs0|jd|j|jd|j||S(sXProduce a MySQL native :class:`.mysql.ENUM` from plain :class:`.Enum`. tvalidate_stringstvalues_callable(t setdefaultR)R*(RtimplR((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pytadapt_emulated_to_native}scCs4|j||\}}tt|j|||S(N(RtsuperR$t_setup_for_values(RRtobjectsRR((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyR/scCs*|dkr|Stt|j|SdS(Nt(R.R$t_object_value_for_elem(Rtelem((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyR2s cCstj|dtttjgS(Nt to_inspect(Rt generic_reprR$RRtEnum(R((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyt__repr__s( RR"t__doc__t__visit_name__tTruet native_enumR'R#R-R/R2R7(((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyR$=s 9  tSETcBsAeZdZdZdZdZdZdZdZRS(sMySQL SET type.R<cOs|jdt|_|j||\}}t||_|j rdd|krdtjdn|jrtdt |jD|_ |j j dt |jDn|j d|t t|j|dS(s Construct a SET. E.g.:: Column('myset', SET("foo", "bar", "baz")) The list of potential values is required in the case that this set will be used to generate DDL for a table, or if the :paramref:`.SET.retrieve_as_bitwise` flag is set to True. :param values: The range of valid values for this SET. :param convert_unicode: Same flag as that of :paramref:`.String.convert_unicode`. :param collation: same as that of :paramref:`.String.collation` :param charset: same as that of :paramref:`.VARCHAR.charset`. :param ascii: same as that of :paramref:`.VARCHAR.ascii`. :param unicode: same as that of :paramref:`.VARCHAR.unicode`. :param binary: same as that of :paramref:`.VARCHAR.binary`. :param quoting: Defaults to 'auto': automatically determine set value quoting. If all 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. .. versionadded:: 0.9.0 :param retrieve_as_bitwise: if True, the data for the set type will be persisted and selected using an integer value, where a set is coerced into a bitwise mask for persistence. MySQL allows this mode which has the advantage of being able to store values unambiguously, such as the blank string ``''``. The datatype will appear as the expression ``col + 0`` in a SELECT statement, so that the value is coerced into an integer value in result sets. This flag is required if one wishes to persist a set that can store the blank string ``''`` as a value. .. warning:: When using :paramref:`.mysql.SET.retrieve_as_bitwise`, it is essential that the list of set values is expressed in the **exact same order** as exists on the MySQL database. .. versionadded:: 1.0.0 tretrieve_as_bitwiseR1sNCan't use the blank value '' in a SET without setting retrieve_as_bitwise=Truecss%|]\}}|d|fVqdS(iN((t.0tidxtvalue((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pys scss%|]\}}d||fVqdS(iN((R>R?R@((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pys sRN(R tFalseR=RttupleRRt ArgumentErrortdictt enumeratet_bitmaptupdateR+R.R<R'(RRRR((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyR's?   cCs4|jr,tjtj|tjd|S|SdS(Ni(R=Rt type_coerceRtInteger(Rtcolexpr((sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pytcolumn_expressions csIjrfd}n*ttj||fd}|S(Ncs<|dk r4t|}ttjjj|SdSdS(N(R tinttsetRtmap_bitsRFt __getitem__(R@(R(sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pytprocesss  csat|tjr=r'|}nttjd|S|dk rY|jdn|SdS(Ns[^,]+R1(t isinstanceRt string_typesRMtretfindallR tdiscard(R@(t super_convert(sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyRPs (R=R.R<tresult_processor(RtdialecttcoltypeRP((RRVsW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyRWs    csIttj|jr6fd}nfd}|S(Ncsp|dkrdSt|tjtjr@r9|S|Sn,d}x|D]}|j|O}qMW|SdS(Ni(R RQRt int_typesRRRF(R@t int_valueR(RRV(sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyRPs   csP|dk r8t|tjtj r8dj|}nrH|S|SdS(Nt,(R RQRRZRRtjoin(R@(RV(sW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyRP*s  (R.R<tbind_processorR=(RRXRP((RRVsW/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/mysql/enumerated.pyR^s   cKs&|j|ds ,"^