nk)R d dl Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ G d d
e Z G d dej ej
e Z G d
de ZdS ) N )_StringType )exc)sql)util)sqltypesc * e Zd Zd Zed ZdS )_EnumeratedValuesc | dd | _ | j dk rwt | rhd }|D ]\}t | dk r d| _ nF||d }t | dk s|d |k s|d |k r d| _ n]d| _ | j dk r6t j d| j j z | | }|| _ t d |D dgz }||fS )
Nquotingautor unquotedr quotedz|Manually quoting %s value literals is deprecated. Supply unquoted values and use the quoting= option in cases of ambiguity.c , g | ]}t | S )len).0vs x/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib64/python3.11/site-packages/sqlalchemy/dialects/mysql/enumerated.py
z2_EnumeratedValues._init_values../ s ---c!ff--- )
popr
r r warn_deprecated __class____name__
_strip_values_enumerated_valuesmax)selfvalueskwqelengths r _init_valuesz_EnumeratedValues._init_values s+ vvi00<6!!c&kk!A
(
(q66Q;;#-DLEY!Aq66Q;;!A$!))quzz#-DLE 0: (<8## #~67
''//F"(--f---344v~r c g }|D ]`}|dd dk s|dd dk r-|dd |d dz |d }| | a|S )Nr r "'r )replaceappend)clsr" strip_valuesas r r z_EnumeratedValues._strip_values2 s{ # #A1v}}!A##
adGOOAaD1Had33""""r N)r
__module____qualname__r' classmethodr r r r r r s? @ [ r r c V e Zd ZdZd ZdZd Zed Z fdZ fdZ
d Z xZS )ENUMzMySQL ENUM type.Tc | dd | || t j | fd| j i| dS )a~ 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.
strictNr&