HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyc
�
���ec_@s�dZddlZddlZddlZddlZddlZddlmZddlmZddlm	Z	ddlm
Z
ddlmZdd	lmZdd
lm
Z
ddlmZddlmZdd
lmZddlmZddlmZddl
mZddlmZdd
lmZedddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVdWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpg^�Zejdqej�Zejdrej�Zds�edtdu�D�jdvg�Zejdwej�Zejdwej�Z ejdxej�Z!ejdyej"�Z#ejdzej"�Z$id{d|6d}d~6dd�6d�d�6d�d�6Z%ejd��Z&e'e(d�d���Z)i%d�ej*6d�ej+6d�ej,6d�ej-6d�ej.6d�ej/6d�ej06d�ej16d�ej26d�ej36d�ej46d�ej56d�ej66d�ej76d�ej86d�ej96d�ej:6d�ej;6d�ej<6d�ej=6d�ej>6d�ej?6d�ej@6d�ejA6d�ejB6d�ejC6d�ejD6d�ejE6d�ejF6d�ejG6d�ejH6d�ejI6d�ejJ6d�ejK6d�ejL6d�ejM6d�ejN6ZOid�ejP6d�ejQ6d�ejR6d�ejS6d�ejT6d�ejU6d�ejV6d�ejW6d�ejX6d�ejY6d�ejZ6d�ej[6d�ej\6d�ej]6Z^id�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6d�d�6Z_id�ej`ja6d�ej`jb6d�ej`jc6d�ej`jd6d�ej`je6d�ej`jf6ZgdtZhdZidZjd�Zkejld�d�d�d�d�d�g�Zmejnd�d�d�dt�Zoejnd�d�d�d�Zpejnd�d�d�d�Zqejnd�d�d�epeqB�Zrd�ejld�d�d�g�fd���YZsd�etfd���YZud�ejvejwet�fd���YZxd�e
jyfd���YZzd�eufd���YZ{d�e{fd���YZ|d�eufd���YZ}d�exfd���YZ~d�e~fd���YZd�etfd���YZ�dS(�s]Base SQL and DDL compiler implementations.

Classes provided include:

:class:`.compiler.SQLCompiler` - renders SQL
strings

:class:`.compiler.DDLCompiler` - renders DDL
(data definition language) strings

:class:`.compiler.GenericTypeCompiler` - renders
type specification strings.

To generate user-defined SQL strings, see
:doc:`/ext/compiler`.

i����Ni(tbase(t	coercions(tcrud(telements(t	functions(t	operators(tschema(t
selectable(tsqltypes(tutil(tNO_ARG(tprefix_anon_map(tquoted_namei(texctalltanalysetanalyzetandtanytarraytastasct
asymmetrict
authorizationtbetweentbinarytbothtcasetcasttchecktcollatetcolumnt
constrainttcreatetcrosstcurrent_datetcurrent_roletcurrent_timetcurrent_timestamptcurrent_usertdefaultt
deferrabletdesctdistincttdotelsetendtexcepttfalsetfortforeigntfreezetfromtfulltgranttgroupthavingtiliketint	initiallytinnert	intersecttintotistisnulltjointleadingtlefttliketlimitt	localtimetlocaltimestamptnaturaltnewtnottnotnulltnulltofftoffsettoldtontonlytortordertoutertoverlapstplacingtprimaryt
referencestrighttselecttsession_usertsettsimilartsomet	symmetricttabletthenttottrailingttruetuniontuniquetusertusingtverbosetwhentwheres
^[A-Z0-9_$]+$s^[A-Z0-9_ $]+$cCsh|]}t|��qS((tstr(t.0tx((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<setcomp>�s	ii
t$s5^(?:RESTRICT|CASCADE|SET NULL|NO ACTION|SET DEFAULT)$s^(?:DEFERRED|IMMEDIATE)$s%(?<![:\w\$\x5c]):([\w\$]+)(?![:\w\$])s\x5c(:[\w\$]*)(?![:\w\$])s
%%(%(name)s)stpyformatt?tqmarks%%stformats:[_POSITION]tnumerics	:%(name)stnameds
[%\(\):\[\] ]s%():[] tPAZC___s AND s OR s + s * s - s / s % t-s < s <= s != s > s >= s = s IS DISTINCT FROM s IS NOT DISTINCT FROM s || s MATCH s NOT MATCH s IN s NOT IN s, s FROM s AS s IS s IS NOT s	 COLLATE sEXISTS s	DISTINCT sNOT sANY sALL s DESCs ASCs NULLS FIRSTs NULLS LASTtcoalescetCURRENT_DATEtCURRENT_TIMEtCURRENT_TIMESTAMPtCURRENT_USERt	LOCALTIMEtLOCALTIMESTAMPtrandomtsysdatetSESSION_USERtUSERtCUBEtROLLUPs
GROUPING SETStmonthtdaytyeartsecondthourtdoytminutetquartertdowtweektepochtmillisecondstmicrosecondst
timezone_hourttimezone_minutetUNIONs	UNION ALLtEXCEPTs
EXCEPT ALLt	INTERSECTs
INTERSECT ALLit
ExpandedStatet	statementtadditional_parameterst
processorstpositiontuptparameter_expansiont
NO_LINTINGsDisable all linting.t	canonicaltCOLLECT_CARTESIAN_PRODUCTSsOCollect data on FROMs and cartesian products and gather into 'self.from_linter'tWARN_LINTINGs,Emit warnings for linters that find problemstFROM_LINTINGsQWarn for cartesian products; combines COLLECT_CARTESIAN_PRODUCTS and WARN_LINTINGt
FromLintertfromstedgescBseZdd�Zd�ZRS(cs�|j}|sdSt|j�}t|�}|dk	rP|}|j|�n|j�}tj|g�}xi|r�|r�|j��|j	���fd�|D�}|j
�fd�|D��|j|�qqW|r�||fSdSdS(Ncs"h|]}�|kr|�qS(((Rmtedge(tnode(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<setcomp>Ds	c3s#|]}||j��VqdS(N(tindex(RmR�(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>Hs(NN(NN(R�tNoneR\R�tremovetpoptcollectionstdequetpoplefttdiscardt
extendlefttdifference_update(tselftstartR�R�tthe_restt
start_withtstackt	to_remove((R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytlint,s&	

cs�j�\}}|r{|}|r{d}dj�fd�|D��}|jd|d�j|�}tj|�q{ndS(Ns�SELECT statement has a cartesian product between FROM element(s) {froms} and FROM element "{start}".  Apply join condition(s) between each element to resolve.s, c3s(|]}djd�j|�VqdS(s"{elem}"telemN(RsR�(Rmtfrom_(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>`sR�R�(R�RARsR�R	twarn(R�R�R�R�ttemplatet	froms_strtmessage((R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�Qs
	N(t__name__t
__module__R�R�R�(((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�+s%tCompiledcBs�eZdZd	Zd	Zd	ZejZ	ejZ
d	Zd	Zd	Z
d	Zd	eej�d�Zd�Zd�Zed��Zd�Zd�Zd	d	ed�Zed��ZRS(
sRepresent a compiled SQL or DDL expression.

    The ``__str__`` method of the ``Compiled`` object should produce
    the actual text of the statement.  ``Compiled`` objects are
    specific to their underlying database dialect, and also may
    or may not be specific to the columns referenced within a
    particular set of bind parameters.  In no case should the
    ``Compiled`` object be dependent on the actual values of those
    bind parameters, even though it may reference those values as
    defaults.
    cCs�||_|jj|_|r?||_|jj|�|_n|dk	r�||_|j|_|j	|_	|jr�|j
|_n|j|j|�|_
|r�|jj|j
|�|_
q�ntj�|_dS(sConstruct a new :class:`.Compiled` object.

        :param dialect: :class:`.Dialect` to compile against.

        :param statement: :class:`_expression.ClauseElement` to be compiled.

        :param schema_translate_map: dictionary of schema names to be
         translated when forming the resultant SQL

         .. versionadded:: 1.1

         .. seealso::

            :ref:`schema_translating`

        :param compile_kwargs: additional kwargs that will be
         passed to the initial call to :meth:`.Compiled.process`.


        N(tdialecttidentifier_preparertpreparertschema_translate_mapt_with_schema_translateR�R�tsupports_executiontcan_executet_annotationst_execution_optionstexecution_optionstprocesststringt_render_schema_translatesR	tperf_countert	_gen_time(R�R�R�R�trender_schema_translatetcompile_kwargs((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt__init__�s"						cCs5|jr|j||||�Stj|j��dS(N(R�t_execute_compiledR
tObjectNotExecutableErrorR�(R�t
connectiontmultiparamstparamsR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_execute_on_connection�s	cCs)tjtj|t|��d|�dS(Ntreplace_context(R	traise_R
tUnsupportedCompilationErrorttype(R�telementterr((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_unsupported_compilation�scCs
t��dS(s�Return a Compiled that is capable of processing SQL expressions.

        If this compiler is one, it would likely just return 'self'.

        N(tNotImplementedError(R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytsql_compiler�scKs|j||�S(N(t_compiler_dispatch(R�tobjtkwargs((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scCs
|jpdS(s3Return the string text of the generated SQL or DDL.t(R�(R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt__str__�scCs
t��dS(s�Return the bind params for this compiled object.

        :param params: a dict of string/object pairs whose values will
                       override bind values compiled in to the
                       statement.
        N(R�(R�R�textracted_parameterstescape_names((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytconstruct_params�s
cCs
|j�S(s0Return the bind params for this compiled object.(R�(R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�sN(R�R�t__doc__R�t_cached_metadatat_result_columnsR�R	t
EMPTY_DICTR�R�t
compile_statetdml_compile_statet	cache_keyR�tFalset
immutabledictR�R�R�tpropertyR�R�R�tTrueR�R�(((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�js(		-	
	
		tTypeCompilercBs/eZdZdZd�Zd�Zd�ZRS(s2Produces DDL specification for TypeEngine objects.s	visit_\w+cCs
||_dS(N(R�(R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�scKs|j||�S(N(R�(R�ttype_tkw((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�scKs#tjtj||�d|�dS(NR�(R	R�R
R�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�s(R�R�R�tensure_kwargR�R�R�(((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�s
		t
_CompileLabelcBsMeZdZdZdZd	d�Zed��Zed��Zd�Z	RS(
s;lightweight label object which acts as an expression.Label.tlabelR�tnamecCs&||_||_|f||_dS(N(R�R�t
_alt_names(R�tcolR�t	alt_names((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�'s		cCs
|jjS(N(R�t	proxy_set(R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�,scCs
|jjS(N(R�R�(R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�0scKs|S(N((R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
self_group4s(R�R�((
R�R�R�t__visit_name__t	__slots__R�R�R�R�R(((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR� stSQLCompilerc	Bs�eZdZeZeZeZZ	Z
eZd�Z
eZeZeZeZeZeZeZeZeZd�Ze�Ze�ZejZeZd�Z Z!eZ"d�Z#e$j%d�Z&d�Z'd�Z(eZ)d�d�ee*d�Z+e,d��Z-e,d��Z.ej/d��Z0ej1d��Z2e3j4d��Z5d�Z6ej/d	��Z7d
�Z8e,d��Z9d�d�ed�ed�Z:ej1d�d�d
��Z;e,d��Z<d�ed�Z=ej>d�d��Z?ej/d��Z@ej/ej>d�d���ZAej/ej>d�d���ZBd�ZCed�ZDd�ZEed�ZFed�ZGd�eed�d�d�ZHd�ZId�ZJd�ed�d�ZKd�ZLd �ZMd!�ZNd"�ZOd#�ZPd$�ZQd�d%�ZRd�ed&�ZSd'�ZTd(�ZUd)�ZVd*�ZWd+�ZXd,�ZYd-�ZZd.�Z[d/�Z\d0�Z]d1�Z^d2�Z_d3�Z`d4�Zad5�Zbd6�Zcd�d7�Zdd8�Zed9�Zfd:�Zged�d;�Zhd<�Zid=�Zjd�d�d>�Zkd?�Zld@�ZmdA�ZndB�ZodC�ZpdD�Zqd�dE�ZrdF�Zsd�ed�d�dG�ZtdH�ZudI�ZvdJ�ZwdK�ZxdL�ZyedM�ZzdN�Z{dO�Z|ej/dP��Z}dQ�Z~dR�ZdS�Z�dT�Z�dU�Z�dV�Z�dW�Z�dX�Z�dY�Z�dZ�Z�d[�Z�d\�Z�d]�Z�d^�Z�d_�Z�eeeeed`�Z�e�d�da�Z�db�Z�dc�Z�dd�Z�de�Z�d�eed�df�Z�eed�d�d�dg�Z�dh�Z�di�Z�eeed�eed�d�dj�Z�dk�Z�dl�Z�edm�Z�ed�dn�Z�do�Z�dp�Z�d�dq�Z�d�d�d�eeedr�Z�ds�Z�dt�Z�du�Z�dv�Z�dw�Z�ej�dxe�fdye�fg�Z�edz�Z�d�Z�eed�d�d�ed�d{�Z�d|�Z�d}�Z�d~�Z�d�Z�d�ed�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�eeed�ed�d��Z�ed�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�d��Z�RS(�s~Default implementation of :class:`.Compiled`.

    Compiles :class:`_expression.ClauseElement` objects into SQL strings.

    s"__\[POSTCOMPILE_(\S+?)(~~.+?~~)?\]c	Ks�||_||_|rQd�|dD�|_}|jd�|dD��n||_||_i|_tj�|_	g|_
g|_|j|_|jr�i|_
g|_|jdk|_nt|j|_d|_|jp�|j|_t�|_i|_tj||||�|js=|js=|jr�|jrU|j|_ n|jsg|jr�|j!r|t"|_#q�|jr�|js�|j$j%r�|j&r�t"|_#q�q�n|jr�|jr�|j'�n|j(r�|j)dt"�ndS(s�Construct a new :class:`.SQLCompiler` object.

        :param dialect: :class:`.Dialect` to be used

        :param statement: :class:`_expression.ClauseElement` to be compiled

        :param column_keys:  a list of column names to be compiled into an
         INSERT or UPDATE statement.

        :param for_executemany: whether INSERT / UPDATE statements should
         expect that they are to be invoked in an "executemany" style,
         which may impact how the statement will be expected to return the
         values of defaults and autoincrement / sequences and similar.
         Depending on the backend and driver in use, support for retrieving
         these values may be disabled which means SQL expressions may
         be rendered inline, RETURNING may not be rendered, etc.

        :param kwargs: additional keyword arguments to be consumed by the
         superclass.

        cSsi|]}||j�qS((tkey(Rmtb((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys
<dictcomp>�s	icSsi|]}|g|�qS(((RmR((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys
<dictcomp>�s	Rtt_populate_selfN(*tcolumn_keysR�t_cache_key_bind_matchtupdatetfor_executemanytlintingtbindsR	tcolumn_dictt
bind_namesR�R�t
positionaltpositiontup_levelR�t
paramstylet_numeric_bindstBIND_TEMPLATEStbindtemplateR�tctestlabel_lengthtmax_identifier_lengthRtanon_mapttruncated_namesR�R�tisinserttisupdatetisdeletet
_returningt	returningt_inlineR�tinlineR�tinsert_executemany_returningt_return_defaultst_apply_numbered_paramst_render_postcompilet#_process_parameters_for_postcompile(	R�R�R�R�RR
RR�tckbm((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��sJ															
	
	cCsFy|jddSWn,tk
rA}tjtd�d|�nXdS(s�Return the current 'executable' that is being compiled.

        This is currently the :class:`_sql.Select`, :class:`_sql.Insert`,
        :class:`_sql.Update`, :class:`_sql.Delete`,
        :class:`_sql.CompoundSelect` object that is being compiled.
        Specifically it's assigned to the ``self.stack`` list of elements.

        When a statement like the above is being compiled, it normally
        is also assigned to the ``.statement`` attribute of the
        :class:`_sql.Compiler` object.   However, all SQL constructs are
        ultimately nestable, and this attribute should never be consulted
        by a ``visit_`` method, as it is not guaranteed to be assigned
        nor guaranteed to correspond to the current statement being compiled.

        .. versionadded:: 1.3.21

            For compatibility with previous versions, use the following
            recipe::

                statement = getattr(self, "current_executable", False)
                if statement is False:
                    statement = self.stack[-1]["selectable"]

            For versions 1.4 and above, ensure only .current_executable
            is used; the format of "self.stack" may change.


        i����Rs$Compiler does not have a stack entryR�N(R�t
IndexErrorR	R�(R�tie((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytcurrent_executableAscCst|j|j�S(N(tlisttinsert_prefetchtupdate_prefetch(R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytprefetchgscCsiS(N((R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_global_attributeskscCs^tj�|_i|_i|_t|_|jrZi|_i|_	t
jt�|_
ndS(s�Initialize collections related to CTEs only if
        a CTE is located, to save on the overhead of
        these collections otherwise.

        N(R	tOrderedDictRtctes_by_level_nametlevel_name_by_cteR�tctes_recursiveRtcte_positionalt	cte_levelR�tdefaultdictR*t	cte_order(R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_init_cte_stateos							ccs�|j|j}}gt|_|_z>|jrL|jd}t|d<nd}|j|jfVWd|r}|jd�n|||_|_XdS(s;special API to support the use case of 'nested result sets'i����tneed_result_map_for_nestedN(R�t_ordered_columnsR�R�R�R�R�(R�tresult_columnstordered_columnstentry((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_nested_result�s
	

cs7tjd��tjd�fd�|j�|_dS(Nis
\[_POSITION\]csttj���S(N(RlR	tnext(tm(tposcount(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt<lambda>�R�(t	itertoolstcounttretsubR�(R�((R@sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR#�scs'td��fd��jD�D��S(Ncss-|]#\}}|dk	r||fVqdS(N(R�(RmRtvalue((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�s	c3s_|]U}�j||jjs4|jj�j�nt�fd�|jjD��fVqdS(c3s!|]}|j�j�VqdS(N(t_cached_bind_processorR�(Rmt	elem_type(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�sN(RR�t_is_tuple_typeRGR�ttuplettypes(Rmt	bindparam(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�s	(tdictR(R�((R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_bind_processors�s	cCst|j�dkS(Ni(tlenR�(R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytis_subquery�scCs|S(N((R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scs�|ot|j�}|r�y|jd}Wn/tk
r]}tjtjd�d|�nX|j��fd�t	||�D�}	nd	}	|r�i}
x|jj�D]
\}}|r�|jj
||�n|}
|j|kr�||j|
|
<q�||kr|||
|
<q�|rq|jrq|rRtjd|j|fdd��q�tjd|jdd��q�|	r�|	j
||�}n|}|jr�|j|
|
<q�|j|
|
<q�W|
Si}
x�|jj�D]�\}}|r�|jj
||�n|}
|r\|jr\|r=tjd|j|fdd��q\tjd|jdd��n|	rw|	j
||�}n|}|jr�|j|
|
<q�|j|
|
<q�W|
Sd	S(
s5return a dictionary of bind parameter keys and valuesiscThis compiled object has no original cache key; can't pass extracted_parameters to construct_paramsR�cs0i|]&\}}�|D]}||�qqS(((RmRt	extractedtbind(R&(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys
<dictcomp>�s		s@A value is required for bind parameter %r, in parameter group %dtcodetcd3xs)A value is required for bind parameter %rN(tbooltescaped_bind_namesR�t	TypeErrorR	R�R
tCompileErrorRtzipR�RtitemstgetRtrequiredtInvalidRequestErrortcallableteffective_valueRF(R�R�t
_group_numbert_checkR�R�thas_escaped_namestorig_extractedR�tresolved_extractedtpdRLR�tescaped_nametvalue_param((R&sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��sz
		
	
	cs�t|d�sdS|j�|jj��dkrU�dkrU��fd�}n����fd�}i}|j}xn|jD]c}||kr�q�n|jjr�g|jjD]}||�^q�||<q�||j�||<q�W|S(NRcs|j��j��}|S(N(tdialect_impltget_dbapi_type(ttyptdbtype(tdbapiR�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_lookup_typeJscs�|j��}|j��j��}|dk	r��dks]|�kr�t|��kr��dks�|�ks�t|��kr�|SdSdS(N(t_unwrapped_dialect_implRhRiR�R�(RjRhRk(RlR�t
exclude_typest
include_types(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRmPs(	thasattrR�R�Rltliteral_execute_paramsRR�RIRK(R�RpRoRmt
inputsizesRrRLRj((RlR�RoRpsH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_get_set_input_sizes_lookup7s 			,cCs|jdt�S(s�Return the bind param dictionary embedded into this
        compiled object, for those values that are present.

        .. seealso::

            :ref:`faq_sql_expression_string` - includes a usage example for
            debugging use cases.

        Ra(R�R�(R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�zscsj|d	kr!|jdt�}ni}|jr9g}nd	}|j�i}|jro|jrotd��ni�i}x�|jr�|jn|jj	�D]��|j
r�|j
j���n�}|j�}||j
kr|�kr�|j|d|j|���|<q�q�n||jkr@|�krB||}	nD|j��}
|j}||||
�\}	}|	||<|�|<|jsY|j|	�|jjr�|j��fd�t|
d�D��n |j��fd�|	D��|jr|jd�|	D��ng|	D]\}
}|
^q|�<qYq�|jr�|j��q�q�W�fd�}tj|j||j�}t|||||�}|rf|j|_|jj|j�|j|_t �|_x�|j!D]y}|jj|�}|jj|�xNt"|j#|j!|�D]3\}}|j$|�|j|<}||j|<q(Wq�Wn|S(
s�handle special post compile parameters.

        These include:

        * "expanding" parameters -typically IN tuples that are rendered
          on a per-parameter basis for an otherwise fixed SQL statement string.

        * literal_binds compiled with the literal_execute flag.  Used for
          things like SQL Server "TOP N" where the driver does not accommodate
          N as a bound parameter.

        R�s\'post-compile' bind parameters are not supported with the 'numeric' paramstyle at this time.trender_literal_valuec3sz|]p\}}t|d�D]T\}}��kr��|ddk	rd�||f��|dfVqqdS(is%s_%s_%sN(t	enumerateR�(Rmtit
tuple_elementtjRF(R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�s	ic3s1|]'\}}��kr|��fVqdS(N((RmRRF(R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�s	css|]\}}|VqdS(N((RmR�RF((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�scs�|jd�}�|}|jd�r�|jd�jd�}|d|d��dj��fd�|jd�D��}n|S(Niis~~is, c3s"|]}d�|�fVqdS(s%s%s%sN((Rmtexp(tbe_lefttbe_right(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>s(R7tsplitRA(R?Rtexprttok(treplacement_expressions(R{R|sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytprocess_expandings
N(%R�R�R�RRNRR�R�RtvaluesRVR[RRrtrender_literal_bindparamR�tpost_compile_paramst$_literal_execute_expanding_parametertliteral_executeR	R�RIRvtextendtappendRDREt_post_compile_patternR�R�R�R�t	frozensetR�RYRFt_with_value(R�t
parametersRtexpanded_parametersR�tnew_processorstto_update_setsRft	parametert	to_updateR�tleeptreplacement_exprt
expand_keyRFR�R�texpanded_stateRRRtexpanded_keyt	new_param((R�R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR%�s�				%


	

	
	)		 ssqlalchemy.engine.cursorcCstjj}|jj|j�S(s(utility method used for unit tests only.(R	t	preloadedt
engine_cursortCursorResultMetaDatat_create_description_match_mapR�(R�tcursor((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_create_result_map3s	cCs|jd}|S(Ni(t_key_getters_for_crud_column(R�tgetter((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_within_exec_param_key_getter;s
ssqlalchemy.engine.resultcs�tjj}|j}|jj}g|jD]'}tjd||�d�|f^q+�|j
��dk	r��jj|j
d��nd�|jg|jD]}|j^q�������fd�}|S(NR[cse�dk	r����n�dkrA��fd��D��S����fd��D��SdS(sgiven cursor.lastrowid value and the parameters used for INSERT,
            return a "row" that represents the primary key, either by
            using the "lastrowid" or by extracting values from the parameters
            that were sent along with the INSERT.

            c3s!|]\}}|��VqdS(N((RmR�R�(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>csc3s3|])\}}|�kr!�n	|��VqdS(N((RmR�R�(tautoinc_colt	lastrowidR�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>fsN(R�(R�R�(R�tgetterstproctrow_fn(R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR[Xs(R	R�t
engine_resultR�R�R`tprimary_keytoperatortmethodcallerR�t_autoincrement_columnR�t_cached_result_processorR�tresult_tupleR(R�tresulttparam_key_getterR`R�R[((R�R�R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt+_inserted_primary_key_from_lastrowid_getter@s	4		(cs�tjj}|j}|jj}d�t|j�D�}g|jD]L}||krot	j
||�tfnt	jd||�d�tf^qD�|jg|jD]}|j^q�����fd�}|S(NcSsi|]\}}||�qS(((RmtidxR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys
<dictcomp>ts	R[cs���fd��D��S(Nc3s3|])\}}|r!|��n	|��VqdS(N((RmR�tuse_row(R�trow(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�s((R�R�(R�R�(R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR[�s(R	R�R�R�R�R`RvRR�R�t
itemgetterR�R�R�R�R�R(R�R�R�R`tretR�R[((R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt+_inserted_primary_key_from_returning_getterls	Y(cCsdS(s�Called when a SELECT statement has no froms, and no FROM clause is
        to be appended.

        Gives Oracle a chance to tack on a ``FROM DUAL`` to the string output.

        R�((R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytdefault_from�scKsd|jj||�dS(Nt(t)(R�R�(R�tgroupingtasfromR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_grouping�scKsd|jj||�dS(NR�R�(R�R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_select_statement_grouping�sc
Ks�|jr�|jjr�|jdd}|j\}}}|rG|}n|}|jj}	|	dk	r�|	j|kr�|	j||	j�r�|jj|d<q�n|j	|jd||�S(Ni����R�trender_label_as_labeltwithin_columns_clause(
R�R�tsupports_simple_order_by_labelt_label_resolve_dictR�t_order_by_label_elementR�R�tshares_lineageR�(
R�R�R�R�R�t	with_colst
only_fromst	only_colstresolve_dictt
order_by_elem((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_label_reference�s 		c
Ks�|js|j|j�S|jdd}|j\}}}y'|rU||j}n
||j}Wn8tk
r�}	tj|jdddtj	d|	�n!X||d<|j|d||�SdS(	Ni����R�textrasECan't resolve label reference for ORDER BY / GROUP BY / DISTINCT etc.texc_clsR�R�R�(
R�R�t_text_clauseR�R�tKeyErrorRt_no_text_coercionR
RX(
R�R�R�R�R�R�R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_textual_label_reference�s"			
cKs|o
|}||k}	|	s%|r^t|jtj�rR|jd|j�}
q^|j}
n|r�|dk	r�||
|j||
f|j||j�n|jj	|dt
dt
|�ttj
|jj||
�S|	r�|jj||
�S|jj	|dt|�SdS(NtcolidentR�twithin_label_clause(t
isinstanceR�Rt_truncated_labelt_truncated_identifierR�R�R�R�R�R�t	OPERATORSRtas_R�tformat_labelR�(R�R�tadd_to_result_mapR�R�R�tresult_map_targetsR�trender_label_with_astrender_label_onlyt	labelname((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_label�s$

=	cCstjd��dS(Ns:Cannot compile Column object until its 'name' is assigned.(R
RX(R�R((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_fallback_column_namescKs|j}|j||�S(N(t	_resolvedR�(R�R�R�tsql_element((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_lambda_elements	cKs�|j}}|dkr+|j|�}n|j}|rbt|tj�rb|jd|�}n|dk	r�|||jf|}	|j	r�|	|j	f7}	n||||	|j
�n|r�|j|�}n|jj
|�}|j}
|
dks	|s	|
jr
|S|jj|
�}|r>|jj|�d}nd}|
j}
t|
tj�rt|jd|
�}
n||jj
|
�d|SdS(NR�t.R�talias(R�R�R�t
is_literalR�RR�R�Rt	_tq_labelR�tescape_literal_columnR�tquoteR`tnamed_with_columntschema_for_objecttquote_schema(R�RR�t
include_tableR�R�R�t	orig_nameR�ttargetsR`teffective_schemat
schema_prefixt	tablename((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_columns2
				cKs|jj|j�S(N(R�tformat_collationt	collation(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_collationFscKs|jS(N(R�(R�t
fromclauseR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_fromclauseIscKs|jS(N(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_indexLscKs0||d<|j|d<|jjj|j|�S(Nttype_expressionR�(R�R�t
type_compilerR�R�(R�t
typeclauseR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_typeclauseOs

cCs%|jjr!|jdd�}n|S(Nt%s%%(R�t_double_percentstreplace(R�ttext((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytpost_process_textTscCs%|jjr!|jdd�}n|S(NR�s%%(R�R�R�(R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�Yscsw���fd�}�js*t�_n|rL|dd�ftj�ntjd�tj|�j	�j
���S(NcsI|jd�}|�jkr5�j�j|��S�j|��SdS(Ni(R7t_bindparamsR�tbindparam_string(R?R�(R�R�t
textclause(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytdo_bindparam_scSs
|jd�S(Ni(R7(R?((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRAqR�(R�R�tisplaintextR�RtNULLTYPEtBIND_PARAMS_ESCREtBIND_PARAMSR�R�(R�RR�R�R((R�R�RsH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_textclause^s	c
Ks�|j}|r|jn
|jd}it�d6t�d6|d6}|jj|�|jr�x$|jD]}|j||�qjWn|p�|dkr�|jdt�p�|jdt�}	|	r%|j|_	|_
|jo�t|j�|_
x0|jD]"}
|j|
dtd	|j�q�Wn|j|j|�}|jr�|sXt|j�nd}|jd
|d|jd��|}n|jjd�|S(Ni����tcorrelate_fromstasfrom_fromsRitneed_result_map_for_compoundR8R�R�t
nesting_leveltvisiting_cte(R�t_default_stack_entryR\R�t_independent_ctesR�R[R�RR9t_textual_ordered_columnsRUtcolumn_argst_loose_column_name_matchingR�R�t_add_to_result_mapR�RROR�t_render_cte_clauseR�(
R�ttaftcompound_indexR�R�ttoplevelR<t	new_entrytctetpopulate_result_maptcR�R((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_textual_selectws@



	
		
cKsdS(NtNULL((R�R~R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_null�scKs|jjrdSdSdS(NRdt1(R�tsupports_native_boolean(R�R~R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_true�scKs|jjrdSdSdS(NR0t0(R�R (R�R~R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_false�scs*|jd���fd�|D�D��S(Ncss|]}|r|VqdS(N((Rmts((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�sc3s!|]}|j���VqdS(N(R�(RmR(R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�s(RA(R�Rt	separatorR�((R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_generate_delimited_list�scs�tjjtjtjjtjj|�\}}|dkrP|dj���St	tj}|j
d���fd�|D�D��SdS(Niicss|]}|r|VqdS(N((RmR$((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�sc3s!|]}|j���VqdS(N(R�(RmR(R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�s(RtBooleanClauseListt_process_clauses_for_booleanRtand_tTrue_t
_singletontFalse_R�R�RA(R�tclausesR�tlccR%((R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_generate_delimited_and_list�s			
cKsd|j||�S(Ns(%s)(tvisit_clauselist(R�t
clauselistR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_tuple�scKsA|j}|dkrd}n
t|j}|j|j||�S(Nt (R�R�R�R&R-(R�R1R�tsep((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR0�s
		
cKs�d}|jdk	r5||jj||�d7}nxI|jD]>\}}|d|j||�d|j||�d7}q?W|jdk	r�|d|jj||�d7}n|d7}|S(NsCASE R3sWHEN s THEN sELSE tEND(RFR�R�twhenstelse_(R�tclauseR�RntcondR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_case�s 3!
cKs|jj||�S(N(ttyped_expressionR�(R�ttype_coerceR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_type_coerce�scKs,d|jj||�|jj||�fS(NsCAST(%s AS %s)(R8R�R�(R�RR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_cast�scKs*d|dtjkrdnx|dtjkr5dn_|ddkrqd|jtjt|d��|�fn#d|jtj|d�|�f|dtjkr�dnx|dtjkr�dn_|ddkrd|jtjt|d��|�fn#d|jtj|d�|�ffS(	Ns	%s AND %sisUNBOUNDED PRECEDINGsCURRENT ROWs%s PRECEDINGs%s FOLLOWINGisUNBOUNDED FOLLOWING(RtRANGE_UNBOUNDEDt
RANGE_CURRENTR�tliteraltabs(R�trange_R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_format_frame_clauses< <c
Ks�|jj||�}|jr:d|j|j|�}n+|jr_d|j|j|�}nd}d|djgd|jfd|jffD]@\}}|dk	r�t	|�r�d||j||�f^q�|r�|gng�fS(NsRANGE BETWEEN %ssROWS BETWEEN %ss%s OVER (%s)R3t	PARTITIONtORDERs%s BY %s(
R�R�RCRDtrowsR�RAtpartition_bytorder_byRO(R�toverR�R�RCtwordR8((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_overs 				7cKs,d|jj||�|jj||�fS(Ns%s WITHIN GROUP (ORDER BY %s)(R�R�RI(R�twithingroupR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_withingroup7scKs,d|jj||�|jj||�fS(Ns%s FILTER (WHERE %s)(tfuncR�t	criterion(R�t
funcfilterR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_funcfilter=scKs8|jj|j|j�}d||jj||�fS(NsEXTRACT(%s FROM %s)(textract_mapR[tfieldR~R�(R�textractR�RT((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_extractCscKs5|j|j|�}|j||�}d||fS(Ns(%s).%s(tvisit_functiontfnR�(R�R�R�tcompiled_fntcompiled_col((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_scalar_function_columnJscKs~|dk	r+||j|jd|j�nt|d|jj�d�}|rb|||�}ntj|j�jd�}|r�|j	r�|d7}q�nO|j}|j
j|�s�t|t
j�r�|j
j|�n|}|d}djg|jD]B}|j
j|�s%t|t
j�r7|j
j|�n|^q�|g�i|j||�d6}|jrz|d7}n|S(Ns
visit_%s_funcs%(expr)sR�R~s WITH ORDINALITY((R�R�R�tgetattrtlowert	FUNCTIONSR[t_deannotatet	__class__t	_has_argsR�t_requires_quotes_illegal_charsR�RRR�RAtpackagenamestfunction_argspect_with_ordinality(R�ROR�R�tdispR�R�R((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRWOs,		$
L
	
cKs|j|j�S(N(tvisit_sequencetsequence(R�t
next_valueR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_next_value_funcuscKstd|jj��dS(Ns2Dialect '%s' does not support sequence increments.(R�R�R�(R�RhR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRgxscKs|jj||�S(N(tclause_exprR�(R�ROR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRd~scs�j}|j|���}|r;�jr;|�_n|j}|rS�jn
�jd}|p||o||jdt�}	|dkr�||d<n�jji|dd6|dd6|d6|d6|	d6�|jrx$|jD]}
|
j	���q�Wn�j
j|j�}d	|d	j���fd
�t
|j�D��}t�d<|�j|td����7}|�j|��7}|jr�|�j|��7}n�jr|s�t�j�nd}
�jd
|
dtd�jd��|}n�jjd�|S(Ni����Ritselect_0R	R
RR�R3c3s3|])\}}|j�d�d|��VqdS(R�RN(R�(RmRwR(R�R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�sR�R�Rtinclude_following_stackR
(R�t_compile_state_factoryR�R�RR[R�R�RR�tcompound_keywordstkeywordRARvtselectstgroup_by_clauseRMtorder_by_clauset_has_row_limiting_clauset_row_limit_clauseRROR�RR�R�(R�tcsR�RR�RR�t
compound_stmtR<tneed_result_mapRRpR�R((R�R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_compound_select�sN
	
		
"			
cKs3|jdk	r|j||�S|j||�SdS(N(t
_fetch_clauseR�tfetch_clausetlimit_clause(R�RvR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRu�scCs6d|j||rd|ndf}t||d�S(Ns
visit_%s_%s%st_R�(R�R\R�(R�t	operator_t
qualifier1t
qualifier2tattrname((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_get_operator_dispatch�s
cKs|dk	r0||f7}||d<||d<n|jr�|jrTtjd��n|j|jdd�}|r�|||j|�S|j|t|j|�Snf|jr�|j|jdd�}|r�|||j|�S|j|t|j|�Sntjd��dS(NR�R�sFUnary expression does not support operator and modifier simultaneouslytunaryR�tmodifiers,Unary expression has no operator or modifier(	R�R�R�R
RXR�t _generate_generic_unary_operatorR�t _generate_generic_unary_modifier(R�R�R�R�R�Rf((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_unary�s.


			cKsC|js|jjr(|j|j|�Sd|j|j|�SdS(Ns%s = 1(t_is_implicitly_booleanR�R R�R�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_is_true_unary_operator�s	cKsG|js|jjr,d|j|j|�Sd|j|j|�SdS(NsNOT %ss%s = 0(R�R�R R�R�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_is_false_unary_operators	cKsd|j|dtj�S(NsNOT %stoverride_operator(tvisit_binaryRtmatch_op(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_not_match_op_binarys	cKsd|j|t||�S(Ns(%s)(t_generate_generic_binaryR�(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_not_in_op_binarys	cCs�|tjkrCt|�dkr<ddjd�|D��SdSnP|tjkr�t|�dkrddjd�|D��SdSn
|j|�SdS(	Nis(%s)) OR (1 = 1s, css|]}dVqdS(RN((RmR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>ssNULL) OR (1 = 1s(%s)) AND (1 != 1css|]}dVqdS(RN((RmR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>#ssNULL) AND (1 != 1(Rt	not_in_opRORAtin_optvisit_empty_set_expr(R�R�t	expand_op((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_empty_set_op_exprscCstd|jj��dS(Ns3Dialect '%s' does not support empty set expression.(R�R�R�(R�t
element_types((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�*sc	s��jj�j�}|sv|jrX�jjr6dnd�j�jj�j�}q��j�jg�j�}n[|js�|jrt	|dt
jj�rt	|dt
j
t
j�r|jr�td��n�jjr�dnddj��fd�t|�D��}n�|r��j}|j|�}|rK|jd�sWtd��|jd�jd	�}|d
|d��dj����fd�|D��}n"dj��fd
�|D��}d|fS(NsVALUES R�is?bind_expression() on TupleType not supported with literal_bindss, c3sG|]=\}}ddj�fd�t|�jj�D��VqdS(s(%s)s, c3s'|]\}}�j||�VqdS(N(Ru(RmRFt
param_type(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>[sN(RARYR�RK(RmRwRx(R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>Xs	is)unexpected format for expanding parameters~~iic3s1|]'}d��j|�j��fVqdS(s%s%s%sN(RuR�(RmRF(R{R|R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>nsc3s$|]}�j|�j�VqdS(N(RuR�(RmRF(R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>xs((R�RnR�RIttuple_in_valuesR�RKR�t_isnullR�R	tcollections_abctSequencetstring_typestbinary_typest_has_bind_expressionR�RARvR�tsearchR7tAssertionErrorR}(	R�R�R�tbind_expression_templatettyp_dialect_impltreplacement_expressiontpost_compile_patternR?R((R{R|R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt2_literal_execute_expanding_parameter_literal_binds0sF							
c
s�|jr�j||�S|jj�j�}|sg�|jra�j|jj|j�}q��j|jg|j�}nH|js�|j	rpt
|dtjj
�rpt
|dtjtj�rp|js�t�gt|d�D]A\}}t|d�D]%\}}	d|||f|	f^qq���jjrAdnddj��fd�t|�D��}nWgt|d�D]"\}}	d||f|	f^q��dj�fd	��D��}�|fS(
Niis%s_%s_%ssVALUES R�s, c3sG|]=\��ddj����fd�t��D��VqdS(s(%s)s, c3s?|]5\}}�ji��t��|dd6VqdS(iR�N(RRO(RmRyRF(RwR�R�Rx(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�sN(RARv(Rm(R�R�(RwRxsH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�ss%s_%sc3s)|]\}}�ji|d6VqdS(R�N(R(RmRRF(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�s(R�R�R�RnR�RIR�RKR�R�R�R	R�R�R�R�t	_is_arrayR�RvR�RA(
R�R�R�R�R�R�RwRxRyRF((R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�~s:	
			;5cKsr|r�tj|j�r�|dk	rg|d}|jjtj|jj	|g|j
j	|g��q�|jjtj|jj	|j
j	��n|jr�t|jt
j�r�t|j
t
j�r�t|d<n|p�|j}|j|dd�}	|	r|	|||�Syt|}
Wn2tk
rN}tjtj||�d|�n X|j||
d|d||�SdS(Ntenclosing_lateralR�RR�tfrom_lintertlateral_from_linter(Rt
is_comparisonR�R�R�R	RBtproductRCt
_from_objectsRYtansi_bind_rulesR�Rt
BindParameterR�R�R�R�R	R�R
R�R�(R�RR�teager_groupingR�R�R�R�R~RftopstringR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��s<	
			
cKs|j|j|�S(N(R�tsql_function(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt&visit_function_as_comparison_op_binary�scKsd|jjr6|j|j|�d|j|j|�S|j|j|�d|j|j|�SdS(Ns %% s % (R�R�R�RCRY(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_mod_binary�s*cKs4|j|d<|j|d|j|j�d|�S(NR�R3(R�R�R�R�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_custom_op_binary�s

cKs#|j||j|j�d|�S(NR3(R�R�R�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_custom_op_unary_operator	scKs#|j|d|j|j�|�S(NR3(R�R�R�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_custom_op_unary_modifier	scKs~|jdt�}t|d<|j|d<|jj|d||�||jj|d||�}|rz|rzd|}n|S(Nt
_in_binaryt
_binary_opR�s(%s)(R[R�R�R�RCR�RY(R�RR�R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�	s

%
cKs||jj||�S(N(R�R�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�'	scKs|jj||�|S(N(R�R�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�*	scCstjddtj�S(Ns'%'R�(Rtliteral_columnRt
STRINGTYPE(R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_like_percent_literal-	scKsF|j�}|j}|j|j�j|�|_|j|||�S(N(t_cloneR�tconcatRYtvisit_like_op_binary(R�RR�R�tpercent((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_contains_op_binary1	s	cKsF|j�}|j}|j|j�j|�|_|j|||�S(N(R�R�R�RYtvisit_not_like_op_binary(R�RR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_not_contains_op_binary7	s	cKs=|j�}|j}|j|j�|_|j|||�S(N(R�R�t_rconcatRYR�(R�RR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_startswith_op_binary=	s	cKs=|j�}|j}|j|j�|_|j|||�S(N(R�R�R�RYR�(R�RR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_not_startswith_op_binaryC	s	cKs=|j�}|j}|j|j�|_|j|||�S(N(R�R�R�RYR�(R�RR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_endswith_op_binaryI	s	cKs=|j�}|j}|j|j�|_|j|||�S(N(R�R�R�RYR�(R�RR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_not_endswith_op_binaryO	s	cKsd|jjdd�}d|jj||�|jj||�f|r_d|j|tj�ndS(Ntescapes
%s LIKE %ss ESCAPE R�(	t	modifiersR[R�RCR�RYRuRR�(R�RR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�U	scKsd|jjdd�}d|jj||�|jj||�f|r_d|j|tj�ndS(NR�s%s NOT LIKE %ss ESCAPE R�(	R�R[R�RCR�RYRuRR�(R�RR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�b	scKsd|jjdd�}d|jj||�|jj||�f|r_d|j|tj�ndS(NR�slower(%s) LIKE lower(%s)s ESCAPE R�(	R�R[R�RCR�RYRuRR�(R�RR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_ilike_op_binarym	scKsd|jjdd�}d|jj||�|jj||�f|r_d|j|tj�ndS(NR�slower(%s) NOT LIKE lower(%s)s ESCAPE R�(	R�R[R�RCR�RYRuRR�(R�RR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_not_ilike_op_binaryx	scKs4|jjdt�}|j||r*dnd|�S(NR_s BETWEEN SYMMETRIC s	 BETWEEN (R�R[R�R�(R�RR�R�R_((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_between_op_binary�	scKs4|jjdt�}|j||r*dnd|�S(NR_s NOT BETWEEN SYMMETRIC s
 NOT BETWEEN (R�R[R�R�(R�RR�R�R_((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_not_between_op_binary�	s
cKstjd|jj��dS(Ns/%s dialect does not support regular expressions(R
RXR�R�(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_regexp_match_op_binary�	scKstjd|jj��dS(Ns/%s dialect does not support regular expressions(R
RXR�R�(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt visit_not_regexp_match_op_binary�	scKstjd|jj��dS(Ns;%s dialect does not support regular expression replacements(R
RXR�R�(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_regexp_replace_op_binary�	sc
Ksk|s�|jj|j�}|jr�|j|�}	|j|	dtd|d|oX|jd|d||�}
|jr�tj	d|
�}|s�t
d��d|jd	�|jd
�|jd�f}
|r�|j|dtd|
|�}d
|Sn|
Sn|s4|p|j
p|o|j}|p.|j}
nt}
|rr|j|dt|�}|jrnd
|}n|S|j|�}||jkrb|j|}||k	rb|js�|jr�|jj|j�r�|jj|j�r�tjd|��q_|j|jkr(tjd|f��q_|js:|jr_tjd|j|jf��q_qbn||j|j<|j|<|j}|r�xD|jD]6}|j|kr�||j}||j|�q�q�Wn|jr�t|_n|
r0|rt|_n|r|j|hO_q0|j |hO_ n|j!|d|
d|j|�}|jrgd
|}n|S(Ntskip_bind_expressionR�t
literal_bindsR�trender_postcompiles&^(.*)\(__\[POSTCOMPILE_(\S+?)\]\)(.*)$s)unexpected format for expanding parameters$(__[POSTCOMPILE_%s~~%s~~REPL~~%s~~])iiiR�s(%s)sIBind parameter '%s' conflicts with unique bind parameter of the same namesCan't reuse bound parameter name '%s' in both 'expanding' (e.g. within an IN expression) and non-expanding contexts.  If this parameter is to receive a list/array value, set 'expanding=True' on it for expressions that aren't IN, otherwise use a different parameter name.s�bindparam() name '%s' is reserved for automatic usage in the VALUES or SET clause of this insert/update statement.   Please use a name other than column name when using bindparam() with insert() or update() (for example, 'b_%s').tpost_compilet	expanding("R�RhR�R�tbind_expressionR�R�R�RDtmatchR�R7R�R�R�R�t_truncate_bindparamRRfR�tintersectiont_cloned_setR
RXt_is_crudRRR�t
isoutparamthas_out_parametersR$RrR�R(R�RLR�R�R�R�R�R�timplR�twrappedR?R�R�R�texistingR&tbptcb((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_bindparam�	s�
						

	
	


	
			
c
Ks�|tk	r|}n�|jdkr�|jdkr�|jdd�}|r||tjtjfkr|tj	d|j
f�n|jtj
|�S|j}|jr�|j}|||d|�\}}	|	S|j||j�SdS(NR�s�Bound parameter '%s' rendering literal NULL in a SQL expression; comparisons to NULL should not use operators outside of 'is' or 'is not'R�(R
RFR�R^R[Rtis_tis_notR	twarn_limitedRR�RRR_R�R�RuR�(
R�RLRuR�R�RFtopR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�3
s$				cCs�|j|j�}|rny||�SWq�tk
rj}tjtjdtj|�|f�d|�q�Xn"tjdtj|�|f��dS(sRender the value of a bind parameter as a quoted literal.

        This is used for statement sections that do not accept bind parameters
        on the target driver/database.

        This should be implemented by subclasses using the quoting services
        of the DBAPI.

        s]Could not render literal value "%s" with datatype %s; see parent stack trace for more detail.R�sNNo literal value renderer is available for literal value "%s" with datatype %sN(	t_cached_literal_processorR�t	ExceptionR	R�R
RXtsql_utilt_repr_single_value(R�RFR�t	processorte((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRuT
s
cCs[||jkr|j|S|j}t|tj�rJ|jd|�}n||j|<|S(NRL(RRR�RR�R�(R�RLt	bind_name((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�z
s	
cCs�||f|jkr&|j||fS|j|j�}t|�|jdkr�|jj|d�}|dt|jdd�!dt|�d}|d|j|<n|}||j||f<|S(NiiiR}i(Rt	apply_mapRRORR[tmaxthex(R�tident_classR�tanonnametcountert	truncname((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��
s/cCs||jS(N(R(R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
_anonymize�
scKs�|jrN|dk	r%|j|�n|jj|�t|j�|j|<n|s�tj|�r�tj	d�|�}|}|}q�n|r�|j
s�i|_
n||j
|<n|r�d|S|ji|d6SdS(NcSst|jd�S(Ni(t_BIND_TRANSLATE_CHARSR7(R?((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRA�
R�s__[POSTCOMPILE_%s]R�(RR�R�R�ROR�Rt_BIND_TRANSLATE_RER�RERVR(R�R�tpositional_namesR�R�tescaped_fromR�tnew_name((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�
s&
			cs9�j�||d<|j}t|tj�rD�jd|�}nt}	t}
|j�}|�j	kr��j	|\}}
|
|ks�t
�n|jr�t�j
�nd}||f}|�jkr��j|}||k}
||jks||kr	t}	q�||jkr;�j|=|j�}�j	|=q�|jdk	sY|jdk	rq|j|�rqt}	q�tjd|��n|r�|	r�dS|jdk	r�|j}|jj}t|tj�r��jd|�}q�n|}d}|	r�|�j|<|�j	|<d|jjkr]d�jkr]�jji|jjdd6��_n�jrv|�j|<n|�jkr��j||�n|r�|�jkr�|jr�t�_n�j j!||�}|jr�t|jt"j#�r|j}n:t|jt"j$�r*|jj%d}nts<t
d��g|j&t�D]'\}
}}}}|sL|pp|^qL}|dd	j'�fd
�|D��7}n�jr�g|d<�j(|<n|j)dt�tks�t
��j
s|jj*�d
||�S�j+||j,|�}|jj*�d
t|�}|d||f7}|j-rw|d�j+||j-|�7}n|�j|<q�n|r5|r�||j.|<n|	r�|
r��j j!||�S|r�j j!||�}�j j/|�r�j j0|�}n|�j1|�7}|S�j j!||�SndS(NR
R�is5Multiple, unrelated CTEs found with the same name: %rt
autocommitis%cte should only be against SelectBases(%s)s, c3s*|] }�jj|d�j�VqdS(RN(R�tformat_label_nameR(Rmtident(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>KsR�tsubqueryR�s AS %s
(%s)R3(2R7R�R�RR�R�R�R�t_get_reference_cteR1R�tnestingROR�R0t	_restatesRt_is_clone_ofR�tcompareR
RXt
_cte_aliasR�R�R�ReRR4t	visit_ctet	recursiveR2R�tformat_aliasRtSelecttCompoundSelectRqt_generate_columns_plus_namesRAR3R[R�t_generate_prefixest	_prefixest	_suffixesR�t_requires_quotesR�tget_render_as_alias_suffix(R�RR�tashintt	fromhintsR
R�R�tcte_namet
is_new_ctetembedded_in_current_named_ctet_reference_cteR4R}tcte_level_nametexisting_ctetexisting_cte_reference_ctet
pre_alias_ctetcte_pre_alias_nameR�t
col_sourcet
proxy_nametfallback_label_nameRtrepeatedt
recur_colstprefixesR<((R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�
s�


	
	

	
	

					
"					
cKsC|jrd|d<n|jr/|j||�S|j||�SdS(NR�(tjoins_implicitlyR�t_is_lateralt
visit_lateraltvisit_alias(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_table_valued_aliass
	
	cKs|j||�S(N(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_table_valued_column�sc
sN|r\d�kr.�js!t���d<n|	r\d�kr\d�kr\|	�d<q\n|dk	r�|j�kr��jj�d|d|d|d|d|d���}|r�|s�|r�d	|f}n|S�}�d<|s�|r)t�jtj�r�j	d
�j�}q)�j}n|rB�j
j�|�S|r1|	r^||	j�<n�jj�dt
d|��}|r�d	|f}n|�j�j
j�|��}
�jr��jr�|
d	dj���fd��jD��7}
n|r-�|kr-�j|
�|�|�}
n|
S�jj�d|��SdS(
NR�R�R�RtiscrudRtlateraltenclosing_aliass(%s)R�s, c3sV|]L}d�jj|j��jrFd�jjj|j��ndfVqdS(s%s%ss %sR�N(R�R�R�t_render_derived_w_typesR�R�R�R�(RmR�(R�R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�s
(R#R�R�R�R�R�R�RR�R�R�RR�R�Rt_supports_derived_columnst_render_derivedRARtformat_from_hint_text(R�R�R�RR(RR�R)R*R�R�R<t
alias_nameR�((R�R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR%�s`
				
	cKst|d<|j||�S(NR�(R�R%(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_subquery�s
cKst|d<d|j||�S(NR)s
LATERAL %s(R�R%(R�tlateral_R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR$�s
cKsgd|j|dt|�|j�j||�f}|jdk	rc|d|jj||�7}n|S(Ns%s TABLESAMPLE %sR�s REPEATABLE (%s)(R%R�t_get_methodR�tseedR�(R�ttablesampleR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_tablesample�scs%�jd�j�ddj���fd��jD��}t�jtj�rl�jd�j�}n	�j}�j	r�d}nd}|r!|r�|dk	r�|nd|j�<n|rd	||�j�j
j|��dj��fd
��jD��f}q!d||f}n|S(NR�s	VALUES %ss, c3sF|]<}|D]/}�jtjd�j|�j���Vq
qdS(RKN(R�RtTuplet
_column_typesR(RmtchunkR�(R�R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>sR�sLATERAL R�s(unnamed VALUES element)s
%s(%s)%s (%s)c3s'|]}|j�dt��VqdS(R�N(R�R�(RmR(R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>&ss%s(%s)(t
setdefaultR�RAt_dataR�R�RR�R�R#R�R�RR�R�tcolumns(R�R�R�R�R�tvR�R)((R�R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_valuess.				"cCsd|S(Ns AS ((R�talias_name_text((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR1scCsh|dks|dkr-t|_t|_n|jrHtjd��n|jj	||||f�dS(Nt*sxMost backends don't support SELECTing from a tuple() object.  If this is an ORM query, consider using the Bundle object.(
R�R�R9R�t_ad_hoc_textualRIR
RXR�R�(R�tkeynameR�tobjectsR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR4s		cKs.|jd|tt|dkr$in||�S(sLRender a column with necessary labels inside of a RETURNING clause.

        This method is provided for individual dialects in place of calling
        the _label_select_column method directly, so that the two use cases
        of RETURNING vs. SELECT can be disambiguated going forward.

        .. versionadded:: 1.4.21

        N(t_label_select_columnR�R�R�(R�tstmtRtcolumn_clause_argsR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_label_returning_column@scs��jj|j�}|jr<|s*|r<|j��}
n�}
|r�|j}|
ro|��fd�}q�|
�k	r�|���fd�}q�nd}|	s�td��t�t	j
�r�|
�k	r�t|
�jd�j
f�}q^|
}ne|r8|dk	std��t|
|d|�jf�}n&|
�k	rMt}n�t�t	j�r�|o{�jo{�jdk	}npt�t	j�r�t}nUt�t	j�r��jp�|}n1t�t	j�r��jdkr�t}nt}|rX|s|
s
t��j}nt|t	j�s7t	j|�n|}t|
|d|f�}n|
}|jd|	d|�|j||�S(	s.produce labeled columns present in a select().cs�||d|�dS(N(((RAR�RBR�(R(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�zscs�||�f||�dS(N((RAR�RBR�(RR(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��ssX_label_select_column is only relevant within the columns clause of a SELECT or RETURNINGR�s*proxy_name is required if 'name' is passedR�R�N(R�RhR�t_has_column_expressiontcolumn_expressionRR�R�R�RtLabelR�R�R�R�R�tColumnClauseR�R`t
TextClauseR�tUnaryExpressiontwraps_column_expressiontNamedColumnt_non_anon_labelt_anon_name_labelR�R	R�(R�RZRRR�RER�RRR�tcolumn_is_repeatedtneed_column_expressionsR�tcol_exprR�tresult_exprtrender_with_label((RRsH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRCUsr								
		
	cCs-|j||�}|r)|d|7}n|S(NR3(tget_from_hint_text(R�tsqltextR`thintR(thinttext((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR.�scCsdS(N(R�(R�tbyfroms((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytget_select_hint_text�scCsdS(N(R�(R�R`R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRV
scCsdS(N(R�(R�R`R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytget_crud_hint_text
scCs
dj|�S(NR3(RA(R�t
hint_texts((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytget_statement_hint_text
sR	R
cKs�|j}|r|jn
|jd}|j||�}|d}|d}	|r}|r}|jd|j|	�dd�}
n|jd|d|	�}
|
S(Ni����R	R
texplicit_correlate_fromstimplicit_correlate_froms((R�RRnt_get_display_fromst
difference(R�tselect_stmtR�R)R�RR<R�R	R
R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_display_froms_for_select

s



				c	&s�|dkstd��t|	d<|j|||	�}
|
j}|j}|rf|jrf|
|_n|dk	pu|}|jr�|j|d||	�}
|
|k	r�|
}|}|
}|j|||	�}
|
j}q�n|r�|jn
|jd}|p|j	dt�p|j	dt�}}|r4t}n|rQd|	krQ|	d=n|j
||
||||�}|	j�}|jitd6td6�d	}|j
r�|j|�\}}|r�||d
7}q�nd}|jr
x$|jD]}|j||	�q�Wn|jr2||j||j|	�7}n||j||	�7}gg|
jD]N\}}}}}|j|||||d|d|d
|d|d|�^qUD]}|dk	r�|^q�}|r�|dk	r�ttg|
jD]\}}}}}|^q�g|jD]\}}}}}|^q���g|jD]:\}}} }!||t�fd�| D��|!f^q@|_n|j|||
|||||	�}|jrg|jD]*\}"}#|"d|jjfkr�|#^q�}$|$r|d
|j|$�7}qn|jri|s&|ri|s;t |j�nd}%|j!d|%d|	j	d��|}n|j"r�|d
|j||j"|	�7}n|jj#d�|S(NspSQLAlchemy 1.4 requires use of the translate_select_structure hook for structural translations of SELECT objectsR�R�i����RR8R�R�sSELECT R3R�RRRQRRc3s!|]}�j||�VqdS(N(R[(Rmto(t	translate(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�
sR?RR
($R�R�R�RnR�R�R�ttranslate_select_structureRR[t_setup_select_stacktcopyR	t_hintst_setup_select_hintsRR�R
Rtget_select_precolumnstcolumns_plus_namesRCRMRYR�RJt_compose_select_bodyt_statement_hintsR�R�R^RRORRR�(&R�RcR�tinsert_intoRRtselect_wraps_forR)R�R�R�Rtis_embedded_selecttnew_select_stmttcompile_state_wraps_forR<RRRR�RER�t	hint_texttbyfromRR�RRRRRt
inner_columnsRR�R�tdialect_namethttper_dialectR((RfsH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_select1
s�	
	
		
				_%.M		$	
	c
Cs�tg|jj�D]P\\}}}|d|jjfkr||i|j|dt�d6f^q�}|j|�}||fS(NR?RR�(RMRjRZR�R�R�R�R[(R�RZR�R�RYRvRu((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRk�
sGcCs6|d}|d}|dkr-||d<nf|r�|d}	t|	j�}
t|j�|
kr�tjdd|
|dt|j�f��q�n|r�|r�|jd|j|�dd�}n|jd|d|�}ttj	|��}|j
|�}
i|d6|
d6|d	6|d
6}|jj|�|S(NR	R
iRls}All selectables passed to CompoundSelect must have identical numbers of columns; select #%d has %d columns, select #%d has %diR_R`RR�((
ROt_all_selected_columnsRmR
RXRaRbR\RR�ReR�R�(R�RZR�R<R�R)RR	R
RltnumcolsR�tnew_correlate_fromstall_correlate_fromsR((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRhs>




				
c	

Cs,|dj|�7}|jt@rTtit��}	|jt@}
|r`|	|_q`nd}	t}
|r|d7}|j	r�|djg|D]*}|j
|dtd|d|	|�^q��7}q|djg|D]$}|j
|dtd|	|�^q��7}n||j�7}|j
rO|j|j
d|	|�}|rO|d|7}qOn|
rb|	j�n|jr�||j||�7}n|jr�|j|j|�}|r�|d|7}q�n|jr�||j||�7}n|jr||j||�7}n|jdk	r(||j||�7}n|S(Ns, s 
FROM R�RR�s 
WHERE s	 
HAVING (RARR�R�R\R�R�R�R�RjR�R�R�t_where_criteriaR/R�t_group_by_clausesRrt_having_criteriat_order_by_clausesRsRtRut_for_update_argtfor_update_clause(
R�R�RZR�RwR�RvRR�R�twarn_lintingtftt((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRnBsN


		;	5	
				cs9dj��fd�|D��}|r5|d7}n|S(NR3c3sE|];\}}|dks-|�jjkr|j���VqdS(N(R�R�R�R�(RmtprefixRx(R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�s	(RA(R�RDR!R�R8((R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�s

c
s;�js
dS|r�|dkr�tj�}x�t�jj��D]g}�j|j�\}}||kp|o||dk}|jo�|s�qAn�j|||<qAWn	�j}|s�dStg|D]}|j	^q��}	�j
ry�j|j|�|dkry�jry�jdk	s+t����fd���fd���d�}
��j|
|��_qyn�j|	�d}|djg|j�D]}|^q��7}|d7}|r7|dkr7x`t|j��D]I}�j|j�\}}�j|=�j||f=�j|j�=q�Wn|S(	s�
        include_following_stack
            Also render the nesting CTEs on the next stack. Useful for
            SQL structures like UNION or INSERT that can wrap SELECT
            statements containing nesting CTEs.
        R�ics�|�jkr��jj|�}ttjj�fd�|D���}|�jkrz��j||�j|d�S|Sn�jj|g�SdS(Nc3s|]}�|�VqdS(N((Rmt	child_cte(tget_nested_positional(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�si(	R6R�R*RBtchaint
from_iterableR3R4R[(Rtchildrentto_add(R�treorder_positionalR�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��s	
csd|s||Sd}x7tt|��D]#\}}�j||kr'Pq'q'W|| |||S(Ni(RvtreversedR(tposR�tlevelR�R�(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��sR3s, 
s
 N(RR	R/R*tkeysR1RRRRRR6R�R�R�R�tget_cte_preambleRAR�R0(
R�RRmR
RRR4Rtis_rendered_levelR2R�tcte_textttxt((R�R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�sH		"		,

cCs|r
dSdSdS(NsWITH RECURSIVEtWITH((R�R((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scKs0|jrtjddd�n|jr,dSdS(scCalled when building a ``SELECT`` statement, position is just
        before column list.

        sDISTINCT ON is currently supported only by the PostgreSQL dialect.  Use of DISTINCT ON for other backends is currently silently ignored, however this usage is deprecated, and will raise CompileError in a future release for all backends that do not support this syntax.tversions1.4s	DISTINCT R�(t_distinct_onR	twarn_deprecatedt	_distinct(R�RZR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRls
	
cKs5|j|jttj|�}|r-d|SdSdS(s5allow dialects to customize how GROUP BY is rendered.s
 GROUP BY R�N(R&R�R�Rtcomma_op(R�RZR�tgroup_by((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRrs
cKs5|j|jttj|�}|r-d|SdSdS(s5allow dialects to customize how ORDER BY is rendered.s
 ORDER BY R�N(R&R�R�RR�(R�RZR�RI((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRss
cKsdS(Ns FOR UPDATE((R�RZR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�(scCstjd��dS(Ns@RETURNING is not supported by this dialect's statement compiler.(R
RX(R�RDtreturning_cols((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytreturning_clause+scKs�d}|jdk	r5|d|j|j|�7}n|jdk	r�|jdkr`|d7}n|d|j|j|�7}n|S(NR�s
 LIMIT s

 LIMIT -1s OFFSET (t
_limit_clauseR�R�t_offset_clause(R�RZR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR|1s 
 cKs�d}|jdk	r5|d|j|j|�7}n|jdk	r�|d|j|j|�|jdrodnd|jdr�dndf7}n|S(	NR�s
 OFFSET %s ROWSs
 FETCH FIRST %s%s ROWS %sR�s PERCENTt	with_tiess	WITH TIEStONLY(R�R�R�Rzt_fetch_clause_options(R�RZR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR{;scKs�|r|j|j|<n|s%|r�|jj|�}	|ro|	ro|jj|	�d|jj|j�}
n|jj|j�}
|r�||kr�|j|
||||�}
n|
SdSdS(NR�R�(tfullnameR�R�R�R�R�R�R.(R�R`R�R(RRt
use_schemaR�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_tableKs,cKs�|r1|jjtj|jj|jj��n|jrCd}n|jrUd}nd}|jj	|dt
d||�||jj	|dt
d||�d|jj	|d||�S(Ns FULL OUTER JOIN s LEFT OUTER JOIN s JOIN R�R�s ON (R�R	RBR�RCR�RYR5tisouterR�R�tonclause(R�RAR�R�R�t	join_type((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_joinls					NcCs�tg|jj�D]6\\}}}|d|jjfkr||f^q�}|j|kr�|j||j||jt�}n||fS(NR?(RMRjRZR�R�R`R.R�(R�RDt
table_textR`R�Rut
dialect_hints((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_setup_crud_hints�s-c
Ks�|j|||�}|j}|j}|rdt|_|jsL||_n|jsd||_qdn|jjit�d6t�d6|d6�t	j
||||�}|r�|jjr�|jj
r�|jjr�tjd|jj��n|jr/|jjs"tjd|jj��n|d}n|}|j}|jj}d}	|jrx|	|j||j|�7}	n|	d7}	|j|j�}
|jr�|j||
�\}}
n|jr�x$|jD]}|j||�q�Wn|	|
7}	|s�|r5|	d	d
jg|D]\}
}}|^q�7}	n|jsG|jr�|j ||jp_|j�}|j!r�|	d|7}	q�nd}|j#dk	r3|j$|jdd
dt|�}|j%r"|jj&r"|s�t'|j�nd}|	d|j(d|dtd|j)d��|f7}	q�|	d|7}	n�|rM|rM|	d7}	nx|jrz|	dd
jd�|D��7}	nKd
jg|D]\}
}}|^q��}|	d|7}	|r�||_*n|j+dk	r|j$|j+|�}|r|	d|7}	qn|r$|j!r$|	d|7}	n|j%r�|jj&r�|sOt'|j�nd}|j(d|dtd|j)d��|	}	n|jj,d�|	S(NR	R
RsWThe '%s' dialect with current database version settings does not support empty inserts.scThe '%s' dialect with current database version settings does not support in-place multirow inserts.isINSERT sINTO s (%s)s, R3i����tinsert_from_selectRps %s%sRRmR
s %ss DEFAULT VALUESs
 VALUES %scss,|]"}ddjd�|D��VqdS(s(%s)s, css|]\}}}|VqdS(N((RmRR~RF((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>sN(RA(Rmtcrud_param_set((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>ss VALUES (%s)(-RnR�R�R�RR�R�R�R\Rt_get_crud_paramsR�tsupports_default_valuestsupports_default_metavaluetsupports_empty_insertR
RXR�t_has_multi_parameterstsupports_multivalues_insertR�R
Rtformat_tableR`RjR�RR�RARRR�treturning_precedes_valuesR�RZR�Rtcte_follows_insertRORR[tinsert_single_values_exprt_post_values_clauseR�(R�tinsert_stmtR�R�Rtcrud_paramstcrud_params_singleR�R�R�R�R}RRR~RFR�tselect_textRR�tpost_values_clause((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_insert�s�	
				




	
			
		

*		

	%	
cCsdS(s3Provide a hook for MySQL to add LIMIT to the UPDATEN(R�(R�tupdate_stmt((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytupdate_limit_clause,scKs t|d<|j|dt|�S(s|Provide a hook to override the initial table clause
        in an UPDATE statement.

        MySQL overrides this.

        R�R((R�R�(R�R�t
from_tabletextra_fromsR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytupdate_tables_clause0s
cKstd��dS(s~Provide a hook to override the generation of an
        UPDATE..FROM clause.

        MySQL and MSSQL override this.

        sCThis backend does not support multiple-table criteria within UPDATEN(R�(R�R�R�R�t
from_hintsR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytupdate_from_clause:s	cKsy|j|||�}|j}|j}|rdt|_|jsL||_n|jsd||_qdn|j}t|�}|r�t	t
j|j��}g|D]}||kr�|^q�}	|j
|�}
ng}	|jh}
|jji|
d6|
d6|d6�d}|jr3||j||j|�7}n|j||j|	|�}tj||||�}
|jr�|j||�\}}nd}|jr�x$|jD]}|j||�q�Wn||7}|d7}|djd�|
D��7}|js|jr8|jr8|d|j||jp*|j�7}q8n|rv|j||j|	||�}|rv|d|7}qvn|jr�|j |j|�}|r�|d	|7}q�n|j!|�}|r�|d|7}n|js�|jr|jr|d|j||jp|j�7}n|j"re|s7t#|j�nd}|j$d
|d|j%d��|}n|jj&d�|S(
NR	R
RsUPDATE s SET s, css&|]\}}}|d|VqdS(t=N((RmRR~RF((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�sR3s WHERE RR
i����('RnR�R�R�RR�R�t_extra_fromsRUR\RR�R`ReR�R
RR�RR�RjR�R�RR�RARRR�R�R�R�R/R�RRORR[R�(R�R�R�R�RR�t
is_multitablet
main_fromsR�trender_extra_fromsR	R�R�R�R�Rtextra_from_textR�R|R((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_updateHs�	
				%					

	 		
		
cKstd��dS(s�Provide a hook to override the generation of an
        DELETE..FROM clause.

        This can be used to implement DELETE..USING for example.

        MySQL and MSSQL override this.

        sCThis backend does not support multiple-table criteria within DELETEN(R�(R�R�R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytdelete_extra_from_clause�scCs|j|dtdt�S(NR�R((R�R�(R�tdelete_stmtR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytdelete_table_clause�scKs�|j|||�}|j}|j}|rdt|_|jsL||_n|jsd||_qdn|j}|jhj	|�}|jj
i|d6|d6|d6�d}|jr�||j||j|�7}n|d7}|j
||j|�}|jr|j||�\}	}nd}	|jrQx$|jD]}
|
j||�q4Wn||7}|jr�|jr�|d|j||j�7}q�n|r�|j||j||	|�}|r�|d|7}q�n|jr|j|j|�}|r|d|7}qn|jr9|jr9|d|j||j�7}n|jr�|sWt|j�nd}
|jd|
d	|jd	��|}n|jjd
�|S(NR	R
RsDELETE sFROM R3s WHERE RR
i����(RnR�R�R�RR�R�R�R`ReR�R
RR�RjR�R�RR�RR�R�R�R�R/RRORR[R�(R�R�R�R�RR�R	R�R�R�RR�R�R((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_delete�sz	
							
		
						
cCsd|jj|�S(NsSAVEPOINT %s(R�tformat_savepoint(R�tsavepoint_stmt((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_savepoint+scCsd|jj|�S(NsROLLBACK TO SAVEPOINT %s(R�R�(R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_rollback_to_savepoint.scCsd|jj|�S(NsRELEASE SAVEPOINT %s(R�R�(R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_release_savepoint3sN(((((�R�R�R�tEXTRACT_MAPRStCOMPOUND_KEYWORDSRoR�RRRRR�RR�t'render_table_with_column_in_update_fromR�RR@R�R9RRR$R�R�RrR�R	R�RVR�R+R,tpostfetch_lastrowidRRDtcompileR�R�RR R�R�R�R)R-tmemoized_propertyR.tmemoized_instancemethodR7t
contextlibtcontextmanagerR=R#RNRPR�R�RtR�R%tpreload_moduleR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RRRR!R#R&R/R2R0R:R=R>RDRLRNRRRVR[RWRjRgRdRyRuR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R
R�RuR�R�R�RRR&R'R%R0R$R5R=RRRFRCR.R[RVR\R^R�RRdRgR{RkRhRnRRR�RlRrRsR�R�R|R{R�R�R�R�R�R�R�R�R�R�R�R�R�R�(((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR8s�
					
h&		mA�+			& *		*						;																	&			B			&								M	=0														
									�	&	
		#�		Y		
/		
�					!
�		4	T	W							
			�		
		s			]		tStrSQLCompilercBs�eZdZd�Zejd�d��Zd�Zd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�ZRS(s�A :class:`.SQLCompiler` subclass which allows a small selection
    of non-standard SQL features to render into a string value.

    The :class:`.StrSQLCompiler` is invoked whenever a Core expression
    element is directly stringified without calling upon the
    :meth:`_expression.ClauseElement.compile` method.
    It can render a limited set
    of non-standard SQL constructs to assist in basic stringification,
    however for more substantial custom or dialect-specific SQL constructs,
    it will be necessary to make use of
    :meth:`_expression.ClauseElement.compile`
    directly.

    .. seealso::

        :ref:`faq_sql_expression_string`

    cCsdS(Ns<name unknown>((R�R((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�Msssqlalchemy.engine.urlcKs�|jdkrjtjj}|jj|j�j��}|j|d�}t	|t
�sj|j|�Sntt
|�j
||�S(NR((tstringify_dialectR	R�t
engine_urltURLR!tget_dialecttstatement_compilerR�R�R�R�tsuperR�(R�R�R�R�turlR�tcompiler((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�PscKs,d|j|j|�|j|j|�fS(Ns%s[%s](R�RCRY(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_getitem_binary^scKs|j|||�S(N(R�(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_json_getitem_op_binarydscKs|j|||�S(N(R�(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt!visit_json_path_getitem_op_binarygscKsd|jj|�S(Ns<next sequence value: %s>(R�tformat_sequence(R�tseqR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRgjsc
CsQgtj|�D]*}|jd|ttid|j�^q}ddj|�S(NRs
RETURNING s, (Rt_select_iterablesRCR�R�R�RORA(R�RDR�RR;((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�ms=cs1t�d<ddj���fd�|D��S(NR�sFROM s, c3s'|]}|j�d���VqdS(RN(R�(RmR�(R�R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>|s(R�RA(R�R�R�R�R�R�((R�R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�ws
	cs1t�d<ddj���fd�|D��S(NR�s, c3s'|]}|j�d���VqdS(RN(R�(RmR�(R�R�R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>�s(R�RA(R�R�R�R�R�R�((R�R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��s
	cCsdS(NsSELECT 1 WHERE 1!=1((R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scCsd|S(Ns[%s]((R�R`R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRV�scKs|j|d|�S(Ns
 <regexp> (R�(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scKs|j|d|�S(Ns <not regexp> (R�(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scKs,d|jj||�|jj||�fS(Ns<regexp replace>(%s, %s)(RCR�RY(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��s(R�R�R�R�R	R�R�R�R�R�RgR�R�R�R�RVR�R�R�(((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�9s						
								tDDLCompilercBs�eZejd��Zejd��Zd(d(ed�Zd�Z	d�Z
d�Zd�Ze
d�Zd(d�Zd	�Zd
�Zd�Ze
ed�Zd
�Ze
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd(d�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d�Z%d�Z&d �Z'd!�Z(d"�Z)d#�Z*d$�Z+d%�Z,d&�Z-d'�Z.RS()cCs|jj|jdd|j�S(NR�(R�R�R�R�(R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��s	cCs
|jjS(N(R�R�(R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scCsdS(N(R�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scKs�|j}t|jtj�r�|j�}|j}|j|j�}t|�dkrk|dd}}n|d|d}}|j	d|�|j	d|�|j	d|j
|j��n|jj|j
|�S(NiiR�i����R`RR�(tcontextR�ttargetRtTableRiR�tformat_table_seqROR9R�R�R�R�(R�tddlR�R�R�tpathR`tsch((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt	visit_ddl�s		cKs|jj|j�}d|S(NsCREATE SCHEMA (R�t
format_schemaR�(R�R!R�R((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_create_schema�scKs9|jj|j�}d|}|jr5|d7}n|S(NsDROP SCHEMA s CASCADE(R�R�R�tcascade(R�tdropR�RR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_drop_schema�s

	
cKs�|j}|j}d}|jr>|dj|j�d7}n|d7}|jr^|d7}n||j|�d7}|j|�}|r�||d7}n|d7}d}t}x�|jD]�}	|	j}
yb|j	|	d|
j
o�|�}|dk	r||7}d}|d	|7}n|
j
r+t}nWq�t
jk
r�}tjt
jtjd
�|j|
j|jdf�d|�q�Xq�W|j|d
|j�}
|
r�||d	|
7}n|d|j|�7}|S(Ns
CREATE R3sTABLE sIF NOT EXISTS R�s
tfirst_pks, 
s	s (in table '%s', column '%s'): %siR�t _include_foreign_key_constraintss
)%s

(R�R�R
RAt
if_not_existsR�tcreate_table_suffixR�R;R�R�R�R�R
RXR	R�tutdescriptionR�targstcreate_table_constraintstinclude_foreign_key_constraintstpost_create_table(R�R!R�R`R�R�RR%Rt
create_columnRt	processedtcetconst((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_create_table�sN			
	

	
	
 csh|j}|jrdS�j|d|�}dj�fd�|jD��}|rd|d|7}n|S(NRR3c3s|]}�j|�VqdS(N(R�(RmR (R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>	s(R�tsystemR�tget_column_specificationRAtconstraints(R�R!RR�RR�R((R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_create_columns		cs�g}|jr"|j|j�n|j}|dk	rI|j|�}n	t�}|jg|jD]'}||jk	rb||krb|^qb�djd��fd�|D�D��S(Ns, 
	css!|]}|dk	r|VqdS(N(R�(Rmtp((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>)sc3s\|]R}|jdks'|j��r�jjsGt|dt�r�j|�VqdS(t	use_alterN(t_create_ruleR�R�tsupports_alterR\R�R�(RmR (R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>+s

(	R�R�tforeign_key_constraintsR�RbR\R�t_sorted_constraintsRA(R�R`RR�Rtall_fkcst	omit_fkcsR((R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR	s			
(cKs3d}|jr|d7}n||jj|j�S(Ns
DROP TABLE s
IF EXISTS (t	if_existsR�R�R�(R�RR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_drop_table9s	
cKsd|jj|j�S(Ns
DROP VIEW (R�R�R�(R�RR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_drop_view?scCs,|jdkr(tjd|j��ndS(Ns,Index '%s' is not associated with any table.(R`R�R
RXR�(R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_verify_index_tableBscs�|j}�j|��j}d}|jr;|d7}n|jdkr\tjd��n|d7}|jr||d7}n|d�j	|d|�|j
|jd|�d	j�fd
�|j
D��f7}|S(NsCREATE sUNIQUE s0CREATE INDEX requires that the index have a namesINDEX sIF NOT EXISTS s
%s ON %s (%s)tinclude_schemaR�s, c3s-|]#}�jj|dtdt�VqdS(R�R�N(R�R�R�R�(RmR~(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>`s(R�R R�RfR�R�R
RXRt_prepared_index_nameR�R`RAtexpressions(R�R!R!tinclude_table_schemaR�R�R�R�((R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_create_indexHs(	
		

	
cKs]|j}|jdkr*tjd��nd}|jrF|d7}n||j|dt�S(Ns.DROP INDEX requires that the index have a names
DROP INDEX s
IF EXISTS R!(R�R�R�R
RXRR"R�(R�RR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_drop_indexhs		
cCs�|jdk	r'|jj|j�}nd}|rN|rN|jj|�}nd}|jj|�}|r}|d|}n|S(NR�(R`R�R�R�R�tformat_index(R�R�R!R�tschema_namet
index_name((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR"uscKs,d|jj|jj�|j|j�fS(NsALTER TABLE %s ADD %s(R�R�R�R`R�(R�R!R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_add_constraint�scKs8d|jj|j�|jj|jjtj��fS(NsCOMMENT ON TABLE %s IS %s(R�R�R�R�RutcommentRtString(R�R!R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_set_table_comment�s	cKsd|jj|j�S(NsCOMMENT ON TABLE %s IS NULL(R�R�R�(R�RR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_drop_table_comment�scKsDd|jj|jdtdt�|jj|jjtj��fS(NsCOMMENT ON COLUMN %s IS %st	use_tableR�(	R�t
format_columnR�R�R�RuR+RR,(R�R!R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_set_column_comment�s
		cKsd|jj|jdt�S(NsCOMMENT ON COLUMN %s IS NULLR/(R�R0R�R�(R�RR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_drop_column_comment�scCs=g}|jdk	r,|jd|j�n|jdk	rR|jd|j�n|jdk	rx|jd|j�n|jdk	r�|jd|j�n|jdk	r�|jd�n|jdk	r�|jd�n|jdk	r|jd|j�n|j	dk	r0|j|j	r&dnd	�nd
j
|�S(NsINCREMENT BY %ds
START WITH %dsMINVALUE %dsMAXVALUE %dsNO MINVALUEsNO MAXVALUEsCACHE %dtCYCLEsNO CYCLER3(t	incrementR�R�R�tminvaluetmaxvaluet
nominvaluet
nomaxvaluetcachetcycleRA(R�tidentity_optionsR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytget_identity_options�s$cKs�d|jj|j�}|r,||7}n|jjdkrS|jj|j_n|j|j�}|r||d|7}n|S(NsCREATE SEQUENCE %sR3(R�R�R�R�R�R�tdefault_sequence_baseR<(R�R!R�R�R�toptions((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_create_sequence�s

cKsd|jj|j�S(NsDROP SEQUENCE %s(R�R�R�(R�RR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_drop_sequence�scKs�|j}|jdk	r-|jj|�}nd}|dkrXtjd|j��nd|jj|jj�||j	r�dp�dfS(Ns<Can't emit DROP CONSTRAINT for constraint %r; it has no names#ALTER TABLE %s DROP CONSTRAINT %s%ss CASCADER�(
R�R�R�R�tformat_constraintR
RXR�R`R�(R�RR�R tformatted_name((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_drop_constraint�s	cKs�|jj|�d|jjj|jd|�}|j|�}|dk	r^|d|7}n|jdk	r�|d|j|j�7}n|j	dk	r�|jj
r�|d|j|j	�7}n|jr�|j	s�|jj
r�|d7}n|S(NR3R�s	 DEFAULT s	 NOT NULL(R�R0R�R�R�R�tget_column_default_stringR�tcomputedtidentitytsupports_identity_columnstnullable(R�RR�tcolspecR(((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�s

cCsdS(NR�((R�R`((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�scCsdS(NR�((R�R`((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�scCspt|jtj�rht|jjtj�rI|jj|jjt	j
�S|jj|jjdt�SndSdS(NR�(R�tserver_defaultRt
DefaultClausetargR	R�R�RuRR�R�R�R�(R�R((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRD�s		cKs'|jr|j|�S|j|�SdS(N(tis_column_leveltvisit_column_check_constrainttvisit_check_constraint(R�R R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt&visit_table_or_column_check_constraints	
cKs�d}|jdk	rG|jj|�}|dk	rG|d|7}qGn|d|jj|jdtdt�7}||j	|�7}|S(NR�sCONSTRAINT %s s
CHECK (%s)R�R�(
R�R�R�RAR�R�RWR�R�tdefine_constraint_deferrability(R�R R�R�RB((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyROscKs�d}|jdk	rG|jj|�}|dk	rG|d|7}qGn|d|jj|jdtdt�7}||j	|�7}|S(NR�sCONSTRAINT %s s
CHECK (%s)R�R�(
R�R�R�RAR�R�RWR�R�RQ(R�R R�R�RB((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRNscs�t|�dkrdSd}|jdk	r]�jj|�}|dk	r]|d|7}q]n|d7}|ddj�fd�|jr�|jn|jD��7}|�j	|�7}|S(NiR�sCONSTRAINT %s sPRIMARY KEY s(%s)s, c3s$|]}�jj|j�VqdS(N(R�R�R�(RmR(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>3s(
ROR�R�R�RARAt_implicit_generatedtcolumns_autoinc_firstR;RQ(R�R R�R�RB((R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_primary_key_constraint)s
cs|j�d}|jdk	rP|jj|�}|dk	rP|d|7}qPnt|j�djj}|ddj�fd�|jD��|j	||��dj�fd�|jD��f7}||j
|�7}||j|�7}||j|�7}|S(NR�sCONSTRAINT %s is"FOREIGN KEY(%s) REFERENCES %s (%s)s, c3s$|]}�j|jj�VqdS(N(R�tparentR�(RmR�(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>Gsc3s$|]}�j|jj�VqdS(N(R�RR�(RmR�(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>Ms(
R�R�R�RAR*RRR`RAtdefine_constraint_remote_tabletdefine_constraint_matchtdefine_constraint_cascadesRQ(R�R R�R�RBtremote_table((R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_foreign_key_constraint=s$	!cCs
|j|�S(s=Format the remote table clause of a CREATE CONSTRAINT clause.(R�(R�R R`R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRVUscs�t|�dkrdSd}|jdk	r]�jj|�}|dk	r]|d|7}q]n|ddj�fd�|D��7}|�j|�7}|S(NiR�sCONSTRAINT %s sUNIQUE (%s)s, c3s$|]}�jj|j�VqdS(N(R�R�R�(RmR(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pys	<genexpr>cs(ROR�R�R�RARARQ(R�R R�R�RB((R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_unique_constraintZs!cCsnd}|jdk	r8|d|jj|jt�7}n|jdk	rj|d|jj|jt�7}n|S(NR�s
 ON DELETE %ss
 ON UPDATE %s(tondeleteR�R�tvalidate_sql_phrasetFK_ON_DELETEtonupdatetFK_ON_UPDATE(R�R R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRXhscCsnd}|jdk	r8|jr+|d7}q8|d7}n|jdk	rj|d|jj|jt�7}n|S(NR�s DEFERRABLEs NOT DEFERRABLEs
 INITIALLY %s(R)R�R;R�R]tFK_INITIALLY(R�R R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRQts	

cCs-d}|jdk	r)|d|j7}n|S(NR�s	 MATCH %s(R�R�(R�R R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRW�scKsad|jj|jdtdt�}|jtkrA|d7}n|jtkr]|d7}n|S(NsGENERATED ALWAYS AS (%s)R�R�s STOREDs VIRTUAL(R�R�RWR�R�t	persisted(R�t	generatedR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_computed_column�s

cKsFd|jrdndf}|j|�}|rB|d|7}n|S(NsGENERATED %s AS IDENTITYtALWAYSs
BY DEFAULTs (%s)(talwaysR<(R�RFR�R�R>((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_identity_column�sN(/R�R�R	R�R�R�R�R�R�R�R�RRR�RR	RRR R%R&R"R*R-R.R1R2R<R?R@RCRRRRDRPRORNRTRZRVR[RXRQRWRdRg(((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��sP				7(				
				
		
						
									
		
tGenericTypeCompilercBs�eZd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+RS(*cKsdS(NtFLOAT((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_FLOAT�scKsdS(NtREAL((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_REAL�scKsT|jdkrdS|jdkr4di|jd6Sdi|jd6|jd6SdS(NtNUMERICsNUMERIC(%(precision)s)t	precisions!NUMERIC(%(precision)s, %(scale)s)tscale(RnR�Ro(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_NUMERIC�s
cKsT|jdkrdS|jdkr4di|jd6Sdi|jd6|jd6SdS(NtDECIMALsDECIMAL(%(precision)s)Rns!DECIMAL(%(precision)s, %(scale)s)Ro(RnR�Ro(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_DECIMAL�s
cKsdS(NtINTEGER((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_INTEGER�scKsdS(NtSMALLINT((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_SMALLINT�scKsdS(NtBIGINT((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_BIGINT�scKsdS(Nt	TIMESTAMP((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_TIMESTAMP�scKsdS(NtDATETIME((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_DATETIME�scKsdS(NtDATE((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_DATE�scKsdS(NtTIME((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_TIME�scKsdS(NtCLOB((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_CLOB�scKsdS(NtNCLOB((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_NCLOB�scCsD|}|jr#|d|j7}n|jr@|d|j7}n|S(Ns(%d)s
 COLLATE "%s"(tlengthR�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_render_string_type�s		cKs|j|d�S(NtCHAR(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_CHAR�scKs|j|d�S(NtNCHAR(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_NCHAR�scKs|j|d�S(NtVARCHAR(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_VARCHAR�scKs|j|d�S(NtNVARCHAR(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_NVARCHAR�scKs|j|d�S(NtTEXT(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_TEXT�scKsdS(NtBLOB((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_BLOB�scKsd|jrd|jpdS(NtBINARYs(%d)R�(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_BINARY�scKsd|jrd|jpdS(Nt	VARBINARYs(%d)R�(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_VARBINARY�scKsdS(NtBOOLEAN((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_BOOLEAN�scKs|j||�S(N(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_large_binary�scKs|j||�S(N(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_boolean�scKs|j||�S(N(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_time�scKs|j||�S(N(R|(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_datetimescKs|j||�S(N(R~(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_datescKs|j||�S(N(Rx(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_big_integerscKs|j||�S(N(Rv(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_small_integer	scKs|j||�S(N(Rt(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_integerscKs|j||�S(N(Rl(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_realscKs|j||�S(N(Rj(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_floatscKs|j||�S(N(Rp(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_numericscKs|j||�S(N(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_stringscKs|j||�S(N(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_unicodescKs|j||�S(N(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_textscKs|j||�S(N(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_unicode_text!scKs|j||�S(N(R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
visit_enum$scKstjd|��dS(NsKCan't generate DDL for %r; did you forget to specify a type on this Column?(R
RX(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR'scKs|j|j|j�|�S(N(R�ttype_engineR�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_type_decorator.scKs
|j|�S(N(tget_col_spec(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytvisit_user_defined1s(,R�R�RjRlRpRrRtRvRxRzR|R~R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�RR�R�(((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRh�sT																																										tStrSQLTypeCompilercBs5eZd�Zd�Zd�Zd�Zd�ZRS(cKs?y
|j}Wntk
r-|j||�SX|||�SdS(N(R�tAttributeErrort_visit_unknown(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�6s


cCs&|jd�r|jSt|��dS(Ntvisit_(t
startswithR�R�(R�R((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt__getattr__>scKs6|jj|jjj�kr(|jjSt|�SdS(N(R`R�tuppertrepr(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�Ds
cKsdS(NR((R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRJscKs6y
|j}Wntk
r't|�SX||�SdS(N(R�R�R�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�Ms


(R�R�R�R�R�RR�(((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�5s
				tIdentifierPreparercBs�eZdZeZeZeZe	j
d�Zdd de
ed�Zd�Zd�Zd�Zd�Zd�Zd	�Zd
�Zd�Zd d�Zd d
�Zd�Ze
d�Zd d�Zd d�Zd d�Zej d�e
d��Z!e
d�Z"e
d�Z#d�Z$d�Z%e
d d�Z&d�Z'd d�Z(ed d ed d�Z)e
d�Z*ej+d��Z,d�Z-RS(!s@Handle quoting and case-folding of identifiers based on options.Rt"cCsq||_||_|p|j|_||_|jd|_||_||_i|_|jjdk|_	dS(ssConstruct a new ``IdentifierPreparer`` object.

        initial_quote
          Character that begins a delimited identifier.

        final_quote
          Character that ends a delimited identifier. Defaults to
          `initial_quote`.

        omit_schema
          Prevent prepending schema name. Useful for databases that do
          not support schemae.
        iRsRpN(RsRp(
R�t
initial_quotetfinal_quotetescape_quotetescape_to_quotetomit_schematquote_case_sensitive_collationst_stringsRR�(R�R�R�R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�ks							csD|jj|j�}|jj|j��fd�}||_|S(Ncs}|j}|�krr|jrr|dk	rXd|ksBd|krXtjd|��ntd|pgddt�S|jSdS(Nt[t]sJSquare bracket characters ([]) not supported in schema translate name '%s's
__[SCHEMA_%s]t_noneR�(Rt_use_schema_mapR�R
RXRR�(R�R�(R�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt
symbol_getter�s	$
(R`t__new__t__dict__R	R�(R�R�tprepR�((R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��s
	csH|�d�kr#�d�d<n��fd�}tjd||�S(NR�csS|jd�}�|}|sF�jj}|sFtjd��qFn�j|�S(NisLDialect has no default schema name; can't use None as dynamic schema target.(R7R�tdefault_schema_nameR
RXR�(R?R�R�(tdR�(sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��s
s(__\[SCHEMA_([^\]]+)\])(R�RDRE(R�R�R�R�((R�R�sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��s

cCs:|j|j|j�}|jr6|jdd�}n|S(s�Escape an identifier.

        Subclasses should override this to provide database-dependent
        escaping behavior.
        R�s%%(R�R�R�R�(R�RF((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_escape_identifier�s	cCs|j|j|j�S(s�Canonicalize an escaped identifier.

        Subclasses should override this to provide database-dependent
        unescaping behavior that reverses _escape_identifier.
        (R�R�R�(R�RF((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_unescape_identifier�scCs?|dk	r;|j|�r;tjd||jf��n|S(s�keyword sequence filter.

        a filter for elements that are intended to represent keyword sequences,
        such as "INITIALLY", "INITIALLY DEFERRED", etc.   no special characters
        should be present.

        .. versionadded:: 1.3

        s/Unexpected SQL phrase: %r (matching against %r)N(R�R�R
RXtpattern(R�R�treg((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR]�s
cCs|j|j|�|jS(s~Quote an identifier.

        Subclasses should override this to provide database-dependent
        quoting behavior.
        (R�R�R�(R�RF((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytquote_identifier�s
cCsT|j�}||jkpS|d|jkpS|jjtj|��pS||kS(s5Return True if the given identifier requires quoting.i(R]treserved_wordstillegal_initial_characterstlegal_charactersR�R	t	text_type(R�RFtlc_value((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�s
cCs|jjtj|��S(sjReturn True if the given identifier requires quoting, but
        not taking case convention into account.(R�R�R	R�(R�RF((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRb�scCs/|dk	r"tjddd�n|j|�S(sConditionally quote a schema name.


        The name is quoted if it is a reserved word, contains quote-necessary
        characters, or is an instance of :class:`.quoted_name` which includes
        ``quote`` set to ``True``.

        Subclasses can override this to provide database-dependent
        quoting behavior for schema names.

        :param schema: string schema name
        :param force: unused

            .. deprecated:: 0.9

                The :paramref:`.IdentifierPreparer.quote_schema.force`
                parameter is deprecated and will be removed in a future
                release.  This flag has no effect on the behavior of the
                :meth:`.IdentifierPreparer.quote` method; please refer to
                :class:`.quoted_name`.

        s�The IdentifierPreparer.quote_schema.force parameter is deprecated and will be removed in a future release.  This flag has no effect on the behavior of the IdentifierPreparer.quote method; please refer to quoted_name().R�s0.9N(R�R	R�R�(R�Rtforce((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��s

cCs�|dk	r"tjddd�nt|dd�}|dkr�||jkrZ|j|S|j|�r�|j|�|j|<n
||j|<|j|Sn|r�|j|�S|SdS(sConditionally quote an identifier.

        The identifier is quoted if it is a reserved word, contains
        quote-necessary characters, or is an instance of
        :class:`.quoted_name` which includes ``quote`` set to ``True``.

        Subclasses can override this to provide database-dependent
        quoting behavior for identifier names.

        :param ident: string identifier
        :param force: unused

            .. deprecated:: 0.9

                The :paramref:`.IdentifierPreparer.quote.force`
                parameter is deprecated and will be removed in a future
                release.  This flag has no effect on the behavior of the
                :meth:`.IdentifierPreparer.quote` method; please refer to
                :class:`.quoted_name`.

        s�The IdentifierPreparer.quote.force parameter is deprecated and will be removed in a future release.  This flag has no effect on the behavior of the IdentifierPreparer.quote method; please refer to quoted_name().R�s0.9R�N(R�R	R�R\R�RR�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�"s


cCs|jr|j|�S|SdS(N(R�R�(R�tcollation_name((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�Vs	
cCs[|j|j�}|j|�}|jrW|rW|dk	rW|j|�d|}n|S(NR�(R�R�R�R�R�R�(R�RhR�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�\s
cCs|j|p|j�S(N(R�R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�iscCs|j|p|j�S(N(R�R�(R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRlscCs4|p|j}|j|�r0|j|�}n|S(N(R�RR�(R�t	savepointR�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�osssqlalchemy.sql.namingcCs�tjj}|jtjkrF|j||j�}|dkrOdSn	|j}|j	dkrq|j
|d|�S|j|d|�SdS(NR�t_alembic_quote(R	R�t
sql_namingR�Rt
_NONE_NAMEt_constraint_name_for_tableR`R�Rttruncate_and_render_index_namet#truncate_and_render_constraint_name(R�R R�tnamingR�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyRAxs	
cCs+|jjp|jj}|j|||�S(N(R�tmax_index_name_lengthRt _truncate_and_render_maxlen_name(R�R�R�tmax_((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scCs+|jjp|jj}|j|||�S(N(R�tmax_constraint_name_lengthRR�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scCs{t|tj�rPt|�|kr`|d|d!dtj|�d}q`n|jj|�|sj|S|j|�SdS(NiiR}i����(	R�RR�ROR	tmd5_hexR�tvalidate_identifierR�(R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��s,cCs
|j|�S(N(RA(R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR'�scCsj|dkr|j}n|j|�}|j|�}|jrf|rf|rf|j|�d|}n|S(s'Prepare a quoted table and schema name.R�N(R�R�R�R�R�R�(R�R`R�R�R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scCs
|j|�S(sPrepare a quoted schema name.(R�(R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scCs=|dk	r0t|tj�r0|j|�}n|j|�S(sPrepare a quoted column name.N(R�R�RR�R�R�(R�R�R((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR��scCs�|dkr|j}n|dk	rHt|tj�rH|j|�}nt|dt�s�|r�|j|j	d|d|�d|j
|�S|j
|�Sn.|r�|j|j	d|d|�d|S|SdS(sPrepare a quoted column name.R�R�R�R�N(R�R�R�RR�R�R\R�R�R`R�(R�RR/R�t
table_nameR�R((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR0�s-$cCsa|j|�}|jrG|rG|rG|j|�|j|dt�fS|j|dt�fSdS(s(Format table name and schema as a tuple.R�N(R�R�R�R�R�(R�R`R�R�((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�s
cCsrg|j|j|j|j�fD]}tj|�^q"\}}}tjdi|d6|d6|d6�}|S(NsM(?:(?:%(initial)s((?:%(escaped)s|[^%(final)s])+)%(final)s|([^\.]+))(?=\.|$))+tinitialtfinaltescaped(R�R�R�RDR�R�(R�R$R�R�t
escaped_finaltr((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt_r_identifierss7cCsQ|j}gg|j|�D]\}}|p1|^qD]}|j|�^q8S(s:Unpack 'schema.table.column'-like strings into components.(R�tfindallR�(R�tidentifiersR�taRRw((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pytunformat_identifiers's	N(.R�R�R�tRESERVED_WORDSR�tLEGAL_CHARACTERSR�tILLEGAL_INITIAL_CHARACTERSR�R�t
attrgetterR�R�R�R�R�R�R�R�R�R]R�RRbR�R�R�R�R�RR�R	R�RAR�R�R�R'R�R�R�R0R�R�R�R�(((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyR�VsT							
	
	'4	
				&(�R�R�R�RBR�RDR�RRRRRRRRRR	R�R
RRR
R\R�R�tIR�tLEGAL_CHARACTERS_PLUS_SPACEtrangeReR�R^R`RatUNICODERRRR�RMRYR�R)tor_taddtmulREtdivtmodttruedivtnegtlttletnetgttgeteqtis_distinct_fromtis_not_distinct_fromt	concat_opR�tnot_match_opR�R�R�R�R�R�R�Rtexiststdistinct_optinvtany_optall_optdesc_optasc_optnulls_first_opt
nulls_last_opR�RxR#R%R&R'RFRGRR�R[Rgtcubetrollupt
grouping_setsR^R�R
R�t	UNION_ALLR�t
EXCEPT_ALLR�t
INTERSECT_ALLR�tRM_RENDERED_NAMEtRM_NAMEt
RM_OBJECTStRM_TYPEt
namedtupleR�tsymbolR�R�R�R�R�tobjectR�twith_metaclasstEnsureKWArgTypeR�t
ColumnElementR�RR�R�RhR�R�(((sH/opt/alt/python27/lib/python2.7/site-packages/sqlalchemy/sql/compiler.pyt<module>s%

























































	
(?�%���������������c���!