+
    iu                     a 0 t $ R t^ RIHt ^ RIt^ RIHt ^ RIt^ RI	H
t
 ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH t  ^ RIH!t! ^ RIH"t" ^ RIH#t# ^ RIH$t$ ^ RIH%t% ^ RIH&t& ^RI'H(t( ^RI'H)t) ^RI'H*t* ^RI'H+t+ ^RI'H,t, ^RI'H-t- ^R I'H.t. ^R!I'H/t/ ^R"I'H0t0 ^R#I'H1t1 ^R$I'H2t3 ^R%I4H5t5 ^R&I4H6t6 ^R'I(H7t7 ^R(I(H8t8 ^R)I(H9t9 ^R*I(H:t: ^R+I(H;t; ^R,I+H<t< ^R-I1H=t= ^R.I>H?t? ^R/I'H@t@ ^R$I'H2t2 ^R0I2HAtA ^R1IBHCtC ^R2IBHDtD ^R3IBHEtE ^R4IBHFtF ]PJ                  '       EdK   ^R5IGHHtH ^R6I(HItI ^R7I(HJtJ ^R8I(HKtK ^R9ILHMtM ^R:INHOtO ^R;IPHQtQ ^R<IPHRtR ^R=IPHStS ^R>IPHTtT ^R?IPHUtU ^R@I+HVtV ^RAI+HWtW ^RBI+HXtX ^RCI+HYtY ^RDI+HZtZ ^REI+H[t[ ^RFI+H\t\ ^RGI+H]t] ^RHI+H^t^ ^RII+H_t_ ^RJI,H`t` ^RKI/Hata ^RLI/Hbtb ^RMI/Hctc ^RNI/Hdtd ^ROI/Hete ^RPI/Hftf ^RQI/Hgtg ^RRI/Hhth ^RSI/Hiti ^RTI0Hjtj ^RUI0Hktk ^RVI0Hltl ^RWI0Hmtm ^RXI0Hntn ^RYI0Hoto ^RZI0Hptp ^R[I0Hqtq ^R\I0Hrtr ^R]IsHttt ^R^IsHutu ^R_IsHvtv ^R`IsHwtw ^RaI>Hxtx ^RbIyHztz ^RcI{H|t| ^RdI{H}t} ^ReI{H~t~ ^RfI{Ht ^RgI{Ht ^RhI{Ht ^RiI{Ht ^RjI{Ht ^RkI{Ht ]Rl]3,          t0 RmkRnkRokRpkRqkRrkRskRtkRukRvkRwkRxkRykRzkR{kR|kR}kR~kRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkRkt]EP                  ! R]EP                  4      t]EP                  ! R]EP                  4      t]! ^ ^
4       U u0 uF  p ]! V 4      kK  	  up EP                  R.4      t]EP                  ! R]EP                  4      t]EP                  ! R]EP                  4      t]EP                  ! R]EP                  4      t]EP                  ! R]EP$                  4      t]EP                  ! R]EP$                  4      tRtR]RRRRRRRRRR/t/ ]-EP.                  Rb]-EP0                  Rb]-EP2                  Rb]-EP4                  Rb]-EP6                  Rb]-EP8                  Rb]-EP:                  Rb]-EP<                  Rb]-EP>                  Rb]-EP@                  Rb]-EPB                  Rb]-EPD                  Rb]-EPF                  Rb]-EPH                  Rb]-EPJ                  Rb]-EPL                  Rb]-EPN                  Rb/ ]-EPP                  Rb]-EPR                  Rb]-EPT                  Rb]-EPV                  Rb]-EPX                  Rb]-EPZ                  Rb]-EP\                  Rb]-EP^                  Rb]-EP`                  Rb]-EPb                  Rb]-EPd                  Rb]-EPf                  Rb]-EPh                  Rb]-EPj                  Rb]-EPl                  Rb]-EPn                  Rb]-EPp                  RbC]-EPr                  ER ]-EPt                  ER]-EPv                  ER]-EPx                  ER]-EPz                  ER]-EP|                  ER]-EP~                  ER/Ct],EP                  ER],EP                  ER],EP                  ER	],EP                  ER
],EP                  ER],EP                  ER],EP                  ER],EP                  ER],EP                  ER],EP                  ER],EP                  ER],EP                  ER],EP                  ER],EP                  ER/tER]ER&   ERERERERERERERERERERERERERERERERERERER ER ER!ER!ER"ER"ER#ER#ER$ER$ER%ER%/t]0EP                  EP                  ER&]0EP                  EP                  ER']0EP                  EP                  ER(]0EP                  EP                  ER)]0EP                  EP                  ER*]0EP                  EP                  ER+/t ! ER, ER-]4      t ! ER. ER/]D4      t^ tER0]ER1&   ^tER2]ER3&   ^tER4]ER5&   ^tER6]ER7&    ! ER8 ER9]F4      t ! ER: ER;]ER<ER=7      t ! ER> ER?]4      t ! ER@ ERA]4      t ! ERB ERC]4      t ! ERD ERE]A4      t ! ERF ERG]
4      t ! ERH ERI]
4      t]! ]4      w  tttt ! ERJ ERK]EP                  ! ERKERLERM.4      4      t ! ERN ERO4      t ! ERP ERQ]2EP                  4      t ! ERR ERS].EP                  ],          ]+EP                  4      t ! ERT ERU].EP                  ],          ]+EP                  4      t ! ERV ERW]4      t ! ERX ERY]4      t ! ERZ ER[]4      t ! ER\ ER]]4      t ! ER^ ER_]4      t ! ER` ERa]D4      t ! ERb ERc]D4      t ! ERd ERe4      tR# u up i (f  a]  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`.

)annotationsN)IntEnum)perf_counter)Any)Callable)cast)ClassVar)Dict)	FrozenSet)Iterable)Iterator)List)Mapping)MutableMapping)
NamedTuple)NoReturn)Optional)Pattern)Sequence)Set)Tuple)Type)TYPE_CHECKING)Union)base)	coercions)crud)elements)	functions)	operators)roles)schema)
selectable)sqltypes)util)is_column_element)is_dml)	_de_clone)_from_objects)
_NONE_NAME) _SentinelDefaultCharacterization)NO_ARG)quoted_name)	TupleType)prefix_anon_map)exc)FastIntFlag)Literal)Protocol)Self)	TypedDict)_AnnotationDict)_AmbiguousTableNameMap)CompileState)
Executable)CacheKey)ExecutableDDLElement)Insert)Update)
UpdateBase)UpdateDMLState)
ValuesBase)_truncated_label)BinaryExpression)BindParameter)ClauseElement)ColumnClause)ColumnElement)False_)Label)Null)True_)Function)CheckConstraint)Column)
Constraint)ForeignKeyConstraint)IdentityOptions)Index)PrimaryKeyConstraint)Table)UniqueConstraint)_ColumnsClauseElement)AliasedReturnsRows)CompoundSelectState)CTE)
FromClause)NamedFromClause)ReturnsRows)Select)SelectState)_BindProcessorType)TypeDecorator)
TypeEngine)UserDefinedType)	Visitable)CursorResultMetaData)_CoreSingleExecuteParams)_DBAPIAnyExecuteParams)_DBAPIMultiExecuteParams)_DBAPISingleExecuteParams)_ExecuteOptions)_GenericSetInputSizesType)_MutableCoreSingleExecuteParams)Dialect)SchemaTranslateMapTyperX   allanalyseanalyzeandanyarrayasasc
asymmetricauthorizationbetweenbinarybothcaser   checkcollatecolumn
constraintcreatecrosscurrent_datecurrent_rolecurrent_timecurrent_timestampcurrent_userdefault
deferrabledescdistinctdoelseendexceptfalseforforeignfreezefromfullgrantgrouphavingilikein	initiallyinner	intersectintoisisnulljoinleadingleftlikelimit	localtimelocaltimestampnaturalnewnotnotnullnulloffoffsetoldononlyororderouteroverlapsplacingprimary
referencesrightselectsession_usersetsimilarsome	symmetrictablethentotrailingtrueunionuniqueuserusingverbosewhenwherez^[A-Z0-9_$]+$z^[A-Z0-9_ $]+$$z5^(?:RESTRICT|CASCADE|SET NULL|NO ACTION|SET DEFAULT)$z^(?:DEFERRED|IMMEDIATE)$z%(?<![:\w\$\x5c]):([\w\$]+)(?![:\w\$])z\x5c(:[\w\$]*)(?![:\w\$])z%%(%(name)s)spyformatqmark?formatz%%snumericz:[_POSITION]numeric_dollarz$[_POSITION]namedz	:%(name)s AND z OR z + z * z -  % -z < z <= z != z > z >= z = z IS DISTINCT FROM z IS NOT DISTINCT FROM z || z MATCH z NOT MATCH z IN z NOT IN ,  FROM  AS  IS z IS NOT z	 COLLATE zEXISTS 	DISTINCT zNOT zANY zALL z DESCz ASCz NULLS FIRSTz NULLS LASTz ^ z | z & ~z << z >> coalesceCURRENT_DATECURRENT_TIMECURRENT_TIMESTAMPCURRENT_USER	LOCALTIMELOCALTIMESTAMPrandomsysdateSESSION_USERUSERCUBEROLLUPzGROUPING SETSzDict[Type[Function[Any]], str]	FUNCTIONSmonthdayyearsecondhourdoyminutequarterdowweekepochmillisecondsmicrosecondstimezone_hourtimezone_minuteUNIONz	UNION ALLEXCEPTz
EXCEPT ALL	INTERSECTzINTERSECT ALLc                  J    ] tR tRt$ RtR]R&    R]R&    R]R&    R]R	&   R
tR# )ResultColumnsEntryim  zTracks a column expression that is expected to be represented
in the result rows for this statement.

This normally refers to the columns clause of a SELECT statement
but may also refer to a RETURNING clause, as well as for dialect-specific
emulations.

strkeynamenameTuple[Any, ...]objectsTypeEngine[Any]type N__name__
__module____qualname____firstlineno____doc____annotations____static_attributes__r      ڀC:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO CLAUDE\MAESTRO\maestro-backend\venv\Lib\site-packages\sqlalchemy\sql\compiler.pyr   r   m  s1     L;
I% r  r   c                  "    ] tR tRtR R ltRtR# )_ResultMapAppenderi  c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
   r   r   r   r   zSequence[Any]type_r  returnNoner  )r   s   "r  __annotate___ResultMapAppender.__annotate__  s<        	
  
r  c                	    R # Nr  selfr   r   r   r  s   &&&&&r  __call___ResultMapAppender.__call__  s     r  r  Nr  r  r  r  r  r  r  r  r  r  r    s     r  r  z
Literal[0]RM_RENDERED_NAMEz
Literal[1]RM_NAMEz
Literal[2]
RM_OBJECTSz
Literal[3]RM_TYPEc                  6    ] tR tRt$ R]R&   R]R&   R]R&   RtR# )	_BaseCompilerStackEntryi  zSet[FromClause]asfrom_fromscorrelate_fromsrZ   r"   r  Nr  r  r  r  r
  r  r  r  r  r#  r#    s    !!$$r  r#  c                  J    ] tR tRt$ R]R&   R]R&   R]R&   R]R&   R	]R
&   RtR# )_CompilerStackEntryi  r7   compile_stateboolneed_result_map_for_nestedneed_result_map_for_compoundrZ   select_0Select[Any]insert_from_selectr  Nr&  r  r  r  r(  r(    s      $$"&&##r  r(  F)totalc                      ] tR tRt$ RtR]R&    R]R&    R]R&    R	]R
&    R]R&    ]R R l4       t]R R l4       tRt	R# )ExpandedStatei  a  represents state to use when producing "expanded" and
"post compile" bound parameters for a statement.

"expanded" parameters are parameters that are generated at
statement execution time to suit a number of parameters passed, the most
prominent example being the individual elements inside of an IN expression.

"post compile" parameters are parameters where the SQL literal value
will be rendered into the SQL statement at execution time, rather than
being passed as separate parameters to the driver.

To create an :class:`.ExpandedState` instance, use the
:meth:`.SQLCompiler.construct_expanded_state` method on any
:class:`.SQLCompiler` instance.

r   	statementrc   
parameters%Mapping[str, _BindProcessorType[Any]]
processorsOptional[Sequence[str]]positiontupzMapping[str, List[str]]parameter_expansionc                   V ^8  d   QhRR/# )r  r  r   r  )r   s   "r  r  ExpandedState.__annotate__  s     	G 	G 	Gr  c                   a  S P                   f   \        P                  ! R4      h\        ;QJ d!    . V 3R lS P                    4       F  NK  	  5# ! V 3R lS P                    4       4      # )zbTuple of positional parameters, for statements that were compiled
using a positional paramstyle.

z.statement does not use a positional paramstylec              3  J   <"   T F  pSP                   V,          x  K  	  R # 5ir  r4  ).0keyr  s   & r  	<genexpr>6ExpandedState.positional_parameters.<locals>.<genexpr>  s     F5EcT__S))5E    #)r8  r/   InvalidRequestErrortupler  s   fr  positional_parameters#ExpandedState.positional_parameters  sW     #))@  uFT5E5EFuFuFT5E5EFFFr  c                   V ^8  d   QhRR/# )r  r  rc   r  )r   s   "r  r  r;    s      '? r  c                    V P                   # )z.synonym for :attr:`.ExpandedState.parameters`.r>  rF  s   &r  additional_parameters#ExpandedState.additional_parameters  s     r  r  N)
r  r  r  r  r	  r
  propertyrG  rK  r  r  r  r  r2  r2    si    " N=(( 65+(( 10 	G 	G  r  r2  c                      ] tR tRt$ RtR]R&    R]R&    R]R&    R	]R
&    RtR]R&    RtR]R&    RtR]R&    ^ t	R	]R&    Rt
R]R&    RtR]R&    RtR]R&   RtR# )_InsertManyValuesi  a  represents state to use for executing an "insertmanyvalues" statement.

The primary consumers of this object are the
:meth:`.SQLCompiler._deliver_insertmanyvalues_batches` and
:meth:`.DefaultDialect._deliver_insertmanyvalues_batches` methods.

.. versionadded:: 2.0

r*  is_default_exprr   single_values_exprzList[crud._CrudParamElementStr]insert_crud_paramsintnum_positional_params_countedFsort_by_parameter_orderincludes_upsert_behaviorsNOptional[Sequence[Column[Any]]]sentinel_columnsnum_sentinel_columnsr7  sentinel_param_keysimplicit_sentinelembed_values_counterr  )r  r  r  r  r	  r
  rU  rV  rX  rY  rZ  r[  r\  r  r  r  r  rO  rO    s     
  87M#&&
 %*T) ',t+ 9=5< !"#! 4807  $t#	 "'$&	r  rO  c                      ] tR tRt$ RtR]R&   R]R&   R]R&   R	]R
&   R]R&   R]R&   R]R&   R]R&   R]R&   R]R&   RtR# )_InsertManyValuesBatchi`  aW  represents an individual batch SQL statement for insertmanyvalues.

This is passed through the
:meth:`.SQLCompiler._deliver_insertmanyvalues_batches` and
:meth:`.DefaultDialect._deliver_insertmanyvalues_batches` methods out
to the :class:`.Connection` within the
:meth:`.Connection._exec_insertmany_context` method.

.. versionadded:: 2.0.10

r   replaced_statementrd   replaced_parameters#Optional[_GenericSetInputSizesType]processed_setinputsizesz#Sequence[_DBAPISingleExecuteParams]batchzSequence[Tuple[Any, ...]]sentinel_valuesrS  current_batch_sizebatchnumtotal_batchesr*  rows_sortedis_downgradedr  Nr  r  r  r  r^  r^  `  sD    
 //@@....Mr  r^  c                  d    ] tR tRtRt^t^t^t^t]],          ],          t	]]	,          t
^t^@tRtR# )InsertmanyvaluesSentinelOptsiy  z[bitflag enum indicating styles of PK defaults
which can work as implicit sentinel columns

r  N)r  r  r  r  r	  NOT_SUPPORTEDAUTOINCREMENTIDENTITYSEQUENCEANY_AUTOINCREMENT_SUPPORTED_OR_NOTUSE_INSERT_FROM_SELECTRENDER_SELECT_COL_CASTSr  r  r  r  rk  rk  y  sE    
 MMHH%08;%(99 r  rk  c                  &    ] tR tRt^ t ^t ^tRtR# )CompilerStatei  r  N)r  r  r  r  	COMPILINGSTRING_APPLIEDNO_STATEMENTr  r  r  r  ru  ru    s     I=N Lr  ru  c                  >    ] tR tRtRt^ t ^t ^t ]],          tRt	R# )Lintingi  zrepresent preferences for the 'SQL linting' feature.

this feature currently includes support for flagging cartesian products
in SQL statements.

r  N)
r  r  r  r  r	  
NO_LINTINGCOLLECT_CARTESIAN_PRODUCTSWARN_LINTINGFROM_LINTINGr  r  r  r  rz  rz    s5     J!" L2-<Lr  rz  c                  .    ] tR tRtRtRR ltRR ltRtR# )	
FromLinteri  zGrepresents current state for the "cartesian product" detection
feature.Nc                	  a	 V P                   pV'       g   R# \        V P                  4      p\        V4      pVe   TpVP                  V4       MVP	                  4       p\
        P                  ! V.4      pV'       dr   V'       dj   VP                  4       o	VP                  S	4       V Uu0 uF  pS	V9   g   K  VkK  	  ppVP                  V	3R lV 4       4       VP                  V4       Ky  V'       d   WE3# R# u upi )Nc              3  \   <"   T F!  qVP                  S4      '       * ,          x  K#  	  R # 5ir  )index)r?  edgenodes   & r  rA  "FromLinter.lint.<locals>.<genexpr>  s#     NIDdjj&6"677I   ),NN)fromsr   edgesremovepopcollectionsdequepopleftdiscard
extendleftdifference_update)
r  startr  r  the_rest
start_withstackr  	to_remover  s
   &&       @r  lintFromLinter.lint  s    

DJJu:JOOJ'!J!!:,/==?DT" +0@%$44<%I@ NINN##I. '' As   ,	C=:C=c                	  a  S P                  4       w  r#V'       dg   TpV'       d[   R pRP                  V 3R lV 4       4      pVP                  VVS P                  V,          R7      p\        P
                  ! V4       R# R# R# )z{stmt_type} statement has a cartesian product between FROM element(s) {froms} and FROM element "{start}".  Apply join condition(s) between each element to resolve.r   c              3  R   <"   T F  pR SP                   V,           R 2x  K  	  R# 5i)"N)r  )r?  from_r  s   & r  rA  "FromLinter.warn.<locals>.<genexpr>  s'      &:?a

5)*!,%s   $')	stmt_typer  r  N)r  r   r   r  r$   warn)r  r  r  r  r  template	froms_strmessages   f&      r  r  FromLinter.warn  s    #yy{ E7  !II &:?& 	 #//'#**Z0 *  		'"!  r  r  r  )SELECT)r  r  r  r  r	  r  r  r  r  r  r  r  r    s    #J# #r  r  r  r  c                    a  ] tR tRt$ RtRtR]R&    RtR]R&    R	]R
&    RtRt	Rt
R]R&   RtR]R&   RtR]R&   ]P                  tR]R&    R]R&   ]P                  tR]R&   RtR]R&    RtR]R&    RtR]R&    R]R&    RR]P(                  ! 4       3R R  lltR! V 3R" llt]R# 4       tR$ tR% t]R& R' l4       tR( R) ltR* R+ ltR0R, R- llt]R. 4       t R/t!V ;t"# )1Compiledi  a  Represent 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.
NOptional[ClauseElement]r3   r   stringru  stateFzOptional[CursorResultMetaData]_cached_metadataz"Optional[List[ResultColumnsEntry]]_result_columns Optional[SchemaTranslateMapType]schema_translate_maprg   execution_optionsIdentifierPreparerpreparerr5   _annotationszOptional[CompileState]r)  dml_compile_stateOptional[CacheKey]	cache_keyfloat	_gen_timec          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r  dialectrj   r3  r  r  r  render_schema_translater*  compile_kwargsMapping[str, Any]r  )r   s   "r  r  Compiled.__annotate__M  s<     7( 7(7( +7( ?	7(
 "&7( *7(r  c                   Wn         V P                   P                  V n        V'       d'   W0n        V P                  P	                  V4      V n        Ve   \
        P                  V n        W n        VP                  V n
        VP                  V n        V P                  '       d6   \        '       d   \        V\        4      '       g   Q hVP                  V n        V P"                  ! V P                  3/ VB V n        V'       d2   Vf   Q hV P                  P'                  V P$                  V4      V n        \
        P(                  V n        M\
        P*                  V n        \-        4       V n        R# )a  Construct 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

 .. seealso::

    :ref:`schema_translating`

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


N)r  identifier_preparerr  r  _with_schema_translateru  rv  r  r3  supports_executioncan_executer  r   
isinstancer8   _execution_optionsr  processr  _render_schema_translatesrw  rx  r   r  r  r  r3  r  r  r  s   &&&&&&r  __init__Compiled.__init__M  s   4 88(<% MM@@$DM  &00DJ&N(;;D ) 6 6D =%i<<<<)2)E)E&,,t~~HHDK&+777"mmEEKK!5 '55DJ&33DJ%r  c                   V ^8  d   QhRR/# )r  r  r  r  )r   s   "r  r  r    s     + +$ +r  c                	@   < V P                  4        \        SV `	  4       # r  )_init_compiler_clssuper__init_subclass__)cls	__class__s   &r  r  Compiled.__init_subclass__  s     w(**r  c                	    R # r  r  r  s   &r  r  Compiled._init_compiler_cls  s    r  c                	    V P                   '       d   VP                  WV4      # \        P                  ! V P                  4      hr  )r  _execute_compiledr/   ObjectNotExecutableErrorr3  )r  
connectiondistilled_paramsr  s   &&&&r  _execute_on_connectionCompiled._execute_on_connection  s@     //(9  ..t~~>>r  c                	D    \         P                  ! V \        V4      4      Vhr  r/   UnsupportedCompilationErrorr  r  elementerrkws   &&&,r  visit_unsupported_compilation&Compiled.visit_unsupported_compilation  s    --dDMBKr  c                   V ^8  d   QhRR/# r  r  SQLCompilerr  )r   s   "r  r  r    s     $ $k $r  c                    \        4       h)zReturn a Compiled that is capable of processing SQL expressions.

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

NotImplementedErrorrF  s   &r  sql_compilerCompiled.sql_compiler  s     "##r  c               $    V ^8  d   QhRRRRRR/# )r  objra   kwargsr   r  r   r  )r   s   "r  r  r    s!     6 69 6 6 6r  c                	(    VP                   ! V 3/ VB # r  _compiler_dispatch)r  r  r  s   &&,r  r  Compiled.process  s    %%d5f55r  c                   V ^8  d   QhRR/# r  r  r   r  )r   s   "r  r  r    s       r  c                Z    V P                   \        P                  J d   V P                  # R# )z3Return the string text of the generated SQL or DDL.r  )r  ru  rw  r  rF  s   &r  __str__Compiled.__str__  s#     ::555;;r  c               (    V ^8  d   QhRRRRRRRR/# 	r  params"Optional[_CoreSingleExecuteParams]extracted_parameters&Optional[Sequence[BindParameter[Any]]]escape_namesr*  r  z)Optional[_MutableCoreSingleExecuteParams]r  )r   s   "r  r  r    s3     $ $2$ E$ 	$
 
3$r  c                    \        4       h)zReturn 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.
r  r  r  r  r   s   &&&&r  construct_paramsCompiled.construct_params  s     "##r  c                "    V P                  4       # )z0Return the bind params for this compiled object.r  rF  s   &r  r  Compiled.params  s     $$&&r  )
r  r  r  r  r  r  r  r  r3  r  NNT)#r  r  r  r  r	  r3  r
  r  is_sqlis_ddlr  r  r  r$   
EMPTY_DICTr  r  r)  r  r  immutabledictr  r  classmethodr  r  r  rM  r  r  r  r  r  r  __classcell__r  s   @r  r  r    sC   
 *.I&-FC4-FF7;4;:>O7>=A:A)-8
 ! $(OOL/3,0M)0 15-4	 %)I!(	  BF(-,0,>,>,@7(r+ +  ?L $ $6$ ' 'r  r  c                  B    ] tR tRtRtRtR R ltR R ltR R	 ltR
t	R# )TypeCompileri  z2Produces DDL specification for TypeEngine objects.z	visit_\w+c                   V ^8  d   QhRR/# )r  r  rj   r  )r   s   "r  r  TypeCompiler.__annotate__  s       r  c                	    Wn         R # r  r  )r  r  s   &&r  r  TypeCompiler.__init__  s    r  c               $    V ^8  d   QhRRRRRR/# )r  r  r  r  r   r  r   r  )r   s   "r  r  r    s!     4 4_ 4C 4C 4r  c                	    VP                   '       dM   V P                  P                  VP                   9   d(   VP                   V P                  P                  ,          pVP                  ! V 3/ VB # r  )_variant_mappingr  r   r  r  r  r  s   &&,r  r  TypeCompiler.process  sV    """!!U%;%;;**4<<+<+<=E''333r  c               (    V ^8  d   QhRRRRRRRR/# )r  r  r   r  	Exceptionr  r  r   r  )r   s   "r  r  r    s2     F FF!*F25F	Fr  c                	0    \         P                  ! W4      Vhr  )r/   r  r  s   &&&,r  r  *TypeCompiler.visit_unsupported_compilation  s     --d<#Er  r  N)
r  r  r  r  r	  ensure_kwargr  r  r  r  r  r  r  r  r    s     <L4F Fr  r  c                  R    ] tR tRtRtRtR
tRR lt]R 4       t	]R 4       t
R tRtR	# )_CompileLabeli  z;lightweight label object which acts as an expression.Label.labelc                	<    Wn         W n        V3V,           V n        R # r  r  r   
_alt_names)r  colr   	alt_namess   &&&&r  r  _CompileLabel.__init__  s    	&9,r  c                	.    V P                   P                  # r  r  	proxy_setrF  s   &r  r,  _CompileLabel.proxy_set      ||%%%r  c                	.    V P                   P                  # r  r  r  rF  s   &r  r  _CompileLabel.type      ||   r  c                	    V # r  r  r  r  s   &,r  
self_group_CompileLabel.self_group      r  )r&  r  r   Nr%  )r  )r  r  r  r  r	  __visit_name__	__slots__r  rM  r,  r  r5  r  r  r  r  r"  r"    sD     FN/I-
 & & ! !r  r"  c                  T    ] tR tRtRtRtRtR t]R 4       t	]R 4       t
R tR tR	tR
# )ilike_case_insensitivei  zproduce a wrapping element for a case-insensitive portion of
an ILIKE construct.

The construct usually renders the ``lower()`` function, but on
PostgreSQL will pass silently with the assumption that "ILIKE"
is being used.

.. versionadded:: 2.0

ilike_case_insensitive_operandc                	4    Wn         VP                  V n        R # r  r  
comparator)r  r  s   &&r  r  ilike_case_insensitive.__init__  s    !,,r  c                	.    V P                   P                  # r  r+  rF  s   &r  r,   ilike_case_insensitive.proxy_set  r.  r  c                	.    V P                   P                  # r  r0  rF  s   &r  r  ilike_case_insensitive.type  r2  r  c                	    V # r  r  r4  s   &,r  r5  !ilike_case_insensitive.self_group  r7  r  c                	J    \        V P                  P                  V4      4      # r  )r;  r  _with_binary_element_type)r  r  s   &&r  rH  0ilike_case_insensitive._with_binary_element_type  s!    %LL2259
 	
r  )r?  r  Nr>  )r  r  r  r  r	  r8  r9  r  rM  r,  r  r5  rH  r  r  r  r  r;  r;    sJ    	 6N'I- & & ! !
r  r;  c                     ] tR tRt$ Rt]t]P                  ! RRRRRRR	R
RRRRRRRR/4      t	R]
R&    R]
R&   R]
R&   Rt]tRtR]
R&   RtR]
R&   RtR]
R&    R]
R&    ER0tR]
R&    ER0tR]
R&    R tR!]
R"&    RtR]
R#&   R$]
R%&    R&]
R'&    R(]
R)&    RtR]
R*&    RtR]
R+&    RtR]
R,&    R-]
R.&    R-]
R/&    R-]
R0&    R1]
R2&    RtR]
R3&    RtR]
R4&    RtR]
R5&    RtR]
R6&    RtR]
R7&    RtR]
R8&    R tR9]
R:&    R tR;]
R<&    R t R=]
R>&   R t!R?]
R@&   R t"RA]
RB&   ]#! 4       t$RC]
RD&    ]#! 4       t%RC]
RE&    ]PL                  t'RF]
RG&    Rt( Rt) R t*RH]
RI&    R t+R=]
RJ&    R t,R=]
RK&   R t-R=]
RL&   Rt.R]
RM&   RN]
RO&   RP]
RQ&   RR]
RS&   R]
RT&   ]/P`                  ! RU4      t1]/P`                  ! RV4      t2]/P`                  ! ]2Pf                   RW]1Pf                   24      t4]5RX 4       t6]5RY 4       t7R R R]8R 3RZ R[ llt9]:R\ R] l4       t;]Px                  R^ R_ l4       t=]:R` 4       t>]:Ra 4       t?]:Rb 4       t@]P                  Rc Rd l4       tB]P                  Re Rf l4       tD]EP                  Rg 4       tGRh tHRi tI]P                  Rj Rk l4       tJRl tK]:Rm Rn l4       tLER1Ro Rp lltMER2Rq Rr lltN]P                  Rs 4       tO]:Rt 4       tPER3Ru Rv lltQ]P                  ! Rw4      Rx 4       tSRy]
Rz&   ]P                  R{ R| l4       tT]P                  ]P                  ! R}4      R~ 4       4       tU]P                  ]P                  ! R}4      R 4       4       tVR R ltWR tXER3R ltYR tZER3R lt[ER3R lt\ER4R lt]R t^R t_ER5R R llt`R taR tbR tcR tdR teR tfER6R ltgER7R lthR R ltiR R ltjR R ltkR tlR tmR tnR toR tpR tqR trR tsR ttR tuR tvR twR txR tyER6R R lltzR t{R t|R R lt}ER8R lt~R tR tER9R ltR tR tR tR tR tR tR tR tER6R ltR tER:R ltR tR tR tR tR tER3R R lltR tR t]P                  R 4       tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR R ltR R ltR R ltER;R ltR t]R 3R ltR R ltR tR R ltR R ltER<R R lltR tRRR R R ]EPn                  ! R4      3R R lltR tR tER=R ltR tR tER3R ltR tER>R ltR tR tR R ltER6R ltER?R ltR tR tR ER  ltER tER tER]
ER&   ]EP                  '       g%   ]P                  ! ER]#! 4       3ER]#! 4       3.4      tER3ER ltR tER]
ER	&    ER@ER
 ltER ER ltER tER tER tER7ER ltER tER ER ltER tER tER tER ER ltER tERAER ltERBER ltER8ER ltER t]P                  ! ]EP                  ]EP                  ]EP                  ]EP                  ]EP                  ]EP                  ]EP                  ]EP                  ]EP                  ]EP                  /4      t]EP                  ]EP                  ]EP                  /4      tER ER ltER  ER! ltERCER" ltER# tER$ tER% tER& tER6ER' ER( lltER) tER* tER6ER+ ltER, tER- tER. tER/tR # (D  r  i  zvDefault implementation of :class:`.Compiled`.

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

%P(A)Z:C._[] zClassVar[Mapping[str, str]]bindname_escape_characterszClassVar[Pattern[str]]_bind_translate_re_bind_translate_charsTFr*  isdeleteisinsertisupdatezOptional[List[Column[Any]]]	postfetchzSequence[Column[Any]]insert_prefetchupdate_prefetchN&Optional[Sequence[ColumnElement[Any]]]implicit_returningisplaintextzDict[str, BindParameter[Any]]bindszDict[BindParameter[Any], str]
bind_nameszList[_CompilerStackEntry]r  returning_precedes_values'render_table_with_column_in_update_fromansi_bind_rulesr   bindtemplatecompilation_bindtemplate_numeric_binds_identifier_charzList[ResultColumnsEntry]r  _textual_ordered_columns_ad_hoc_textual_ordered_columns_loose_column_name_matching_numeric_binds_render_postcompilezOptional[ExpandedState]_post_compile_expanded_stateOptional[str]_pre_expanded_stringOptional[List[str]]_pre_expanded_positiontupzOptional[_InsertManyValues]_insertmanyvaluesz!Optional[crud._CrudParamSequence]_insert_crud_paramszFrozenSet[BindParameter[Any]]literal_execute_paramspost_compile_paramszutil.immutabledict[str, str]escaped_bind_nameszbOptional[Tuple[Dict[BindParameter[Any], List[BindParameter[Any]]], Dict[str, BindParameter[Any]]]]_cache_key_bind_matchr8  _values_bindparam_visited_bindparaminlinez"Optional[MutableMapping[CTE, str]]cteszDict[Tuple[int, str], CTE]ctes_by_level_namez/Dict[CTE, Tuple[int, str, selectable._CTEOpts]]level_name_by_ctectes_recursivez"__\[POSTCOMPILE_(\S+?)(~~.+?~~)?\]z%\(([^)]+?)\)s|c                	&    V P                  4        R # r  )_init_bind_translater  s   &r  r  SQLCompiler._init_compiler_clsE  s      "r  c                	    \         P                  ! R P                  V P                  4      4      p\         P                  ! RV R24      V n        V P                  V n        R# )r  rU  rV  N)reescaper   rX  compilerY  rZ  )r  regs   & r  r   SQLCompiler._init_bind_translateI  sF    ii > >?@!#auAJ!7$'$B$B!r  c               8    V ^8  d   QhRRRRRRRRR	R
RRRRRR/# )r  r  rj   r3  r  r  r  column_keysr7  for_executemanyr*  lintingrz  _supporting_againstzOptional[SQLCompiler]r  r   r  )r   s   "r  r  SQLCompiler.__annotate__O  sd     P PP +P &	P
 -P P P 3P Pr  c                z   W@n         W0n        V'       dD   V^,           U	u/ uF  qP                  V	bK  	  p
p	V^,           U	u/ uF  qV	.bK  	  pp	W3V n        WPn        W`n        / V n        \        P                  ! 4       V n	        . V n
        . V n        VP                  V n        V P                  '       dQ   VP                  P                  R4      ;V n        pV'       d   VP                  R8X  d   RMRV n        \"        V n        M\&        VP                  ,          V n        RV n        VP*                  ;'       g    VP,                  V n        \/        4       V n        / V n        / V n        \6        P8                  ! WV3/ VB  V P:                  '       g%   V P<                  '       g   V P>                  '       d   \@        '       d   \C        V\D        4      '       g   Q hV P:                  '       g   V P<                  '       d   \@        '       d   \C        V\F        4      '       g   Q hVPH                  '       d	   RV n%        MYV P                  '       dH   V P:                  '       d/   V PL                  PN                  '       d   VPP                  '       d   RV n%        \&        VP                  ,          V n)        V'       dQ   V PT                  PW                  VPT                  PY                  4        UUu/ uF  w  rVR
9  g   K  WbK  	  upp4       V PZ                  \\        P^                  J d   V P                  '       d4   V P                  '       d   V Pa                  4        MV Pc                  4        V Pd                  '       d)   V Pg                  RRR7      pV Pi                  VRR	7       R# R# R# u up	i u up	i u uppi )a  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.

r   r   r   rQ  NTFr   _no_postcompile)_populate_self>   r  r  r  
positionalri  rp  rj  )5r  r  r@  r|  r  r  rd  r$   column_dictre  r  r  r  
paramstyle
startswithrp  rk  _pyformat_templaterj  BIND_TEMPLATESr  label_lengthmax_identifier_lengthr.   anon_maptruncated_names_truncated_countersr  r  r\  r]  r[  r   r  r=   r?   _inliner  r  insert_executemany_returning_return_defaultsri  __dict__updateitemsr  ru  rw  _process_numeric_process_positionalrq  r  #_process_parameters_for_postcompile)r  r  r3  r  r  r  r  r  r  bcksmckbmnbkvr4  s   &&&&&&&&,       r  r  SQLCompiler.__init__O  s   @ '"&/l3lEE1HlD3$-aL1LqsFLD1*.D&
  / 
 **, 
! ",,???'.'9'9'D'DY'OOD""--1AACs 3 -?D),:7;M;M,ND)	   AAG$A$A 	 () <>35 $=f====DMMMT]]]}!)Z8888}}} =%i<<<<$$$"&DK)))AAA%666 #'DK*7+=+=>MM   !4 < < B B D D	 AD D" ::555&&&))+,,.'''!22!&$( 3 

 88t 9  ( 6y 41Vs   N-N2.N7
>N7
c                   V ^8  d   QhRR/# )r  r  rs  r  )r   s   "r  r  r    s     = == =r  c                N    V P                   f   R# V P                   P                  # )a  When an INSERT is compiled with a single set of parameters inside
a VALUES expression, the string is assigned here, where it can be
used for insert batching schemes to rewrite the VALUES expression.

.. versionadded:: 1.3.8

.. versionchanged:: 2.0 This collection is no longer used by
   SQLAlchemy's built-in dialects, in favor of the currently
   internal ``_insertmanyvalues`` collection that is used only by
   :class:`.SQLCompiler`.

N)rw  rQ  rF  s   &r  insert_single_values_expr%SQLCompiler.insert_single_values_expr  s%     !!)))<<<r  c                   V ^8  d   QhRR/# )r  r  ra  r  )r   s   "r  r  r    s      %K r  c                   V P                   '       d   V P                   # V P                  eU   \        V P                  4      '       d:   V P                  P                   Uu. uF  p\	        V4      '       g   K  VNK  	  up# R# u upi )a  The effective "returning" columns for INSERT, UPDATE or DELETE.

This is either the so-called "implicit returning" columns which are
calculated by the compiler on the fly, or those present based on what's
present in ``self.statement._returning`` (expanded into individual
columns using the ``._all_selected_columns`` attribute) i.e. those set
explicitly using the :meth:`.UpdateBase.returning` method.

.. versionadded:: 2.0

N)rb  r3  r&   _all_selected_columnsr%   )r  cs   & r  effective_returningSQLCompiler.effective_returning  st     """***^^'F4>>,B,B ===A$Q' =  s    B8Bc                    V P                   # )zFbackwards compatibility; returns the
effective_returning collection.

)r  rF  s   &r  	returningSQLCompiler.returning  s     '''r  c                v     V P                   R,          R,          #   \         d   p\        R4      ThRp?ii ; i)a  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.


r"   z$Compiler does not have a stack entryN)r  
IndexError)r  ies   & r  current_executableSQLCompiler.current_executable  s;    <	M::b>,// 	MCD"L	Ms    838c                	`    \        V P                  4      \        V P                  4      ,           # r  )listr_  r`  rF  s   &r  prefetchSQLCompiler.prefetch8  s#    D(()D1E1E,FFFr  c                   V ^8  d   QhRR/# )r  r  zDict[Any, Any]r  )r   s   "r  r  r  =  s      N r  c                	    / # r  r  rF  s   &r  _global_attributesSQLCompiler._global_attributes<  s    	r  c                   V ^8  d   QhRR/# )r  r  zMutableMapping[CTE, str]r  )r   s   "r  r  r  A  s      !9 r  c                f    \         P                  ! 4       pWn        / V n        / V n        RV n        V# )zzInitialize collections related to CTEs only if
a CTE is located, to save on the overhead of
these collections otherwise.

F)r$   OrderedDictr  r  r  r  )r  r  s   & r  _init_cte_stateSQLCompiler._init_cte_state@  s8     *.)9)9);	 #% "$#r  c              #    "   V P                   V P                  r!. RuV n         V n         V P                  '       d   V P                  R,          pRVR&   MRpV P                   V P                  3x  V'       d   VP                  R4       VVuV n         V n        R#   X'       d   TP                  R4       TTuT n         T n        i ; i5i)z;special API to support the use case of 'nested result sets'FTr+  Nr  )r  rn  r  r  )r  result_columnsordered_columnsentrys   &   r  _nested_resultSQLCompiler._nested_resultX  s        !! ( 79%3d3	zzz

26:23&&(=(===		67 8D $"7 		67 8D $"7s   'CAB 1*C*CCc                	r  aa	 V P                   '       d   Q hV P                  \        P                  J g   Q hV P                  '       d   Q hV P
                  P                  R 8X  d   RoMV P
                  P                  R8X  g   Q hRo. o	R VV	3R llp\        P                  ! V P                  WP                  4      V n
        V P                  '       dy   V P                  P                  4        UUu/ uF  w  r#W2bK	  	  ppp\        V P                  4      \        V4      8X  g   Q hS	 Uu. uF  qTP                  WU4      NK  	  upV n         MS	V n         V P                  '       d   . o	\        P                  ! V P                  VV P                  P                   4      pV P                  P"                   Uu. uFD  pV^ ,          V^,          \        P                  ! V P                  W^,          4      V^,          3NKF  	  ppV P                  P%                  VVR7      V n        R# R# u uppi u upi u upi )r   %sr   r   c                    V ^8  d   QhRRRR/# )r  mzre.Match[str]r  r   r  )r   s   "r  r  5SQLCompiler._process_positional.<locals>.__annotate__}  s     	" 	"] 	"s 	"r  c                   < V P                  ^4      pV'       d   SP                  V4       S# SP                  V P                  ^4      4       V P                  ^ 4      #    )r   append)r  normal_bindplaceholder	positionss   & r  find_position6SQLCompiler._process_positional.<locals>.find_position}  sM    ''!*K  -""   ,wwqz!r  rQ  rR  N)r8  r  ru  rw  rp  r  r  r  sub_positional_patternr  r{  r  lengetrw  rQ  rR  _replace)
r  r  r  r  reverse_escaper   rQ  rR  r  r  s
   &       @@r  r  SQLCompiler._process_positionalp  s   #####zz]99999&&&&&<<""h.K<<**g555K		" 	" ff$$m[[
 """/3/F/F/L/L/NO/Ntqad/NNOt../3~3FFFF;D ;D4""4.9 D  )D!!!I!#((&&99" //BB" CA aDaDFF433]aDIaD	 C  " &*%;%;%D%D#5#5 &E &D"% " P "s   3H),H/7A
H4c                	  a a S P                   '       g   Q hS P                  \        P                  J g   Q h^p/ oS P                  '       da   S P
                  eS   \        P                  ! V 3R lS P                  P                  4        4       S P                  P                  4       4      pMS P                  P                  4       pV Ff  pVS9   d   K  S P                  V,          pVS P                  9   g   VS P                  9   d   RSV&   KH  S P                   V 2pV^,          pVSV&   Kh  	  VS n        \        S4      S n        S P"                  '       d\   \%        S4      pSP'                  4        UUu/ uF!  w  rxS P"                  P)                  Ww4      VbK#  	  uppo\%        S4      V8X  g   Q hS P*                  P-                  V3R lS P.                  4      S n        S P                  '       d   S P                  P0                  S,          p	S P                  P2                   U
u. uF  p
V
^ ,          V
^,          RV
^,          3NK   	  pp
S P                  P5                  V	VR7      S n        R# R# u uppi u up
i )r  Nc              3  N   <"   T F  pVSP                   9  g   K  Vx  K  	  R # 5ir  )r}  )r?  r   r  s   & r  rA  /SQLCompiler._process_numeric.<locals>.<genexpr>  s(       84#9#99 D 8s   %
%c                4   < SV P                  ^4      ,          # r  r   r  	param_poss   &r  <lambda>.SQLCompiler._process_numeric.<locals>.<lambda>  s    i
+r  r  r  )rp  r  ru  rw  rw  r}  	itertoolschainre  valuesrd  rz  ry  rk  next_numeric_posr  r8  r{  r  r  r  _pyformat_patternr  r  rQ  rR  r  )r  numr   	bind_namebindph
len_beforer   posrQ  r  rR  r  s   f           @r  r  SQLCompiler._process_numeric  sV   """""zz]99999$&	!!!d&<&<&H OO $ 6 6 8
 &&(E OO**,EII%::i(D0004666 (,	)$;;<SEBq')	)$   !$	?"""YJ "+!2!2ID ''++D7<!2I y>Z/// ,,00+T[[
 !!! &&99  //BB"BA 1qtT1Q4(B  "
 &*%;%;%D%D#5#5	 &E &D" "$"s   :'I9-$I?c                   V ^8  d   QhRR/# )r  r  zVMutableMapping[str, Union[_BindProcessorType[Any], Sequence[_BindProcessorType[Any]]]]r  )r   s   "r  r  r    s     
 


r  c                	p   a  V 3R  lS P                    4        UUu/ uF  w  rVf   K  WbK  	  upp# u uppi )c           	   3    <"   T F  pSP                   V,          VP                  P                  '       g&   VP                  P                  SP                  4      Mu\
        ;QJ d9    . V3R  l\        \        VP                  4      P                   4       F  NK  	  5M2! V3R  l\        \        VP                  4      P                   4       4      3x  K  	  R# 5i)c              3  Z   <"   T F   pVP                  SP                  4      x  K"  	  R # 5ir  )_cached_bind_processorr  )r?  	elem_typer  s   & r  rA  9SQLCompiler._bind_processors.<locals>.<genexpr>.<genexpr>  s.      #.$	 &<<T\\JJ.$s   (+N)	re  r  _is_tuple_typer  r  rE  r   r-   types)r?  	bindparamr  s   & r  rA  /SQLCompiler._bind_processors.<locals>.<genexpr>  s       "1I OOI.  )~~<<< "==dllK"U #-1 )9>>.#e.$#UU #-1 )9>>.#e.$#  "1s   2C/C&A4C)re  )r  r@  values   f  r  _bind_processorsSQLCompiler._bind_processors  sG     "&

  # CJ
 	
 
s   22c                	2    \        V P                  4      ^8  # r  )r  r  rF  s   &r  is_subquerySQLCompiler.is_subquery  s    4::""r  c                   V ^8  d   QhRR/# )r  r  r3   r  )r   s   "r  r  r    s      d r  c                	    V # r  r  rF  s   &r  r  SQLCompiler.sql_compiler  s    r  c               $    V ^8  d   QhRRRRRR/# )r  r  r  r   r*  r  r2  r  )r   s   "r  r  r    s(     
 
2
 
 
	
r  c                L    V P                  VVRR7      pV P                  V4      # )a*  Return a new :class:`.ExpandedState` for a given parameter set.

For queries that use "expanding" or other late-rendered parameters,
this method will provide for both the finalized SQL string as well
as the parameters that would be used for a particular parameter set.

.. versionadded:: 2.0.0rc1

Tr  )r  r  )r  r  r   r4  s   &&& r  construct_expanded_state$SQLCompiler.construct_expanded_state  s:     **%  + 


 77
 	
r  c               4    V ^8  d   QhRRRRRRRRR	RR
RRR/# )r  r  r  r  r  r   r*  _group_numberOptional[int]_checkr  r  ri   r  )r   s   "r  r  r  /  sZ     ~ ~2~ E~ 	~
 %~ ~ ~ 
)~r  c                
   V P                   '       dV   V'       gN   V P                  f   Q hV'       g    \        V P                  P                  4      # \        P
                  ! R4      hT;'       d    \        V P                  4      pV'       d~   V P                  f   \        P                  ! R4      hV P                  ^,          pV P                  p	V	f   Q hV	w  r\        W4       UUUu/ uF  w  rW,           F  pWbK  	  K  	  ppppMRpV'       EdU   / pV P                  P                  4        EF1  w  ppV'       d   V P                  P                  VV4      MTpVP                  V9   d   VVP                  ,          VV&   KV  VV9   d   VV,          VV&   Kk  V'       do   VP                   '       d]   V'       d,   \        P
                  ! RVP                  V3,          RR7      h\        P
                  ! RVP                  ,          RR7      hV'       d   VP                  VV4      pMTpVP"                  '       d   VP$                  VV&   EK"  VP&                  VV&   EK4  	  V# / pV P                  P                  4        F  w  ppV'       d   V P                  P                  VV4      MTpV'       do   VP                   '       d]   V'       d,   \        P
                  ! RVP                  V3,          RR7      h\        P
                  ! RVP                  ,          RR7      hV'       d   VP                  VV4      pMTpVP"                  '       d   VP$                  VV&   K  VP&                  VV&   K  	  V# u upppi )z5return a dictionary of bind parameter keys and valuesNzcan't construct new parameters when render_postcompile is used; the statement is hard-linked to the original parameters.  Use construct_expanded_state to generate a new statement and parameters.zcThis compiled object has no original cache key; can't pass extracted_parameters to construct_paramsz@A value is required for bind parameter %r, in parameter group %dcd3x)codez)A value is required for bind parameter %r)rq  rr  dictr4  r/   rD  r*  r{  r  CompileErrorr|  zipre  r  r  r@  requiredcallableeffective_valuer  )r  r  r  r   r  r  r  has_escaped_namesorig_extracted
ckbm_tupler  rT  r  	extractedr  resolved_extractedpdr  r   escaped_namevalue_params   &&&&&&&              r  r  SQLCompiler.construct_params/  sM    ###O44@@@D==HHII--4  )JJT$2I2I-J ~~%&&J 
 "&!233J))) GD %($M"$MLA GGD # $M  " "&6B#'??#8#8#:	4 ) ++//d;  ==F*'-imm'<B|$V^'-d|B|$	 2 2 2$!554(}}m<= "(	  "55G'mm,!'  *&8&<&<%y' '0 )))+6+F+F<(+6+<+<<(K $;L IB#'??#8#8#:	4 ) ++//d;  i000$!554(}}m<= "(	  "55G'mm,!'  &"4"8"8I"NK"+K%%%'2'B'BB|$'2'8'8B|$= $;@ Ig"s   +M>c                	  aaaa	 V P                   oSP                  o	SP                  oSP                  oVVVV	3R  lp/ pV P                  pV P
                   Fy  pWC9   d   K  VP                  P                  '       d?   \        \        VP                  4      P                   Uu. uF  pV! V4      NK  	  upW$&   Ke  V! VP                  4      W$&   K{  	  V# u upi )c                   < V P                  S4      P                  S4      pVe   Se   VS9  d   Se   VS9   d   V# R # r  )_unwrapped_dialect_implget_dbapi_type)typdbtypedbapir  exclude_typesinclude_typess   & r  lookup_type<SQLCompiler._get_set_input_sizes_lookup.<locals>.lookup_type  sH    009HHOF ""*fM.I"*f.Er  )r  include_set_input_sizesexclude_set_input_sizesr8  ry  re  r  r  r   r-   r  )
r  r;  
inputsizesry  r  r6  r8  r  r9  r:  s
   &     @@@@r  _get_set_input_sizes_lookup'SQLCompiler._get_set_input_sizes_lookup  s    ,,7777
	 
	 
!%!<!<I2~~,,,  $Iy~~>DD)D  $D)
%
 )4INN(C
% ) )s   %Cc                &    V P                  RR7      # )zReturn 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.

F)r  r  rF  s   &r  r  SQLCompiler.params  s     $$E$22r  c               $    V ^8  d   QhRRRRRR/# )r  r4  ri   r  r*  r  r2  r  )r   s   "r  r  r    s-     C C3C C 
	Cr  c                r  aaaaa / pV P                   pVf   V P                  pV P                  '       d    . pV P                  pVf   V P                  pMR;rVV P
                  p\        RV4      o\        RV4      o/ p/ o/ p	Rp
V P                  '       d   Ve   TpV P                  '       d   . p
MV P                  P                  4       pV P                  pV EF  oV'       d   VP                  SS4      MSpV P                  S,          pWP                  9   d/   VS9  d&   V P                  VVP                  V4      R7      SV&   Kq  WP                   9   Ed%   VS9   d   W,          pRpM1VP                  S4      pV P#                  WV4      pVw  ppWV&   VSV&   VP$                  '       g   VP'                  V4       VP(                  P*                  '       d.   Vf   Q hVP'                  VV3R l\-        V^4       4       4       MVP'                  VV3R lV 4       4       V
e   V
P/                  R V 4       4       MVe   VP/                  R V 4       4       V UUu. uF  w  ppVNK
  	  uppVS&   EK  EK  Vf   EK  VP1                  S4       EK  	  V3R	 lp\2        P4                  ! V P6                  VV4      pV
eq   Vf   Q h\-        WP8                  4       UUu/ uF  w  ppVV P:                   V 2bK  	  uppoV P<                  P5                  V3R
 lV4      pVP/                  V
4       \?        VVVVV4      pV'       d]   W@n         W`n        VP@                  V n        V P                  '       d    \C        VP                  ;'       g    R4      MRV n        VV n"        V# u uppi u uppi )af  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.

Nr5  z/Mapping[str, Sequence[_BindProcessorType[Any]]]render_literal_valuec              3     <"   T Fd  w  r\        V^4       FO  w  r4SS9   g   K  SS,          V^,
          ,          f   K)  S: RV: RV: 2SS,          V^,
          ,          3x  KQ  	  Kf  	  R# 5i)r  NrT  )	enumerate)r?  ituple_elementjrT  r   tuple_processorss   &    r  rA  BSQLCompiler._process_parameters_for_postcompile.<locals>.<genexpr>P  s{      	.
 5I 0(1-(C#'77 !1 6q1u =.2Aq 9 0 6q1u =
 )D 5Is   A/A/0A/c              3  P   <"   T F  w  rSS9   g   K  VSS,          3x  K  	  R # 5ir  r  )r?  r@  rT  r   single_processorss   &  r  rA  rN  [  s0      .*3#'88 ;S"3D"9:*3s   &&c              3  *   "   T F	  w  rVx  K  	  R # 5ir  r  r?  r   rT  s   &  r  rA  rN  a  s      309WTD	   c              3  *   "   T F	  w  rVx  K  	  R # 5ir  r  rR  s   &  r  rA  rN  h  s     .M9t9rS  c                *  <aa V P                  ^4      pSV,          pV P                  ^4      '       d_   V P                  ^4      P                  R4      pV^,          V^,          uooRP                  VV3R lVP                  R4       4       4      pV# )r  ~~r   c              3  :   <"   T F  pS: V: S: 2x  K  	  R # 5ir  r  )r?  expbe_leftbe_rights   & r  rA  ]SQLCompiler._process_parameters_for_postcompile.<locals>.process_expanding.<locals>.<genexpr>x  s      !/ !(h7/s   )r   splitr   )r  r@  exprtokrY  rZ  replacement_expressionss   &   @@r  process_expandingJSQLCompiler._process_parameters_for_postcompile.<locals>.process_expandingo  s    ''!*C*3/D wwqzzggaj&&t,$'FCF!yy !#zz$/!  Kr  c                4   < SV P                  ^4      ,          # r  r  r  s   &r  r  ASQLCompiler._process_parameters_for_postcompile.<locals>.<lambda>  s    )AGGAJ/r  r  )#rt  r  r  rv  r8  r  r   rp  re  r  r{  r  rd  ry  render_literal_bindparamr  rz  $_literal_execute_expanding_parameterliteral_executer  r  r  rI  extendr  r  r  _post_compile_patternr  rk  r  r2  r3  r  rr  )r  r4  r  expanded_parameterspre_expanded_stringnew_positiontuppre_expanded_positiontupr6  new_processorsto_update_setsnumeric_positiontupnamesebnr/  	parameter	to_updater  leep_resreplacement_expr
expand_keyrT  r`  r3  r  r@  expanded_stater   r  r_  rP  rM  s   &&&                       @@@@@r  r  /SQLCompiler._process_parameters_for_postcompile  s   $ ! #77&"&++??? O'+'E'E$'/+/+;+;( :>=O**
 3Z
  =z
 >@24)+ 48???7C#;E"""&(#OO**,E%%D253774.4L

4(I777'>>55%1;1M 6  ,L9 444#:: . <I!F (^^D1F#HH$ H 5=1Y 03<<0<L+L9 000%%i0 ~~444%111&-- 	.
 5>fa4H	. 	 '-- .*3. 
 +6+22 3093  )4 (...M9.MM8A18A}z1
	1'-; 1@ !,&&t,S V	 FF&&(9;N
	 *"... !*')>)>!!HC ;;<SEBB!I ..22/I ""#67&
  )<%-E*(22DK ??? ^//5526 
 1?D-{16s   $N-&N3zsqlalchemy.engine.cursorc                    \         P                  P                  pVP                  P	                  V P
                  4      # )z(utility method used for unit tests only.)r$   	preloadedengine_cursorrb   _create_description_match_mapr  )r  cursors   & r  _create_result_mapSQLCompiler._create_result_map  s5     --**HH  
 	
r  _BindNameForColProtocol_get_bind_name_for_colc                   V ^8  d   QhRR/# )r  r  zCallable[[Any], str]r  )r   s   "r  r  r    s      /C r  c                	    V P                   pV# r  )r  )r  getters   & r  _within_exec_param_key_getter)SQLCompiler._within_exec_param_key_getter  s    ,,r  zsqlalchemy.engine.resultc           	     	  aa	a
aaa \         P                  P                  pV P                  pV P                  f   Q hV P                  P
                  p\        '       d   \        V\        4      '       g   Q hVP                  pVP                   Uu. uF#  p\        P                  ! RV! V4      R 4      V3NK%  	  upoR o	VP                  oSeI   SP                  P                  V P                   R 4      oV! S4      o
S
V P"                  9   d	   V
3R lpVo	MR oTP%                  VP                   Uu. uF  qUP&                  NK  	  up4      oVV	VVV3R lpV# u upi u upi )Nr  c                8   < VP                  SV 4      pVe   V# V # r  r  )	lastrowidr4  param_valueautoinc_keys   && r  _autoinc_getterPSQLCompiler._inserted_primary_key_from_lastrowid_getter.<locals>._autoinc_getter  s)    ",..i"HK".
  +*  )(r  c                v   <a a Se	   S! S 4      o S f   S! V3R lS 4       4      # S! VVV V3R lS 4       4      # )zgiven 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.

c              3  8   <"   T F  w  rV! S4      x  K  	  R # 5ir  r  )r?  r  r'  r4  s   &  r  rA  WSQLCompiler._inserted_primary_key_from_lastrowid_getter.<locals>.get.<locals>.<genexpr>  s     LG[VfZ00G   c              3  b   <"   T F$  w  rVSJ d   Se
   S! SS4      M	SMV! S4      x  K&  	  R # 5ir  r  )r?  r  r'  autoinc_colautoinc_getterr  r4  s   &  r  rA  r    sI       (/ +-  .9 +9jA!* $J/0 (/s   ,/r  )r  r4  r  r  getterslastrowid_processorrow_fns   ffr  r  DSQLCompiler._inserted_primary_key_from_lastrowid_getter.<locals>.get  sH     #./	:	 LGLLL  (/  r  )r$   rz  engine_resultr  r)  r3  r   r  r;   r   primary_keyoperatormethodcaller_autoincrement_columnr  _cached_result_processorr  rd  result_tupler@  )r  resultparam_key_getterr3  r   r'  r  r  r  r  r  r  r  r  s   &       @@@@@@r  +_inserted_primary_key_from_lastrowid_getter7SQLCompiler._inserted_primary_key_from_lastrowid_getter  sQ    --==!!---&&00	=i0000 ((
( ""5*:3*?FL(

 11""-"2"2"K"Kd# +;7K djj(
) "1 #'$$9J9J%K9J#gg9J%KL	 	4 
G
N &Ls   )E2Ec                	  a
a \         P                  P                  pV P                  f   Q hV P                  P                  p\
        '       d   \        V\        4      '       g   Q hV P                  pVP                  pV P                  pVf   Q h\        V4       UUu/ uF  w  rgWvbK	  	  ppp\        RVP                   Uu. uFG  pWx9   d   \        P                  ! W,          4      R3M\        P                   ! RV! V4      R 4      R3NKI  	  up4      o
TP#                  VP                   Uu. uF  qwP$                  NK  	  up4      oV
V3R lp	V	# u uppi u upi u upi )Nz'List[Tuple[Callable[[Any], Any], bool]]Tr  Fc                .   <a a S! VV 3R  lS 4       4      # )c              3  X   <"   T F  w  rV'       d	   V! S4      MV! S4      x  K!  	  R # 5ir  r  )r?  r  use_rowr4  rows   &  r  rA  WSQLCompiler._inserted_primary_key_from_returning_getter.<locals>.get.<locals>.<genexpr>2	  s*      '.OF  'sF:,>>'.s   '*r  )r  r4  r  r  s   ffr  r  DSQLCompiler._inserted_primary_key_from_returning_getter.<locals>.get1	  s     '.  r  )r$   rz  r  r)  r3  r   r  r;   r  r   rb  rI  r   r  r  
itemgetterr  r  r@  )r  r  r3  r  r   r  idxr'  retr  r  r  s   &         @@r  +_inserted_primary_key_from_returning_getter7SQLCompiler._inserted_primary_key_from_returning_getter	  sZ    --!!---&&00	=i0000==++	$$$(1)(<=(<HCsx(<=5 !,, -C z ((2D9 !--!#3C#8$ 	 -
" $$9J9J%K9J#gg9J%KL	 
7 > &Ls   EAE
0Ec                   V ^8  d   QhRR/# r  r  )r   s   "r  r  r  9	  s      c r  c                    R# )zCalled when a SELECT statement has no froms, and no FROM clause is
to be appended.

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

r  r  rF  s   &r  default_fromSQLCompiler.default_from9	  s     r  c                D   VP                   P                  ! V 3/ VB pVP                   EFq  pW@P                  9  d   K  V P                  V,          pVP	                  VP                  VP
                  ,          RRR7      pV P                  V,          pV;V P                  V&   V P                  V&   WpP                  V&   V P                  P                  VR4       WPP                  9   d   V ;P                  V0,          un        WPP                  9   d   V ;P                  V0,          un	        V P                  pV'       g   EK  Vw  rVP                   F?  pVP
                  V
9   g   K  WP
                  ,          pW,          P                  V4       KA  	  EKt  	  V# )aB  SQL compile the nested element of an _OverrideBinds with
bindparams swapped out.

The _OverrideBinds is not normally expected to be compiled; it
is meant to be used when an already cached statement is to be used,
the compilation was already performed, and only the bound params should
be swapped in at execution time.

However, there are test cases that exericise this object, and
additionally the ORM subquery loader is known to feed in expressions
which include this construct into new queries (discovered in #11173),
so it has to do the right thing at compile time as well.

TF)maintain_keyr&  N)r  r  	translaterd  _with_valuer@  re  r  rz  ry  r|  _cloned_setr  )r  override_bindsr  sqltextr  bpnew_bpr   r+  r  r  cbs   &&,         r  visit_override_binds SQLCompiler.visit_override_bindsC	  sR   " !((;;DGBG  ))A

"AB ^^((0! $ F ??2&D/55DJJqMDJJt,&*OOF#OOD)---((VH4(000++x7+33Jz'
..Bvv~!&&\/ )? *H r  c                	X    R VP                   P                  ! V 3/ VB ,           R,           # rM  rO  r  r  )r  groupingasfromr  s   &&&,r  visit_groupingSQLCompiler.visit_grouping	  (    X%%88HHH3NNr  c                	X    R VP                   P                  ! V 3/ VB ,           R,           # r  r  )r  r  r  s   &&,r  visit_select_statement_grouping+SQLCompiler.visit_select_statement_grouping	  r  r  c                	J   V P                   '       d   V P                  P                  '       d    \        R V P                   R,          R,          4      pTP                  w  pppT'       d   Tp	MTp	TP                  P                  p
T
eR   T
P                  T	9   dA   T
P                  YP                  ,          4      '       d   TP                  P                  TR&   V P                  ! VP                  3RV/VB #   \         d   p\
        P                  ! R4      ThRp?ii ; i)'Union[SelectState, CompoundSelectState]r)  ECan't resolve label reference for ORDER BY / GROUP BY / DISTINCT etc.Nrender_label_as_labelwithin_columns_clauser  )r  r  supports_simple_order_by_labelr   KeyErrorr/   r$  _label_resolve_dictr  _order_by_label_elementr   shares_lineager  )r  r  r  r  r)  ke	with_cols
only_froms	only_colsresolve_dictorder_by_elems   &&&,       r  visit_label_reference!SQLCompiler.visit_label_reference	  s     :::$,,EEE	 $=JJrN?3! 11	$)( $OOCCM )!&&,6!00 !3!34 
 OO;; ./ ||OO
"7
 
 	
A  &&/ s   $C; ;D"DD"c                	|   V P                   '       g   V P                  VP                  4      #  \        R V P                   R,          R,          4      pXP                  w  rgp V'       d   WqP                  ,          p	MWaP                  ,          p	WR&   V P                  ! V	3RV/VB #   \         d=   p\
        P                  ! TP                  R\        P                  TR7        Rp?LRp?ii ; i  \         d>   p
\
        P                  ! TP                  R\        P                  T
R7        Rp
?
R# Rp
?
ii ; i)r  r)  r  )extraexc_clsr  Nr  r  r  )r  r  _text_clauser   r  r   _no_text_coercionr  r/   r$  r  )r  r  r  r  r)  r  r  r  r  r'  r  s   &&&,       r  visit_textual_label_reference)SQLCompiler.visit_textual_label_reference	  s"    zzz<< 4 455	 9

2/M ,9+L+L(	y	$ 10 /2*+<<+@DJ ;  		''/ (( 		"  		''/ (( 		s/   $B) #-C3 )C042C++C03D;>2D66D;c                	   T;'       d    V'       * pWQJ p	V	'       g	   V'       dT   \        VP                  \        P                  4      '       d   V P	                  R VP                  4      p
MVP                  p
V'       d   Ve9   V! X
VP                  W3VP
                  ,           V,           VP                  4       VP                  P                  ! V 3RRRR/VB \        \        P                  ,          ,           V P                  P                  VX
4      ,           # V	'       d   V P                  P                  VX
4      # VP                  P                  ! V 3RR/VB # )colidentr  Twithin_label_clauseF)r  r   r   r@   _truncated_identifierr&  r  r  r  	OPERATORSr   as_r  format_label)r  r#  add_to_result_mapr  r  r  result_map_targetsr  render_label_with_asrender_label_only	labelnames   &&&&&&&,   r  visit_labelSQLCompiler.visit_label	  sD    "==*=&= 	 2: 4%**h&?&?@@ 66z5::N	!JJ	 ,!JJ&)9)99<NNJJ	 00*. )- 	 IMM*+ --,,UI>?	 ==--eY??==33,157 r  c                	.    \         P                  ! R 4      h)z:Cannot compile Column object until its 'name' is assigned.r/   r$  r  r|   s   &&r  _fallback_column_name!SQLCompiler._fallback_column_name
  s    H
 	
r  c                	@    VP                   pV P                  ! V3/ VB # r  )	_resolvedr  )r  r  r  sql_elements   &&, r  visit_lambda_element SQLCompiler.visit_lambda_element
  s!    ''||K.2..r  c               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r  r|   ColumnClause[Any]r  Optional[_ResultMapAppender]include_tabler*  r  r   ambiguous_table_name_mapz Optional[_AmbiguousTableNameMap]r  r   r  r   r  )r   s   "r  r  r  
  sZ     9O 9O!9O 89O 	9O
 ,9O #C9O 9O 
9Or  c                	$   VP                   ;rxVf   V P                  V4      pVP                  p	V	'       g3   \        V\        P
                  4      '       d   V P                  RV4      pVeN   WVP                  3V,           p
VP                  '       d   WP                  3,          p
V! WxWP                  4       V	'       d   V P                  V4      pMV P                  P                  V4      pVP                  pVe   V'       d   VP                  '       g   V# V P                  P                  V4      pV'       d$   V P                  P!                  V4      R,           pMRp\"        '       d   \        V\$        4      '       g   Q hVP                   pV'       g   V'       d   W9   d	   W^,          p\        V\        P
                  4      '       d   V P                  RV4      pWP                  P                  V4      ,           R,           V,           # )Nr  rS  r  alias)r   r  
is_literalr  r   r@   r  r@  	_tq_labelr  escape_literal_columnr  quoter   named_with_columnschema_for_objectquote_schemar   rY   )r  r|   r  r   r  r  r  r   	orig_namer  targetsr   effective_schemaschema_prefix	tablenames   &&&&&&,        r  visit_columnSQLCompiler.visit_column
  s    ";;&<--f5D&&
jx/H/HII--j$?D(VZZ03EEG,,..dwD --d3D==&&t,D=U5L5L5LK#}}>>uEMM../?@3F  !#}!%9999

I %,94?	)X%>%>?? 66w	J	 ==#6#6y#AACG$NNr  c                	L    V P                   P                  VP                  4      # r  )r  format_collation	collationr  r  r  s   &&,r  visit_collationSQLCompiler.visit_collationZ
  s    }}--g.?.?@@r  c                	    VP                   # r  r   )r  
fromclauser  s   &&,r  visit_fromclauseSQLCompiler.visit_fromclause]
  s    r  c                	    VP                   # r  r  )r  r  r  s   &&,r  visit_indexSQLCompiler.visit_index`
  s    zzr  c                	    WR &   V P                   VR&   V P                  P                  P                  ! VP                  3/ VB # )type_expressionr  )r  r  type_compiler_instancer  r  )r  
typeclauser  s   &&,r  visit_typeclauseSQLCompiler.visit_typeclausec
  sF     *$(MM !||22::OO
!
 	
r  c                	b    V P                   P                  '       d   VP                  R R4      pV# rK  %%r  _double_percentsreplacer  texts   &&r  post_process_textSQLCompiler.post_process_textj
  '    ==)))<<T*Dr  c                	b    V P                   P                  '       d   VP                  R R4      pV# r'  r)  r,  s   &&r  r  !SQLCompiler.escape_literal_columno
  r0  r  c           	     	  a aa VV V3R  lpS P                   '       g   RS n        V'       d   V! RRS3\        P                  4       \        P                  R \        P                  VS P                  SP                  4      4      4      # )c                   < V P                  ^4      pVSP                  9   d%   SP                  ! SP                  V,          3/ SB # SP                  ! V3/ SB # r  )r   _bindparamsr  bindparam_string)r  r   r  r  
textclauses   & r  do_bindparam2SQLCompiler.visit_textclause.<locals>.do_bindparamu
  sS    771:Dz---||J$:$:4$@GBGG,,T8R88r  TNc                $    V P                  ^4      # r  r  )r  s   &r  r  .SQLCompiler.visit_textclause.<locals>.<lambda>
  s    aggajr  )	r  rc  r#   NULLTYPEBIND_PARAMS_ESCr  BIND_PARAMSr.  r-  )r  r7  r  r  r8  s   ff&l r  visit_textclauseSQLCompiler.visit_textclauset
  sn    	9 zzz#D dD:-9J9JK "" OOd44Z__E
 	
r  c                	   V P                   '       * pV'       d   V P                  MV P                   R,          pR\        4       R\        4       RV/pV P                   P                  V4       VP                  '       d   V P                  W4       T;'       g:    V^ 8H  ;'       d    VP                  RR4      ;'       g    VP                  RR4      pV'       d}   VP                  ;V n        V n	        VP                  '       * ;'       d    \        VP                  4      V n        VP                   F!  p	V P                  V	RV P                  R7       K#  	  V P                  ! VP                  3/ VB p
V P                   '       d9   V'       g   \#        V P                   4      MR	pV P%                  VR
7      V
,           p
V P                   P'                  R4       V
# )r  r%  r$  r"   r,  Fr+  T)r  r  Nnesting_levelr  )r  _default_stack_entryr   r  _independent_ctes_dispatch_independent_ctesr  r  rn  rl  r*  column_argsro  r  _add_to_result_mapr  r  r  _render_cte_clauser  )r  tafcompound_indexr  r  toplevelr  	new_entrypopulate_result_mapr  r-  rC  s   &&&&,       r  visit_textual_select SQLCompiler.visit_textual_select
  s    zz>-5))4::b> suCE#*
	
 	

)$   ++C4  > >!# E EII<eD> >
 yy5u= 	 D!D$A 47>>/A 0 0dGD, __*.&*&=&=   % ||CKK.2.9993;C

OM***G$ND

rr  c               $    V ^8  d   QhRRRRRR/# )r  r]  rH   r  r   r  r   r  )r   s   "r  r  r  
  s!      t 3 3 r  c                	    R # NULLr  r  r]  r  s   &&,r  
visit_nullSQLCompiler.visit_null
      r  c               $    V ^8  d   QhRRRRRR/# )r  r]  rI   r  r   r  r   r  )r   s   "r  r  r  
  s!      u C C r  c                	B    V P                   P                  '       d   R # R# )r   1r  supports_native_booleanrU  s   &&,r  
visit_trueSQLCompiler.visit_true
  s    <<///r  c               $    V ^8  d   QhRRRRRR/# )r  r]  rF   r  r   r  r   r  )r   s   "r  r  r  
  s!       c c r  c                	B    V P                   P                  '       d   R # R# )r   0r\  rU  s   &&,r  visit_falseSQLCompiler.visit_false
  s    <<///r  c                	L   a a VP                  R  VV 3R lV 4        4       4      # )c              3  :   "   T F  pV'       g   K  Vx  K  	  R # 5ir  r  r?  ss   & r  rA  7SQLCompiler._generate_delimited_list.<locals>.<genexpr>
  s      
I AI   

c              3  H   <"   T F  qP                   ! S3/ SB x  K  	  R # 5ir  r  r?  r  r  r  s   & r  rA  ri  
  s     I1**4626   "r   )r  r   	separatorr  s   f&&lr  _generate_delimited_list$SQLCompiler._generate_delimited_list
  s&    ~~ 
II
 
 	
r  c                	  a a \         P                  P                  \        P                  \         P
                  P                  \         P                  P                  V4      w  r1V^8X  d   V^ ,          P                  ! S 3/ SB # \        \        P                  ,          pVP                  R VV 3R lV 4        4       4      # )r  c              3  :   "   T F  pV'       g   K  Vx  K  	  R # 5ir  r  rg  s   & r  rA  ;SQLCompiler._generate_delimited_and_list.<locals>.<genexpr>
  s      "LA Lrj  c              3  H   <"   T F  qP                   ! S3/ SB x  K  	  R # 5ir  r  rl  s   & r  rA  rt  
  s     LGq..t:r:Grm  )r   BooleanClauseList_process_clauses_for_booleanr   and_rI   
_singletonrF   r  r  r   )r  clausesr  lccro  s   f&l  r  _generate_delimited_and_list(SQLCompiler._generate_delimited_and_list
  s    11NNNNNN%%OO&&	
 !81:00<<<!)..1I>> "LGL"  r  c                	6    R V P                   ! V3/ VB ,          # (%s))visit_clauselist)r  
clauselistr  s   &&,r  visit_tupleSQLCompiler.visit_tuple
  s    --j?B???r  c                	    VP                   pVf   RpM\        VP                   ,          pV P                  ! VP                  V3/ VB # )NrW  )r  r  rp  rz  )r  r  r  seps   &&, r  r  SQLCompiler.visit_clauselist
  sE    !!;CJ//0C,,Z-?-?KKKr  c                	   VP                   pV P                  VR R4      pV'       d
   V! W3/ VB #  \        V,          pRVR&   V P                  ! VP                  V3/ VB #   \
         d   p\        P                  ! Y4      ThRp?ii ; i)expression_clauselistNT_in_operator_expression)r  _get_operator_dispatchr  rp  rz  r  r/   r  )r  r  r  	operator_dispopstringr  s   &&,    r  visit_expression_clauselist'SQLCompiler.visit_expression_clauselist
  s    ''	**.
 
444	 +H -1B()00""H02 	  	L11$BK	Ls   A" "B	-BB	c                	   R pVP                   e+   W1P                   P                  ! V 3/ VB R,           ,          pVP                   FL  w  rEVRVP                  ! V 3/ VB ,           R,           VP                  ! V 3/ VB ,           R,           ,          pKN  	  VP                  e3   VRVP                  P                  ! V 3/ VB ,           R,           ,          pVR,          pV# )zCASE rW  zWHEN z THEN zELSE END)r  r  whenselse_)r  clauser  xcondr  s   &&,   r  
visit_caseSQLCompiler.visit_case  s    <<#00@@3FFA"LLLD))$9&9: ++D;F;< 	A ) <<#&,,99$I&IICOA 	
U
r  c                	<    VP                   P                  ! V 3/ VB # r  )typed_expressionr  )r  type_coercer  s   &&,r  visit_type_coerceSQLCompiler.visit_type_coerce  s    ++>>tJrJJr  c                	&   VP                   P                  ! V 3/ VB p\        P                  ! R V4      pRVP                  P                  ! V 3/ VB : RV'       d   VP                  ^4      MT: RV'       d   VP                  ^4      : 2# R: 2# )z(.*)( COLLATE .*)zCAST(r   rO  r  )r#  r  r  matchr  r   )r  r   r  type_clauser  s   &&,  r  
visit_castSQLCompiler.visit_cast  s    oo88HH,k:KK**4:6:#EKKN4#EKKN+
 	
 *,+
 	
r  c           
     	   V^ ,          \         P                  J d   RMV^ ,          \         P                  J d   RMzV^ ,          ^ 8  d<   V P                  ! \         P                  ! \        V^ ,          4      4      3/ VB : R2M1V P                  ! \         P                  ! V^ ,          4      3/ VB : R2: RV^,          \         P                  J d   R: 2# V^,          \         P                  J d   R: 2# V^,          ^ 8  d?   V P                  ! \         P                  ! \        V^,          4      4      3/ VB : R2: 2# V P                  ! \         P                  ! V^,          4      3/ VB : R2: 2# )    zUNBOUNDED PRECEDINGzCURRENT ROWz
 PRECEDINGz
 FOLLOWINGr   zUNBOUNDED FOLLOWING)r   RANGE_UNBOUNDEDRANGE_CURRENTr  literalabs)r  range_r  s   &&,r  _format_frame_clause SQLCompiler._format_frame_clause&  su    !9 8 88 & ayH$:$:: " "!9q=	 !LL ( 0 0VAY @DF  <<(8(8(CJrJM( !9 8 88 & +'
 '	
2 ayH$:$:: "+'
 '	
B "!9q=	 !LL ( 0 0VAY @DF+'
 '	
F  <<(8(8(CJrJM+'
 '	
r  c                	   VP                   P                  ! V 3/ VB pVP                  e&   RV P                  ! VP                  3/ VB ,          pMhVP                  e&   RV P                  ! VP                  3/ VB ,          pM5VP
                  e&   RV P                  ! VP
                  3/ VB ,          pMR pV: RRP                  RVP                  3RVP                  33 UUu. uF8  w  rVVf   K  \        V4      '       g   K  V: RVP                  ! V 3/ VB : 2NK:  	  uppV'       d   V.M. ,           4      : R	2# u uppi )
NzRANGE BETWEEN %szROWS BETWEEN %szGROUPS BETWEEN %sz OVER (rW  	PARTITIONORDERz BY rO  )
r  r  r  r  rowsgroupsr   partition_byorder_byr  )r  overr  r-  r  wordr  s   &&,    r  
visit_overSQLCompiler.visit_overP  sU   ||..t>v>;;"'$*C*C+%+ F YY"&)B)B		*#* F [[$(4+D+D,%, F F HH
 %d&7&78 $--0)) H /2&kHV66tFvFH)  &F82	/
 	
s   'E4EEc                	    VP                   P                  ! V 3/ VB : R VP                  P                  ! V 3/ VB : R2# )z WITHIN GROUP (ORDER BY rO  )r  r  r  )r  withingroupr  s   &&,r  visit_withingroupSQLCompiler.visit_withingroupq  s>    224B6B  33DCFC
 	
r  c                	    VP                   P                  ! V 3/ VB : R VP                  P                  ! V 3/ VB : R2# )z FILTER (WHERE rO  )funcr  	criterion)r  
funcfilterr  s   &&,r  visit_funcfilterSQLCompiler.visit_funcfilterw  s<    OO..t>v>  33DCFC
 	
r  c                	    V P                   P                  VP                  VP                  4      pR V: RVP                  P                  ! V 3/ VB : R2# )zEXTRACT(r   rO  )extract_mapr  fieldr]  r  )r  extractr  r  s   &&, r  visit_extractSQLCompiler.visit_extract}  sF      $$W]]GMMBLL++D;F;
 	
r  c                	v    V P                   ! VP                  3/ VB pV P                  ! V3/ VB pR V: RV: 2# )rM  z).)visit_functionfnr  )r  r  r  compiled_fncompiled_cols   &&,  r  visit_scalar_function_column(SQLCompiler.visit_scalar_function_column  s;    ))'**;;((7B7'66r  c               (    V ^8  d   QhRRRRRRRR/# )	r  r  Function[Any]r  r  r  r   r  r   r  )r   s   "r  r  r    s2     , ,, 8, 	,
 
,r  c           	     	   Ve5   V! VP                   VP                   VP                   3VP                  4       \        V RVP                   P                  4       ,          R 4      pV'       d   V! V3/ VB pEMn\        P                  VP                  4       P                  R 4      pV'       d   VP                  '       d
   VR,          pMsVP                   pV P                  P                  V4      '       g!   \        V\        P                  4      '       d   V P                  P                  V4      MTpVR,           pRP                  VP                    Uu. uFa  pV P                  P                  V4      '       g!   \        V\        P                  4      '       d   V P                  P                  V4      MTNKc  	  upV.,           4      RV P"                  ! V3/ VB /,          pVP$                  '       d
   VR,          pV# u upi )Nzvisit_%s_funcz%(expr)srS  r]  z WITH ORDINALITY)r   r  getattrlowerr   r  _deannotater  	_has_argsr  _requires_quotes_illegal_charsr  r   r,   r  r   packagenamesfunction_argspec_with_ordinality)r  r  r  r  r  r-  r   r^  s   &&&,    r  r  SQLCompiler.visit_function  s    (diiTYYL$))Lt_tyy/@@$G ''D==!1!1!3!=!=tDD>>>J&Dyy }}CCDII!$(<(<== MM''- 	  j(88  $00  1	  ==GGLL%dH,@,@AA ++C0 !!
  1 &	 ..t>v>?@D    &&Ds   %H<AHc                	8    V P                  VP                  4      # r  )visit_sequencesequence)r  
next_valuer  s   &&,r  visit_next_value_func!SQLCompiler.visit_next_value_func  s    "":#6#677r  c                	N    \        R V P                  P                  ,          4      h)z2Dialect '%s' does not support sequence increments.r  r  r   r  r  r  s   &&,r  r  SQLCompiler.visit_sequence  s$    !@ll 
 	
r  c               $    V ^8  d   QhRRRRRR/# )r  r  r  r  r   r  r   r  )r   s   "r  r  r    s&     C C] Cc Cc Cr  c                	<    VP                   P                  ! V 3/ VB # r  )clause_exprr  )r  r  r  s   &&,r  r  SQLCompiler.function_argspec  s    224B6BBr  c                	z  a aa S P                   '       * pVP                  ! VS 3/ SB pV'       d   S P                  '       g   VS n        VP                  pV'       d   S P                  MS P                   R,          pT;'       g"    V'       * ;'       d    VP                  RR4      p	V^ 8X  d   WR&   S P                   P                  RVR,          RVR,          RVRVRV	/4       VP                  '       d   S P                  VS4       S P                  VP                  ,          p
RV
,           R,           P                  VVV 3R	 l\        VP                  4       4       4      pRSR
&   VS P                  ! V3/ \        RRS/SB B ,          pVS P                   ! V3/ SB ,          pVP"                  '       d   VS P$                  ! V3/ SB ,          pS P&                  '       d:   V'       g   \)        S P                   4      MRpS P+                  VRR7      V,           pS P                   P-                  R4       V# )r  r,  Fr-  r%  r$  r"   r)  rW  c              3  V   <"   T F  w  rVP                   ! S3R SRV/SB x  K   	  R# 5i)r  rK  Nr  )r?  rJ  r  r  r  r  s   &  r  rA  4SQLCompiler.visit_compound_select.<locals>.<genexpr>  sD       2DA $$!'89=C 2s   &)r   r  NTrC  include_following_stackr  r  )r  _compile_state_factoryr)  r3  rD  r  r  rE  rF  compound_keywordskeywordr   rI  selectsgroup_by_clauser#  order_by_clause_has_row_limiting_clause_row_limit_clauser  r  rI  r  )r  csr  rK  r  rL  r)  compound_stmtr  need_result_mapr  r-  rC  s   f&f&l        r  visit_compound_select!SQLCompiler.visit_compound_select  s    zz>11"dEfED...!.D%//-5))4::b>" 
 
 A A		8%@ 	 Q "*

!5):#;n 5b.	
 ***++M6B((4g#)) &bjj1	
 #($$RI4+Hv+H+HII$$R2622&&&D**2888D9993;C

OM''"/,0 (  	  	

rr  c                	j    VP                   e   V P                  ! V3/ VB # V P                  ! V3/ VB # r  )_fetch_clausefetch_clauselimit_clause)r  r  r  s   &&,r  r  SQLCompiler._row_limit_clause  s:    '$$R2622$$R2622r  c                	j    R VP                   : RV: V'       d
   RV,           MR: 2p\        WR4      # )visit_rT  r  N)r  r  )r  r  
qualifier1
qualifier2attrnames   &&&& r  r  "SQLCompiler._get_operator_dispatch
  s3     *C*2

 tt,,r  c                	t   Ve   W13,          pW$R&   W4R&   VP                   '       d   VP                  '       d   \        P                  ! R4      hV P	                  VP                   RR4      pV'       d   V! WP                   3/ VB # V P
                  ! V\        VP                   ,          3/ VB # VP                  '       db   V P	                  VP                  RR4      pV'       d   V! WP                  3/ VB # V P                  ! V\        VP                  ,          3/ VB # \        P                  ! R4      h)Nr  r  zFUnary expression does not support operator and modifier simultaneouslyunaryr  modifierz,Unary expression has no operator or modifier)r  r  r/   r$  r   _generate_generic_unary_operatorr   _generate_generic_unary_modifier)r  r  r  r  r  r  s   &&&&, r  visit_unarySQLCompiler.visit_unary  s0    ((*&7"#'9#$>>>~~~&&2  ..D E>>8R88<<9U^^48:  ^^^..D E>>8R88<<9U^^48:  ""> r  c                	2   V P                   P                  '       d   V P                  ! VP                  3/ VB R ,           V P                  ! \        P
                  ! VP                  VP                  P                  P                  \        P                  J d   VP                  P                  M\        P                  ! 4       4      3/ VB ,           # V P                  ! VP                  3/ VB R ,           V P                  ! VP                  3/ VB ,           # ) / )r  div_is_floordivr  r   r   Castr   r  _type_affinityr#   Numericr  rw   r  r  s   &&&,r  visit_truediv_binary SQLCompiler.visit_truediv_binary8  s    <<'''V[[/B/ ,,MM  &||00??'// 0 #LL-- "*!1!1!3 	( V[[/B/,,v||2r23r  c                	   V P                   P                  '       dy   VP                  P                  P                  \
        P                  J dG   V P                  ! VP                  3/ VB R ,           V P                  ! VP                  3/ VB ,           # RV P                  ! VP                  3/ VB R ,           V P                  ! VP                  3/ VB ,           ,          # )r  z	FLOOR(%s))	r  r  r   r  r  r#   Integerr  r   r  s   &&&,r  visit_floordiv_binary!SQLCompiler.visit_floordiv_binaryS  s    LL(((!!00H4D4DD V[[/B/,,v||2r23 V[[/B/,,v||2r23 r  c                	    VP                   '       g   V P                  P                  '       d   V P                  ! VP                  3/ VB # R V P                  ! VP                  3/ VB ,          # )z%s = 1_is_implicitly_booleanr  r]  r  r  r  r  r  r  s   &&&,r  visit_is_true_unary_operator(SQLCompiler.visit_is_true_unary_operatord  sS    ***||333<<6266dll7??AbAAAr  c                	    VP                   '       g   V P                  P                  '       d%   R V P                  ! VP                  3/ VB ,          # RV P                  ! VP                  3/ VB ,          # )NOT %sz%s = 0r  r  s   &&&,r  visit_is_false_unary_operator)SQLCompiler.visit_is_false_unary_operatorm  sX    ***||333dll7??AbAAAdll7??AbAAAr  c                	R    R V P                  V\        P                  R7      ,          # )r!  )override_operator)visit_binaryr   match_opr  s   &&&,r  visit_not_match_op_binary%SQLCompiler.visit_not_match_op_binaryv  s,    $++i&8&8 , 
 
 	
r  c                	N    R V P                   ! V\        V,          3/ VB ,          # r  )_generate_generic_binaryr  r  s   &&&,r  visit_not_in_op_binary"SQLCompiler.visit_not_in_op_binary{  s0     55Ih'
+-
 
 	
r  c                	8   V\         P                  J d2   \        V4      ^8  d    RRP                  R V 4       4      ,          # R# V\         P                  J d2   \        V4      ^8  d    RRP                  R V 4       4      ,          # R# V P                  V4      # )r  z(%s)) OR (1 = 1r   c              3  &   "   T F  pR x  K	  	  R# 5irT  Nr  r?  r  s   & r  rA  6SQLCompiler.visit_empty_set_op_expr.<locals>.<genexpr>       :EfE   zNULL) OR (1 = 1z(%s)) AND (1 != 1c              3  &   "   T F  pR x  K	  	  R# 5ir0  r  r1  s   & r  rA  r2    r3  r4  zNULL) AND (1 != 1)r   	not_in_opr  r   in_opvisit_empty_set_expr)r  r  	expand_opr  s   &&&,r  visit_empty_set_op_expr#SQLCompiler.visit_empty_set_op_expr  s    	+++5zA~(II:E::  ))//)5zA~*II:E::  +,,U33r  c                	N    \        R V P                  P                  ,          4      h)z3Dialect '%s' does not support empty set expression.r  r  element_typesr  s   &&,r  r8   SQLCompiler.visit_empty_set_expr  s$    !All 
 	
r  c                	  a aa	a
 SP                   P                  S P                  4      pV'       g   VP                  '       dZ   S P                  P                  '       d   R MRS P                  SP                   P                  SP                  4      ,           pR	V3# S P                  SP                   .SP                  4      p R	V3# VP                  '       g]   VP                  '       d   \        V^ ,          \        P                  4      '       d   \        V^ ,          \        \        34      '       gl   VP                  '       d   \        R4      hS P                  P                  '       d   R MRRP!                  VV 3R l\#        V4       4       4      ,           pR	V3# V'       d   S P$                  pVP'                  V4      pV'       d   VP)                  ^4      '       g   Q R4       hVP)                  ^4      P+                  R4      pV^,          V^,          uo	o
RP!                  V	V
VV 3R lV 4       4      pR	V3# RP!                  VV 3R lV 4       4      pR	V3# )
VALUES r  z?bind_expression() on TupleType not supported with literal_bindsr   c           	   3     <"   T FG  w  rR RP                  V3R l\        VSP                  P                  4       4       4      ,          x  KI  	  R# 5i)r  r   c              3  J   <"   T F  w  rSP                  W4      x  K  	  R # 5ir  rF  )r?  r  
param_typer  s   &  r  rA  [SQLCompiler._literal_execute_expanding_parameter_literal_binds.<locals>.<genexpr>.<genexpr>  s-      2-E 11%DD2rC  N)r   r%  r  r  )r?  rJ  rK  rr  r  s   &  r  rA  QSQLCompiler._literal_execute_expanding_parameter_literal_binds.<locals>.<genexpr>  sV       ):$A II 14)9>>+?+?2   ):s   AA)unexpected format for expanding parameterrV  c              3  n   <"   T F*  pS: SP                  VSP                  4      : S: 2x  K,  	  R # 5ir  rG  r  )r?  r  rY  rZ  rr  r  s   & r  rA  rF    s8      3 "(	  11%H 	 "(   25c              3  \   <"   T F!  pSP                  VSP                  4      x  K#  	  R # 5ir  rI  )r?  r  rr  r  s   & r  rA  rF    s,      3!' --eY^^DD!'r  r  )r  r4  r  r  tuple_in_valuesr:  r  r9  _isnullr  collections_abcr   r   bytes_has_bind_expressionr  r   rI  rh  searchr   r\  )r  rr  r  bind_expression_templatetyp_dialect_implreplacement_expressionpost_compile_patternr  r^  rY  rZ  s   ff&&     @@r  2_literal_execute_expanding_parameter_literal_binds>SQLCompiler._literal_execute_expanding_parameter_literal_binds  s4    %>>AA$,,O
  ...!%!=!=!=I200NN(()*=*=*&z )))m *.)E)E^^$i&9&9*&l )))e ,,,$$$6!9o&>&>??vay3,77444)$  "\\999	r		  )2&(9 &"N )))1 ('+'A'A$(//0HIQWW  ?>?  ggaj&&t,$'FCF!)- 3 "(3 *& ))) *. 3!'3 *&
 )))r  c                	2  a aa
aaa SP                   '       d   S P                  SV4      # S P                  pSP                  P	                  V4      oS P
                  '       d   S P                  oMS P                  oS P                  P                  '       d   SP                  '       d   VVV V3R  lo
MV3R lo
V'       gu   . oSP                  '       d5   S P                  SP                  P                  SP                  4      pSV3# S P                  SP                  .SP                  4      p SV3# SP                  '       g]   SP                  '       d   \        V^ ,          \         P"                  4      '       d   \        V^ ,          \$        \&        34      '       g   SP(                  '       d   Q h\+        V^4       UUUU	u. uF)  w  rg\+        V^4       F  w  rV: RV: RV: 2V	3NK  	  K+  	  up	pppoVP,                  '       d   RMRRP/                  V
V3R l\+        V4       4       4      ,           pSV3# \+        V^4       UU	u. uF  w  riV: RV: 2V	3NK  	  up	poRP/                  V
3R lS 4       4      pSV3# u up	pppi u up	pi )c                P   < SP                  SP                  SSR V /,          4      # r  )render_bind_castr  )r   bind_templaterr  r  rS  s   &r  _render_bindtemplateNSQLCompiler._literal_execute_expanding_parameter.<locals>._render_bindtemplate  s,    ,,NN$!VTN2 r  c                   < SR V /,          # r  r  )r   r[  s   &r  r\  r]    s    $~55r  rT  rA  r  r   c              3     <aa"   T F6  w  ooR RP                  VVVV3R l\        S4       4       4      ,          x  K8  	  R# 5i)r  r   c              3     <"   T F4  w  rS! SS\        S4      ,          V,           ,          ^ ,          4      x  K6  	  R# 5i)r  N)r  )r?  rL  r  r\  rJ  rs  rK  s   &  r  rA  MSQLCompiler._literal_execute_expanding_parameter.<locals>.<genexpr>.<genexpr>   sF       )AHA -%a#m*<&<q&@A!D  )As   <?N)r   rI  )r?  rJ  rK  r\  rs  s   &@@r  rA  CSQLCompiler._literal_execute_expanding_parameter.<locals>.<genexpr>  sK       ):$A} II  )2-(@	   ):s   >Ac              3  8   <"   T F  w  rS! V4      x  K  	  R # 5ir  r  )r?  r@  r  r\  s   &  r  rA  rb  .  s      /<Ejc$S))Ir  )rf  rV  r  r  r4  rp  rj  ri  _bind_typing_render_castsrZ  r  r:  r  r9  rM  r  rN  r   r   rO  	_is_arrayrI  rL  r   )r  r   rr  r  r  rT  rJ  rK  rL  r  r\  r[  rs  rS  s   f&f&      @@@@r  re  0SQLCompiler._literal_execute_expanding_parameter  sj   $$$JJ6  ,,$>>AA'J 99M --M LL222 111 6 I...)-)E)ENN(()*=*=*&V 000O *.)E)E^^$i&9&9*&N 000G ,,,$$$6!9o&>&>??vay3,77'11111 )2&!(<(<$A )- ;HA  $Q*E2 ; 3(<I %444	"		  )2&(9 &". 000 !*&! 4 4HA !!$e, 4I &*YY /<E/ &" 000;*s   
/J
Jc           	     	.   V'       Ed   \         P                  ! VP                  4      '       d   Ve   VR,          pVP                  P	                  \
        P                  ! \        VP                  P                  V.,           4      \        VP                  P                  V.,           4      4      4       MjVP                  P	                  \
        P                  ! \        VP                  P                  4      \        VP                  P                  4      4      4       V P                  '       dZ   \        VP                  \        P                  4      '       d0   \        VP                  \        P                  4      '       d   RVR&   T;'       g    VP                  pV P                  VRR 4      p	V	'       d
   V	! W3/ VB #  \         V,          p
V P"                  ! VV
3RVRV/VB #   \$         d   p\&        P(                  ! Y4      ThR p?ii ; i)Nenclosing_lateralTrf  rw   from_linterlateral_from_linter)r   is_comparisonr  r  r  r  productr'   r   r(   r   rh  r  r   rB   r  r  r+  r  r/   r  )r  rw   r%  eager_groupingri  rj  r  rh  r  r  r  r  s   &&&&&&,     r  r&  SQLCompiler.visit_binary4  s    ;9226??CC".$&':$;!#))00%%!"KK559J8KK ""LL66:K9LL		 !!((%%!&++";";<!&,,"<"<=    6;;(>(>??6<<)?)?@@$(B !%88	**9hE0R00$Y/ 44 !, )<	
    P55dFCOPs   G- -H8HHc                	<    V P                   ! VP                  3/ VB # r  )r  sql_functionr  s   &&&,r  &visit_function_as_comparison_op_binary2SQLCompiler.visit_function_as_comparison_op_binaryl  s    ||G007B77r  c                	R   V P                   P                  '       dG   V P                  ! VP                  3/ VB R ,           V P                  ! VP                  3/ VB ,           # V P                  ! VP                  3/ VB R,           V P                  ! VP                  3/ VB ,           # )z %% r   )r  r*  r  r   r   r  s   &&&,r  visit_mod_binarySQLCompiler.visit_mod_binaryo  s    ==)))V[[/B/,,v||2r23 V[[/B/,,v||2r23r  c                	    VP                   VR &   V P                  ! VRV P                  VP                  4      ,           R,           3/ VB # )rm  rW  )rm  r+  r  r  r  s   &&&,r  visit_custom_op_binary"SQLCompiler.visit_custom_op_binary}  sQ    '66,,$,,X->->??#E
 
 	
r  c                	h    V P                   ! WP                  VP                  4      R ,           3/ VB # rW  )r	  r  r  r  s   &&&,r  visit_custom_op_unary_operator*SQLCompiler.visit_custom_op_unary_operator  s6    44//0A0ABSH
LN
 	
r  c                	j    V P                   ! VR V P                  VP                  4      ,           3/ VB # rz  )r
  r  r  r  s   &&&,r  visit_custom_op_unary_modifier*SQLCompiler.visit_custom_op_unary_modifier  s8    44S455h6G6GHH
LN
 	
r  c          
     ,    V ^8  d   QhRRRRRRRRR	R/# )
r  rw   BinaryExpression[Any]r  r   rm  r*  r  r   r  r  )r   s   "r  r  r    s<      %  	
  
r  c                	   VP                  R R4      pRVR &   VP                  VR&   VP                  P                  ! V 3RV/VB V,           VP                  P                  ! V 3RV/VB ,           pV'       d   V'       d
   RV,          pV# )r  FT
_binary_oprm  r  )r  r  r   r  r   )r  rw   r  rm  r  r  r-  s   &&&&,  r  r+  $SQLCompiler._generate_generic_binary  s     #%&&)BE"J(,$%!??<KK**%379  ll--%379	 	 #~D=Dr  c                	H    W!P                   P                  ! V 3/ VB ,           # r  r  r  r  r  r  s   &&&,r  r	  ,SQLCompiler._generate_generic_unary_operator  s    --::4F2FFFr  c                	J    VP                   P                  ! V 3/ VB V,           # r  r  r  s   &&&,r  r
  ,SQLCompiler._generate_generic_unary_modifier  s!    }}//;;hFFr  c                	N    \         P                  ! R \        P                  R7      # )z'%')r  )r   literal_columnr#   
STRINGTYPErF  s   &r  _like_percent_literal!SQLCompiler._like_percent_literal  s    &&uH4G4GHHr  c                	D    R VP                   P                  ! V 3/ VB  R2# )zlower(rO  r  r  s   &&,r  $visit_ilike_case_insensitive_operand0SQLCompiler.visit_ilike_case_insensitive_operand  s&    ::4F2FGqIIr  c                	    VP                  4       pV P                  pVP                  VP                  4      P                  V4      Vn        V P                  ! W3/ VB # r  _cloner  concatr   visit_like_op_binaryr  rw   r  r  percents   &&&, r  visit_contains_op_binary$SQLCompiler.visit_contains_op_binary  sM    ,,~~fll3::7C((@R@@r  c                	    VP                  4       pV P                  pVP                  VP                  4      P                  V4      Vn        V P                  ! W3/ VB # r  r  r  r  r   visit_not_like_op_binaryr  s   &&&, r  visit_not_contains_op_binary(SQLCompiler.visit_not_contains_op_binary  sM    ,,~~fll3::7C,,VDDDr  c                	   VP                  4       pV P                  p\        VP                  4      Vn        VP	                  \        VP
                  4      4      P	                  V4      Vn        V P                  ! W3/ VB # r  r  r  r;  r   r  r   visit_ilike_op_binaryr  s   &&&, r  visit_icontains_op_binary%SQLCompiler.visit_icontains_op_binary  sh    ,,,V[[9~~"6<<0

&/ 	 ))&AbAAr  c                	   VP                  4       pV P                  p\        VP                  4      Vn        VP	                  \        VP
                  4      4      P	                  V4      Vn        V P                  ! W3/ VB # r  r  r  r;  r   r  r   visit_not_ilike_op_binaryr  s   &&&, r  visit_not_icontains_op_binary)SQLCompiler.visit_not_icontains_op_binary  sh    ,,,V[[9~~"6<<0

&/ 	 --fE"EEr  c                	    VP                  4       pV P                  pVP                  VP                  4      Vn        V P                  ! W3/ VB # r  )r  r  _rconcatr   r  r  s   &&&, r  visit_startswith_op_binary&SQLCompiler.visit_startswith_op_binary  sD    ,,''5((@R@@r  c                	    VP                  4       pV P                  pVP                  VP                  4      Vn        V P                  ! W3/ VB # r  )r  r  r  r   r  r  s   &&&, r  visit_not_startswith_op_binary*SQLCompiler.visit_not_startswith_op_binary  sD    ,,''5,,VDDDr  c                	    VP                  4       pV P                  p\        VP                  4      Vn        VP	                  \        VP
                  4      4      Vn        V P                  ! W3/ VB # r  )r  r  r;  r   r  r   r  r  s   &&&, r  visit_istartswith_op_binary'SQLCompiler.visit_istartswith_op_binary  sZ    ,,,V[[9''(>v||(LM))&AbAAr  c                	    VP                  4       pV P                  p\        VP                  4      Vn        VP	                  \        VP
                  4      4      Vn        V P                  ! W3/ VB # r  )r  r  r;  r   r  r   r  r  s   &&&, r  visit_not_istartswith_op_binary+SQLCompiler.visit_not_istartswith_op_binary  sZ    ,,,V[[9''(>v||(LM--fE"EEr  c                	    VP                  4       pV P                  pVP                  VP                  4      Vn        V P                  ! W3/ VB # r  r  r  s   &&&, r  visit_endswith_op_binary$SQLCompiler.visit_endswith_op_binary  sB    ,,~~fll3((@R@@r  c                	    VP                  4       pV P                  pVP                  VP                  4      Vn        V P                  ! W3/ VB # r  r  r  s   &&&, r  visit_not_endswith_op_binary(SQLCompiler.visit_not_endswith_op_binary  sB    ,,~~fll3,,VDDDr  c                	    VP                  4       pV P                  p\        VP                  4      Vn        VP	                  \        VP
                  4      4      Vn        V P                  ! W3/ VB # r  r  r  s   &&&, r  visit_iendswith_op_binary%SQLCompiler.visit_iendswith_op_binary  sX    ,,,V[[9~~&<V\\&JK))&AbAAr  c                	    VP                  4       pV P                  p\        VP                  4      Vn        VP	                  \        VP
                  4      4      Vn        V P                  ! W3/ VB # r  r  r  s   &&&, r  visit_not_iendswith_op_binary)SQLCompiler.visit_not_iendswith_op_binary   sX    ,,,V[[9~~&<V\\&JK--fE"EEr  c                	(   VP                   P                  R R4      pVP                  P                  ! V 3/ VB : RVP                  P                  ! V 3/ VB : 2Ve.   RV P                  V\        P                  4      ,           ,           # R,           # )r  Nz LIKE  ESCAPE r  	modifiersr  r   r  r   rG  r#   r  r  rw   r  r  r  s   &&&, r  r   SQLCompiler.visit_like_op_binary  s    !!%%h5 KK**4626LL++D7B7

 ! 2268;N;NOO	
 	
 
 	
r  c                	(   VP                   P                  R R4      pVP                  P                  ! V 3/ VB : RVP                  P                  ! V 3/ VB : 2Ve.   RV P                  V\        P                  4      ,           ,           # R,           # )r  Nz
 NOT LIKE r  r  r  r  s   &&&, r  r  $SQLCompiler.visit_not_like_op_binary  s    !!%%h5KK**4626LL++D7B7

 ! 2268;N;NOO	
 	
 
 	
r  c                	    V\         P                  J dE   VP                  4       p\        VP                  4      Vn        \        VP
                  4      Vn        V P                  ! W3/ VB # r  )r   ilike_opr  r;  r   r   r  r  s   &&&,r  r  !SQLCompiler.visit_ilike_op_binary  sS    y)))]]_F0=FK1&,,?FL ((@R@@r  c                	    V\         P                  J dE   VP                  4       p\        VP                  4      Vn        \        VP
                  4      Vn        V P                  ! W3/ VB # r  )r   not_ilike_opr  r;  r   r   r  r  s   &&&,r  r  %SQLCompiler.visit_not_ilike_op_binary'  sS    y---]]_F0=FK1&,,?FL ,,VDDDr  c                	t    VP                   P                  R R4      pV P                  ! Y'       d   RMR3/ VB # )r   Fz BETWEEN SYMMETRIC z	 BETWEEN r  r  r+  r  rw   r  r  r   s   &&&, r  visit_between_op_binary#SQLCompiler.visit_between_op_binary0  s?    $$((e<	,,Y)K
KM
 	
r  c                	v    VP                   P                  R R4      pV P                  ! TV'       d   RMR3/ VB # )r   Fz NOT BETWEEN SYMMETRIC z NOT BETWEEN r  r  s   &&&, r  visit_not_between_op_binary'SQLCompiler.visit_not_between_op_binary6  sB    $$((e<	,,)2%
 
 	
r  c               (    V ^8  d   QhRRRRRRRR/# r  rw   r  r  r   r  r  r   r  )r   s   "r  r  r  >  ,     
 
+
7:
BE
	
r  c                	d    \         P                  ! R V P                  P                  ,          4      hz/%s dialect does not support regular expressionsr/   r$  r  r   r  s   &&&,r  visit_regexp_match_op_binary(SQLCompiler.visit_regexp_match_op_binary>  ,     =ll 
 	
r  c               (    V ^8  d   QhRRRRRRRR/# r  r  )r   s   "r  r  r  F  r  r  c                	d    \         P                  ! R V P                  P                  ,          4      hr  r  r  s   &&&,r   visit_not_regexp_match_op_binary,SQLCompiler.visit_not_regexp_match_op_binaryF  r  r  c               (    V ^8  d   QhRRRRRRRR/# r  r  )r   s   "r  r  r  N  r  r  c                	d    \         P                  ! R V P                  P                  ,          4      h)z;%s dialect does not support regular expression replacementsr  r  s   &&&,r  visit_regexp_replace_op_binary*SQLCompiler.visit_regexp_replace_op_binaryN  s,     Ill 
 	
r  c                	*	   V'       Eg   VP                   P                  V P                  4      pVP                  '       d   VP	                  V4      p	V P
                  ! V	3R RRTRT;'       d    VP                  '       * RVRV/VB p
VP                  '       d   \        P                  ! RV
4      pV'       g   Q R4       hRVP                  ^4      : R	VP                  ^4      : R
VP                  ^4      : R2p
V'       d!   V P                  ! V3RRRV
/VB pRV,          # V
# V'       gL   T;'       g+    VP                  ;'       g    T;'       d    V P                  pT;'       g    VP                  pMRpV'       d3   V P                  ! V3RR/VB pVP                  '       d
   RV,          pV# V P                  V4      pWP                  9   Edv   V P                  V,          pWJEd]   VP                  '       g   VP                  '       dt   VP                   P#                  VP                   4      '       gI   VP$                  P#                  VP$                  4      '       g   \&        P(                  ! RV,          4      hVP                  VP                  8w  d   \&        P(                  ! RV: R24      hVP*                  '       g   VP*                  '       dl   VP*                  '       d)   VP*                  '       d   \&        P(                  ! R4      h\&        P(                  ! RVP,                   RVP,                   R24      hV;V P                  VP,                  &   V P                  V&   V P.                  pV'       dW   Vw  ppVP$                   FA  pVP,                  V9   g   K  VVP,                  ,          pVV,          P1                  V4       KC  	  VP2                  '       d   RV n        V'       dM   V'       d   RV n        V'       d   V ;P8                  V0,          un        MV ;P:                  V0,          un        V P<                  ! V3RVRVP                  RVP                   /VB pVP                  '       d
   RV,          pV# )skip_bind_expressionTr  literal_bindsrf  render_postcompilez&^(.*)\(__\[POSTCOMPILE_(\S+?)\]\)(.*)$rG  z(__[POSTCOMPILE_rV  z~~REPL~~z~~])rR  r  FzIBind parameter '%s' conflicts with unique bind parameter of the same namez"Can't reuse bound parameter name 'z' 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.a)  Encountered unsupported case when compiling an INSERT or UPDATE statement.  If this is a multi-table UPDATE statement, please provide string-named arguments to the values() method with distinct names; support for multi-table UPDATE statements that target multiple tables for UPDATE is very limitedzbindparam() name 'z' 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_z').post_compile	expandingbindparam_type)r  dialect_implr  rP  bind_expressionr  r  r  r  r   rd  rf  rh  _truncate_bindparamrd  r   r,  intersectionr  r/   r$  _is_crudr@  r|  r  
isoutparamhas_out_parametersrq  ry  rz  r6  )r  r  r  r  r  rf  r  r  implr  wrappedr  r  r  r   existingr+  r  r  r  r  s   &&&&&&&,             r  visit_bindparamSQLCompiler.visit_bindparamV  sV    $#>>..t||<D((("&"6"6y"A,,#)- +@ #0"K"K	8K8K4K	
 %4 (:  &&& A7A III1


G %";;%26 6= %	  &|+ D D,,D D)BBd.B.B 
 +AAi.A.AL L//159?C """slJ''	2::zz$'H(___	(8(8(8$..;;!++  %00==!--  **ACGH  ''9+>+>>** :>@  &&&)*<*<*<(((Y-?-?-? "..&
 
 "..0 @" #,--5	 	 8A@

9==!DJJt$4 //
#JD$++66T>bffBHOOI. ,
 &*D#!+/(++	{:+((YK7(##
%
  ))
 %>>	

 
 3,C
r  c                	    \        4       hr  r  )r  r  
dbapi_typer  s   &&&&r  rZ  SQLCompiler.render_bind_cast  s    !##r  c                	    V\         Jd   TpMVP                  f   VP                  f   VP                  RR 4      pV'       dH   V\        P
                  \        P                  39  d#   \        P                  ! RVP                  34       V P                  ! \        P                  3/ VB # VP                  pVP                  '       d   V P                  pV! VVVR7      w  rV	# V P!                  WQP"                  4      # )Nr  zBound parameter '%s' rendering literal NULL in a SQL expression; comparisons to NULL should not use operators outside of 'is' or 'is not')rR  )r+   r  r'  r  r   is_is_notr$   warn_limitedr@  r  r#   r<  r(  r  rV  rG  r  )
r  r  rG  rR  r  r  opleeprs  ru  s
   &&&&,     r  rd  $SQLCompiler.render_literal_bindparam  s      v-(E&9+=+=+EVVL$/"Y]]I4D4D$EE%%@ #(	 ||H$5$5<<<--EJJD*.)A+'I
 $#,,UNNCCr  c               $    V ^8  d   QhRRRRRR/# )r  r  r   r  zsqltypes.TypeEngine[Any]r  r   r  )r   s   "r  r  r    s$     % %%!9%	%r  c                   Vf@   VP                   '       g.   V P                  \        P                  P	                  4       4      # VP                  V P                  4      pV'       d
    V! V4      # \        P                  ! R\        P                  ! V4       RV 24      h  \         d8   p\        P                  ! R\        P                  ! T4       RT R24      ThRp?ii ; i)zRender 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.

Nz Could not render literal value "z" with datatype z); see parent stack trace for more detail.z:No literal value renderer is available for literal value ")should_evaluate_noner  r   rH   	_instance_cached_literal_processorr  r  r/   r$  sql_util_repr_single_value)r  r  r  	processores   &&&  r  rG   SQLCompiler.render_literal_value  s     =!;!;!; << 7 7 9::33DLLA		 '' ""//67 8!!&)   && 33E:; <%g ## s   (B   C"+2CC"c                	    WP                   9   d   V P                   V,          # VP                  p\        V\        P                  4      '       d   V P                  R V4      pW P                   V&   V# )r  )re  r@  r  r   r@   r  )r  r  r  s   && r  r  SQLCompiler._truncate_bindparamF  s]    '??9--MM	i!:!:;;22;	JI &/	"r  c               $    V ^8  d   QhRRRRRR/# )r  ident_classr   r   r@   r  r  )r   s   "r  r  r  S  s$      &6	r  c                	   W3V P                   9   d   V P                   W3,          # VP                  V P                  4      p\        V4      V P                  ^,
          8  dr   V P
                  P                  V^4      pV^ \        V P                  ^,
          ^ 4       R,           \        V4      R,          ,           pV^,           V P
                  V&   MTpWPP                   W3&   V# )   rT  :r  NN)	r  	apply_mapr  r  r  r  r  maxhex)r  r  r   anonnamecounter	truncnames   &&&   r  r  !SQLCompiler._truncated_identifierS  s     $"6"66''(;<<>>$--0x=4,,q00..22;BGS!2!2Q!6:;g,r"# 
 5<aKD$$[1 I4=k01r  c                    V ^8  d   QhRRRR/# )r  r   r   r  r  )r   s   "r  r  r  h  s     $ $s $s $r  c                	&    WP                   ,          # r  r  r  r   s   &&r  
_anonymizeSQLCompiler._anonymizeh  s    mm##r  c               <    V ^8  d   QhRRRRRRRRRR	R
RRRRRRR/	# )r  r   r   r  r*  r  escaped_fromrs  r  zOptional[TypeEngine[Any]]accumulate_bind_nameszOptional[Set[str]]visited_bindparamru  r  r   r  r  )r   s   "r  r  r  k  so     A AA A 	A
 $A 2A  2A /A A 
Ar  c                	X  a  Ve   VP                  V4       Ve   VP                  V4       V'       gF   S P                  P                  V4      '       d%   S P                  P	                  V 3R lV4      p	TpT	pV'       d"   S P
                  P                  WA/4      S n        V'       dY   RV,          p
V'       d   V
# Ve@   VP                  S P                  4      pVP                  '       d   S P                  W[V
4      p
V
# S P                  \        P                  J d   S P                  RV/,          p
MS P                  RV/,          p
Ve\   S P                  P                   '       d@   VP                  S P                  4      pVP                  '       d   S P                  W[V
4      p
V
# )Nc                H   < SP                   V P                  ^ 4      ,          # )r  )rZ  r   )r  r  s   &r  r  .SQLCompiler.bindparam_string.<locals>.<lambda>  s    d88Dr  z__[POSTCOMPILE_%s]r   )addr  rY  rQ  r  r{  r   r4  r  render_literal_castrZ  r  ru  rv  rj  ri  rd  )r  r   r  r  r%  r  r&  r'  r  new_namer  	type_impls   f&&&&&&&,   r  r6  SQLCompiler.bindparam_stringk  sy    !,!%%d+($$T*&&--d33  2266D  $&*&=&=&C&C$'D# &-C 
 )*BBLL	 000//3OCJZZ=222//64.@C##vtn4C &666&>>t||LI)))++NsK
r  c                	    VP                  4       pVP                  R R4       \        VP                  VP                  4       F  w  rEVP
                  ! V 3R V/VB  K  	  R# )cte_optsN)copyr  r%  rE  _independent_ctes_optsr  )r  stmtr  local_kwcteopts   &&&   r  rF  &SQLCompiler._dispatch_independent_ctes  sW    779Z&""D$?$?
HC ""4B#BB
r  c               <    V ^8  d   QhRRRRRRRRRR	R
RRRRRRR/	# )r  r6  rW   r  r*  ashint	fromhintszOptional[_FromHintsType]visiting_cteOptional[CTE]ri  zOptional[FromLinter]r1  zselectable._CTEOptsr  r   r  rs  r  )r   s   "r  r  r    so     V VV V 	V
 ,V $V *V &V V 
Vr  c                	"  a  S P                  4       p	V	S P                  J g   Q hWR &   VP                  p
\        V
\        P
                  4      '       d   S P                  RV
4      p
RpRpVP                  4       pVP                  ;'       g    VP                  pVS P                  9   d   S P                  V,          w  pppVV
8X  g   Q hW3pS P                  V,          pVP                  '       d   VP                  '       d   \        P                  ! R4      hW3pV'       d   \        S P                  4      M^pW3;ppS P                  V VS P                  V&   VV3,           S P                  V&   MIV'       d   \        S P                  4      M^pW3pVS P                  9   d   S P                  V,          pMRpVe   VVJ pVVP                  J g   VVJ d   RpMVVP                  J d2   V	V VP                  4       pVVJ g   Q hVVJ g   Q hS P                  V Ml\!        V4      \!        V4      8X  g4   VP"                  f   VP"                  e   VP%                  V4      '       d   RpM\        P                  ! RV
,          4      hV'       g   V'       g   R# VP&                  eV   VP&                  pVP&                  P                  p\        V\        P
                  4      '       d   S P                  RV4      pMTpRpV'       Ed   VS P                  V&   VV3,           S P                  V&   VS P                  9  d   S P(                  ! V3/ VB  V'       Eg   W9  Ed   VP*                  '       d   RS n        S P.                  P1                  W4      pVP*                  '       g   VP2                  P4                  '       dx   VP2                  pVP7                  R4       UUUUUu. uF  w  pppppV'       d   K  T;'       g    TNK!  	  ppppppVRRP9                  V 3R	 lV 4       4      ,          ,          pVP;                  R
R4      RJ g   Q hS P                  '       g    VP2                  P<                  ! S 3RV/VB # S P>                  ! WP@                  3/ VB p VP2                  P<                  ! S 3RR/VB p!VRV : RV!: R2,          pVPB                  '       d,   VRS P>                  ! WPB                  3/ VB ,           ,          pVW&   V'       d   V'       d   WPD                  VPG                  4       &   V'       g$   V'       d   S P.                  P1                  W4      # V'       ds   S P.                  P1                  VV4      pS P.                  PI                  V
4      '       d   S P.                  PK                  V
4      p
VS PM                  V
4      ,          pV# S P.                  P1                  W4      # R# u upppppi )r<  r  TFz6CTE is stated as 'nest_here' in more than one locationNz5Multiple, unrelated CTEs found with the same name: %rr  r   c              3  r   <"   T F,  pSP                   P                  VSP                  R 7      x  K.  	  R# 5i)r   N)r  format_label_namer  )r?  identr  s   & r  rA  (SQLCompiler.visit_cte.<locals>.<genexpr>Z  s>      " *4 !MM;; % <   *4s   47subqueryr  r   z
(rO  rW  )'r  r  r   r  r   r@   r  _get_reference_ctenestingr  r  r/   r$  r  r  	_restateshash_is_clone_ofcompare
_cte_alias	visit_cte	recursiver  r  format_aliasr  name_cte_columns_generate_columns_plus_namesr   r  r  _generate_prefixes	_prefixes	_suffixesr  r'   _requires_quotesr  get_render_as_alias_suffix)"r  r6  r  r:  r;  r<  ri  r1  r  	self_ctescte_name
is_new_cteembedded_in_current_named_cte_reference_cterE  	cte_levelrT  existing_cte_optscte_level_nameexisting_cteold_level_namenew_level_nameexisting_cte_reference_ctepre_alias_ctecte_pre_alias_namer-  
col_source
proxy_namefallback_label_namer  repeated
recur_colsprefixesr   s"   f&&&&&&&,                         r  rK  SQLCompiler.visit_cte  s    ((*	DII%%%!$~88h 9 9::11'8DH
(-%//1++11!1!1 T333.2.D.D/+Iq+ = ='2N22>BL
 $,,,**1 
 #,!6/6C

OA	3<2GG++N;:F''79GK :&&~6
 ,3DJJI'2N!8!88#66~F##,8L,H) l,,,|0C"
. l+-9-L-L-N*1^CCC1\AAA**+EF
 #Y$|"44  ,,8+88D  KK55 "'J
 **,.67 
 j>>%NNM!$!4!4,h.G.GHH%)%?%?/&"  M!%:69D##N35CG 6D"">2 DII-}77%%#*>===*.D'}}11#@===CKK$@$@$@!$J" )EEdK" L&/$' :+99z9 L  "  F		 " *4	"  D zz*e4===zzz ;;99%+/5   $66]] .4 H  KK::%)-3E h>>D===C$"9"9]]#.4#  D "&	5=!!#--/2"?}}11#@@!}}11#7IJ==11(;;#}}228<H77AA}}11#@@G"s   .XXXc                	    VP                   '       d   R VR&   VP                  '       d   V P                  ! V3/ VB # V P                  ! V3/ VB # )Nri  )joins_implicitly_is_lateralvisit_lateralvisit_aliasr  s   &&,r  visit_table_valued_alias$SQLCompiler.visit_table_valued_alias  sP    ### $B}%%g444##G2r22r  c                	(    V P                   ! V3/ VB # r  )r  r  s   &&,r  visit_table_valued_column%SQLCompiler.visit_table_valued_column  s      /B//r  c
                	  a aa
 V'       d<   R S
9  d   SP                   '       g   Q hSS
R &   V	'       d   RS
9  d   R S
9   d   V	S
R&   Ve[   VP                  SJ dK   SP                  P                  ! S 3RVRVRVRVRVRS/S
B pV'       d   V'       g	   V'       d   RV: R	2pV# SS
R&   V'       g	   V'       dT   \        SP                  \
        P                  4      '       d   S P                  R
SP                  4      pMSP                  pV'       d   S P                  P                  SX4      # V'       Ed   V	'       d   XV	P                  SP                  4       &   SP                  P                  ! S 3RRRV/S
B pV'       d   RV: R	2pVS P                  S P                  P                  SX4      4      ,           pSP                  '       dH   SP                  '       d6   VRRP                  VV
V 3R lSP                    4       4      ,          ,          pV'       d#   SV9   d   S P#                  VSVS,          V4      pV# SP                  P                  ! S 3RV/S
B # )rh  rj  r  r:  iscrudr;  lateralenclosing_aliasrM  rO  r  Tr  r   c              3    <"   T Fz  pSP                   P                  VP                  4      : SP                  '       d9   R SP                  P
                  P                  ! VP                  3/ SB ,          MR: 2x  K|  	  R# 5i) %sr  N)r  r  r   _render_derived_w_typesr  r"  r  r  )r?  r'  r  r  r  s   & r  rA  *SQLCompiler.visit_alias.<locals>.<genexpr>  s}       $+C !MM//9 $)#@#@#@	 !&"&,,"E"E"M"M$'HH#"06#"!"
 &(!(	 $+s   <B AB)rl  r  r  r  r   r   r@   r  r  rM  r  r'   rT  _supports_derived_columns_render_derivedr   r  format_from_hint_text)r  r  r  r:  ru  r;  rC  rv  rw  ri  r  r   
alias_namer  s   ff&&&&&&&&l   r  rn  SQLCompiler.visit_alias  sb    "&0 (((((.3*+
 )7'610;,-&?+B+Be+KMM44		 	 		
 $	  	 !&	 	E Vw"')L(-F$%V%**h&?&?@@!77L
"ZZ
==--eZ@@V7A!!%//"34MM44!+26<E x"')$99**5*= C ...53H3H3HvII  $)77  $ Ui/00	% 0& J ==33%)/ r  c                	2    R VR&   V P                   ! V3/ VB # )TrC  rn  )r  rC  r  s   &&,r  visit_subquerySQLCompiler.visit_subquery  s!    :/B//r  c                	@    R VR&   RV P                   ! V3/ VB ,          # )Trv  z
LATERAL %sr  )r  lateral_r  s   &&,r  rm  SQLCompiler.visit_lateral  s&    9d..x>2>>>r  c                	    V P                   ! V3R R/VB : RVP                  4       P                  ! V 3/ VB : 2pVP                  e,   VRVP                  P                  ! V 3/ VB ,          ,          pV# )r  Tz TABLESAMPLE z REPEATABLE (%s))rn  _get_methodr  seed)r  tablesampler  r  r-  s   &&&, r  visit_tablesampleSQLCompiler.visit_tablesample  s}    [<<<##%88DD

 '&  33D?B? D r  c                	   a aa SP                  R SP                  4       RP                  VVV 3R lSP                   4       4      pRV 2# )r  r   c           	   3     <"   T FM  pV FD  pSP                   ! \        P                  ! VR SP                  / P	                  4       3/ SB x  KF  	  KO  	  R# 5i)r  N)r  r   r   _column_typesr5  )r?  chunkelemr  r  r  s   &  r  rA  -SQLCompiler._render_values.<locals>.<genexpr>  sb      	
 ' LL26!//*, 	  's   AArA  )
setdefaultr  r   _data)r  r  r  tupless   ffl r  _render_valuesSQLCompiler._render_values  sG    
ow'<'<= 	
 !	
 	
 !!r  c           
     	H  a a VP                   '       d   S P                  VS4       S P                  ! V3/ SB pVP                  '       d   R pMS\	        VP
                  \        P                  4      '       d   S P                  RVP
                  4      pMVP
                  pVP                  '       d   RpMRpV'       d   V'       d$   Ve   TMRVP                  VP                  4       &   Ve<   VP                  VJ d,   VP                  '       d   \        P                  ! R4      h V# V'       df   RSR&   V: RV: R	S P                  S P                   P#                  V4      4      : R
RP%                  VV 3R lVP&                   4       4      : R	2pV# V: RV: R	2pV# )Nr  zLATERAL r  z(unnamed VALUES element)z5Can't use a LATERAL VALUES expression inside of a CTEFr   rM  rO   (r   c              3  J   <"   T F  pVP                   ! S3/ SB x  K  	  R # 5ir  r  rl  s   & r  rA  +SQLCompiler.visit_values.<locals>.<genexpr>G  s(      "%4 00<<%4rC  )rE  rF  r  _unnamedr  r   r   r@   r  rl  r  r'   r  r/   r$  rT  r  r  r   columns)	r  r  r  ri  r<  r  r  r   rv  s	   f&&&&l   r  visit_valuesSQLCompiler.visit_values   sn    $$$++GR8.2.Dh&?&?@@--hED<<D GG ,D2L !!'"3"3"56 'L,@,@G,K&&&**O  '&  &+?#33DMM4G4G4MN		 "%,__" 
  !(+r  c                	0    R V P                   ! V3/ VB  R2# r  )r  r  s   &&,r  visit_scalar_valuesSQLCompiler.visit_scalar_valuesQ  s"    4&&w5"56a88r  c                	    R V,           # )r   r  )r  alias_name_texts   &&r  rT  &SQLCompiler.get_render_as_alias_suffixT  s    ''r  c          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r  r   r   r   r   r   r  r  r  r  r  )r   s   "r  r  r  W  s<     
 

 
 !	

 
 

r  c                	    V'       g   Q hVe   VR8X  d   RV n         RV n        VP                  '       d   \        P                  ! R4      hV P
                  P                  \        WW44      4       R # )N*FTzxMost backends don't support SELECTing from a tuple() object.  If this is an ORM query, consider using the Bundle object.)rn  rm  r  r/   r$  r  r  r   r  s   &&&&&r  rH  SQLCompiler._add_to_result_mapW  sj     w?gn$)D!#'D ""4 
 	##wg=	
r  c                <    V P                   ! RTTRVf   / MT3/ VB # )a$  Render 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

NF)_label_select_column)r  r4  r|   rN  column_clause_argsr  s   &&&&&,r  _label_returning_column#SQLCompiler._label_returning_columnp  s8     (($,B2D
 
 	
r  c                  aa SP                   P                  V P                  4      pVP                  '       d#   V'       g	   V'       d   VP	                  S4      pMSpV'       d.   V P
                  pV
'       d
   VoV3R lpMVSJd
   VoVV3R lpMRpV	'       g   Q R4       h\        S\        P                  4      '       d0   VSJd&   \        VSP                  SP                  3R7      pEMTpEMV'       d(   Vf   Q R4       h\        VVVSP                  3R7      pEMVSJd   RpEM;\        S\        P                  4      '       d3   T;'       d(    SP                  '       * ;'       d    SP                  RJpM\        S\        P                   4      '       d   RpM\        S\        P"                  4      '       dt   SP$                  \&        P(                  \&        P*                  39   ;'       d$    V P                  P,                  '       * ;'       g    SP/                  4       ;'       g    TpM3\        S\        P0                  4      '       g   SP2                  f   RpMRpV'       df   V'       g   V
'       d   Q hSP4                  p\        V\        P6                  4      '       g   \        P6                  ! V4      MTp\        WV3R7      pMTpVP9                  V	VVR	7       VP:                  ! V 3/ VB # )
z.produce labeled columns present in a select().c                   < S! WV 3V4       R # r  r  )r   r   r   r  rH  s   &&&&r  r  ;SQLCompiler._label_select_column.<locals>.add_to_result_map  s    &wwj%Hr  c                ,   < S! WS3V,           V4       R # r  r  )r   r   r   r  rH  r|   s   &&&&r  r  r    s    &y7':Er  NzX_label_select_column is only relevant within the columns clause of a SELECT or RETURNING)r(  z*proxy_name is required if 'name' is passedTF)r  r  r   )r  r  r  _has_column_expressioncolumn_expressionrH  r  r   rG   r"  r   r  r  rD   r  r   
TextClauseUnaryExpressionr  r   is_falseis_truer]  _wraps_unnamed_columnNamedColumn_non_anon_label_anon_name_labelr@   r  r  )r  r   r|   rN  r  r  r   rd  re  r  column_is_repeatedneed_column_expressionsr   r  col_exprr  result_exprrender_with_labelrH  s   &&f&&&&&&&&&&     @r  r   SQLCompiler._label_select_column  s     {{''5&&&#':--f5HH
 !% 7 7
 "%6"I
 '%6" !% % 	
:	
$ fhnn--v%+fkkfnn5F ' &<;<& ( $$K& v% %)!FH$9$9::  1 1"---1 1D0 "
 FH$7$788$)!FH$<$<==P %..	0A0ABC E E $ D DD
 
 335
 
  "" vx';';<< **2$(!$)! *
  211*0*A*A' &+X-F-F  --.AB - $ ,j] '!!"7/' 	" 	

 --dI6HIIr  c                	X    V P                  W#4      pV'       d   VR V,           ,          pV# rz  )get_from_hint_text)r  r  r   hintru  hinttexts   &&&&& r  r~  !SQLCompiler.format_from_hint_textV  s(    **57sX~%Gr  c                	    R # r  r  )r  byfromss   &&r  get_select_hint_text SQLCompiler.get_select_hint_text\      r  c               $    V ^8  d   QhRRRRRR/# )r  r   rX   r-  rs  r  r  )r   s   "r  r  r  _  s$      '4	r  c                	    R # r  r  r  r   r-  s   &&&r  r  SQLCompiler.get_from_hint_text_  s     r  c                	    R # r  r  r  s   &&&r  get_crud_hint_textSQLCompiler.get_crud_hint_textd  r  r  c                	$    R P                  V4      # rz  rn  )r  
hint_textss   &&r  get_statement_hint_text#SQLCompiler.get_statement_hint_textg  s    xx
##r  r(  rD  r%  r$  c                	J   V P                   '       * pV'       d   V P                  MV P                   R,          pVP                  W4      pVR,          pVR,          p	V'       d-   V'       g%   VP                  VP	                  V	4      RR7      p
V
# VP                  VV	R7      p
V
# )r  r%  r$  explicit_correlate_fromsimplicit_correlate_fromsr  r  )r  rD  r  _get_display_froms
difference)r  select_stmtr  rv  r  rL  r  r)  r%  r$  r  s   &&&&,      r  _display_froms_for_select%SQLCompiler._display_froms_for_selectq  s     zz>-5))4::b>#::;M 12^,'!44)8)C)C * *,	 5 E 	 "44)8)5 5 E r  r   translate_select_structurec	                		  a% Ve   Q R4       hRV	R&   VP                   ! W3/ V	B p
V
P                  V	R&   V
P                  pV P                  '       * pV'       d   V P                  '       g   Wn        VR J;'       g    TpV P
                  '       d@   V P
                  ! V3RV/V	B pWJd&   T
pTpTpVP                   ! W3/ V	B p
V
P                  pV'       d   V P                  MV P                  R,          pT;'       g-    VP                  RR4      ;'       g    VP                  RR4      ;ppV'       d   RpV'       g   RV	9   d   V	R V P                  WWWu4      pV	P                  4       pVP                  R	RRR/4       R
pVP                  '       d.   V P                  V4      w  ppV'       d   VVR,           ,          pMR pVP                  '       d   V P                  W4       VP                  '       d%   VV P                   ! WP                  3/ V	B ,          pVV P"                  ! V3/ V	B ,          pV
P$                   UUUUUu. uF$  w  pppppV P'                  VVVVVVVVVVR7
      NK&  	  uppppp Uu. uF  pVf   K	  VNK  	  ppV'       d   Ve   \)        \+        V
P$                   UUUUUu. uF  w  pppppVNK  	  upppppXP$                   UUUUUu. uF  w  pppppVNK  	  uppppp4      4      o%V P,                   UUUU u. uFF  w  pppp \/        TT\0        ;QJ d    . V%3R lV 4       F  NK  	  5M! V%3R lV 4       4      V 4      NKH  	  up pppV n        V P3                  VVV
VVVVV	4      pVP4                  '       dg   VP4                   U!U"u. uF'  w  p!p"V!RV P6                  P8                  39   g   K%  V"NK)  	  p#p!p"V#'       d    VRV P;                  V#4      ,           ,          pV P<                  '       dI   V'       d	   V'       d9   V'       g   \?        V P                  4      MR p$V PA                  V$R7      V,           pVPB                  '       d,   VRV P                   ! WPB                  3/ V	B ,           ,          pV P                  PE                  R4       V# u upppppi u upi u upppppi u upppppi u up pppi u up"p!i )NzpSQLAlchemy 1.4 requires use of the translate_select_structure hook for structural translations of SELECT objectsFr  r  r  r,  r+  r  r  zSELECT rW  )r   rd  re  r  r  c              3  F   <"   T F  pSP                  W4      x  K  	  R # 5ir  r  )r?  or  s   & r  rA  +SQLCompiler.visit_select.<locals>.<genexpr>;  s     $F#QY]]1%8%8#   !r  rB  r  )#r  _ambiguous_table_name_mapr3  r  r)  r  rD  r  _setup_select_stackr2  r  _hints_setup_select_hintsrE  rF  rQ  rP  get_select_precolumnscolumns_plus_namesr  r#  r%  r  r   rE  _compose_select_body_statement_hintsr  r   r  r  r  rI  rR  r  )&r  r  r  insert_intor;  rK  select_wraps_forrv  ri  r  r)  rL  is_embedded_selectnew_select_stmtcompile_state_wraps_forr  rN  r  r  r  r-  	hint_textbyfromr   rd  re  r|   rf  r  inner_columnsr@  r  r  dialect_namehtper_dialectrC  r  s&   &&&&&&&&&,                           @r  visit_selectSQLCompiler.visit_select  s7     ' 	
-	
' +0&'#::
!'
 33 	)* $--zz>D...!.+47FF;
 ***"==$*.4O 1*7'#. - + B B!)/! ,55-5))4::b>  > >yy7?> >yy5u=	
5 "'
 #':f'D*+((w
 $[[]!!"E+BEJ	
  $ 8 8 EIv	C'F(((++K@   D++226< D 	**;A&AA. #55'& 6'# ))'&)(;'/,C * $ 6'
* - A 	 
4 #3#?  +==	 >&/ $  >	$ 5GG	 H&/ $  H	I: .2-A-A	$ .B)CsE #uu$F#$Fuu$F#$FF .B	$D  ((	
 ''' +6*F*F*F&\2C):):#;; *F  
 d::;GGG 9990H3;C

OM***G$ND   C$11226<  D 	

ry
@		$&s1   *R.>R7	R79R<"SAS
#"S
Sc                    V ^8  d   QhRRRR/# )r  r   r.  r  zTuple[str, _FromHintsType]r  )r   s   "r  r  r  b  s     
! 
!!
!	#
!r  c                	   VP                   P                  4        UUUu/ uFC  w  w  r#pVR V P                  P                  39   g   K'  W$RVP	                  V RR7      /,          bKE  	  ppppV P                  V4      pWe3# u upppi )r  r   T)r:  )r  r  r  r   r  r  )r  r   r  r  r  r  r  s   &&     r  r  SQLCompiler._setup_select_hintsb  s     /5mm.A.A.C
 /D* (3 1 122DEu//T/BCD D.C 	 
 --f5	  
s   $B  B c           	     	T   VR ,          pVR,          pV^ 8X  d   WR&   M{V'       dt   VR,          p	\        V	P                  4      p
\        VP                  4      V
8w  d<   \        P                  ! R^V
V^,           \        VP                  4      3,          4      hV'       d,   V'       g$   VP                  VP                  V4      RR7      pMVP                  VVR7      p\        \        V!  4      pVP                  V4      pRVR VRVRV/pV P                  P                  V4       V# )r%  r$  r-  z}All selectables passed to CompoundSelect must have identical numbers of columns; select #%d has %d columns, select #%d has %dr  r"   r)  r  )r  r  r  r/   r$  r  r  r   r(   r   r  r  )r  r   r)  r  r  rv  rK  r%  r$  r-  numcolsr  new_correlate_fromsall_correlate_fromsrM  s   &&&&&&&        r  r  SQLCompiler._setup_select_stackn  sC      12^,Q &*Z(H(889G=334?&&!
 &*F889			  '!44)8)C)C * *,	 5 E "44)8)5 5 E
 "-"78177H /2&]	*
	 	

)$r  c	                	J   VR P                  V4      ,          pV P                  \        ,          '       d;   \        / \	        4       4      p	V P                  \
        ,          p
V'       d   Wn        MRp	Rp
V'       g   VP                  4       pV'       d   VR,          pVP                  '       dA   TR P                  V Uu. uF  pVP                  ! V 3RRRVRV	/VB NK  	  up4      ,          pMTTR P                  V Uu. uF  pVP                  ! V 3RRRV	/VB NK  	  up4      ,          pMWP                  4       ,          pVP                  '       d8   V P                  ! VP                  3RV	/VB pV'       d   VRV,           ,          pV
'       d   V	f   Q hV	P                  4        VP                  '       d   WP                  ! V3/ VB ,          pVP                   '       d6   V P                  ! VP                   3/ VB pV'       d   VR	V,           ,          pVP"                  '       d   WP$                  ! V3/ VB ,          pVP&                  '       d   WP(                  ! V3/ VB ,          pVP*                  e   WP,                  ! V3/ VB ,          pV# u upi u upi )
r   NFz 
FROM r  Tr;  ri  z 
WHERE z	 
HAVING )r   r  r|  r  r   r}  ri  rstripr  r  r  _where_criteriar|  r  _group_by_clausesr  _having_criteria_order_by_clausesr  r  r  _for_update_argfor_update_clause)r  r-  r   r)  r  r  r  rL  r  ri  warn_lintingfts   &&&&&&&&&    r  r   SQLCompiler._compose_select_body  s    			-((<<444$R/K<<,6L#. K L ;;=DJD}}}		 "'	 "'A ,, #' '- )4	
 % "'	  		 "' "'A ,, #' )4 %	 "'
 
 %%''D!!!11&&4?CIA a'***###((:6::D"""11''+1A q((###((:6::D*****6<V<<D!!-**6<V<<Dq	s   ?"J
? J 
c                	d   a a R P                  VV 3R lV 4       4      pV'       d
   VR ,          pV# )rW  c              3     <"   T F>  w  rVR9   g   VSP                   P                  8X  g   K)  VP                  ! S3/ SB x  K@  	  R # 5i)N)Nr  )r  r   r  )r?  prefixr  r  r  s   &  r  rA  1SQLCompiler._generate_prefixes.<locals>.<genexpr>  sF      
(0${*ldll>O>O.O 2F%%d1b1(0s
   &A	A	rn  )r  r4  rh  r  r  s   f&&l r  rP  SQLCompiler._generate_prefixes  s1     
(0
 

 cMFr  c                *   V P                   '       g   R# V'       d   V^8  d   \        P                  ! 4       p\        V P                   P	                  4       4       F  pV P
                  VP                  4       ,          w  rVpVP                  ;'       g    VP                  pWQ8H  ;'       g    T;'       d    WQ^,           8H  p	V'       d	   V	'       g   Kz  V P                   V,          W4&   K  	  MV P                   pV'       g   R# \        V Uu. uF  qDP                  NK  	  up4      p
V P                  V
4      R,           pTRP                  VP                  4        Uu. uF  qNK  	  up4      ,          pVR,          pV'       d   V^8  d{   \        VP	                  4       4       F]  pV P
                  VP                  4       ,          w  rVpV P                   V V P                  WV3 V P
                  VP                  4        K_  	  V# u upi u upi )z
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  rW  , 
z
 )r  r$   r  r  keysr  rD  rE  rp   rL  get_cte_preambler   r  r  )r  rC  r  r  r6  rZ  rV  r1  rE  is_rendered_levelr  cte_texttxts   &&&          r  rI  SQLCompiler._render_cte_clause  s    yyy ]Q.##%DDIINN,-040F0F**,1-	X ++99)9)9$-$> % %+NN	Q=N0N "  $5 IIcN	 . 99Dt<tmmt<=((83>FKK > >??E]Q.DIIK(040F0F**,1-	X IIcN++Y,AB**3+A+A+CD )  = !?s   H 
H
c                	    V'       d   R # R# )zWITH RECURSIVEWITHr  )r  rL  s   &&r  r  SQLCompiler.get_cte_preamble@  s    #r  c               $    V ^8  d   QhRRRRRR/# )r  r   r.  r  r   r  r   r  )r   s   "r  r  r  F  s!     7 7K 7s 7s 7r  c                    VP                   '       d   \        P                  ! RRR7       VP                  '       d   R# R# )zSCalled when building a ``SELECT`` statement, position is just
before column list.

a  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.z1.4versionr   r  )_distinct_onr$   warn_deprecated	_distinctr  r   r  s   &&,r  r  !SQLCompiler.get_select_precolumnsF  s@    
   3
  %...{6B6r  c                    V P                   ! VP                  \        \        P                  ,          3/ VB pV'       d
   RV,           # R# )z5allow dialects to customize how GROUP BY is rendered.z
 GROUP BY r  )rp  r  r  r   comma_op)r  r   r  group_bys   &&, r  r  SQLCompiler.group_by_clauseV  sE     00$$i	0B0B&C
GI
 (**r  c                    V P                   ! VP                  \        \        P                  ,          3/ VB pV'       d
   RV,           # R# )z5allow dialects to customize how ORDER BY is rendered.z
 ORDER BY r  )rp  r
  r  r   r+  )r  r   r  r  s   &&, r  r  SQLCompiler.order_by_clausea  sE     00$$i	0B0B&C
GI
 (**r  c                	    R # )z FOR UPDATEr  r(  s   &&,r  r  SQLCompiler.for_update_clausem  s    r  c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# r  r4  r=   returning_colszSequence[_ColumnsClauseElement]rN  r*  r  r   r  r   r  )r   s   "r  r  r  p  s<     1 11 81
 "1 1 
1r  c               	   VP                  R \        P                  ! V4      R7       UUUUU	u. uF&  w  ppppp	V P                  ! VVV3RVRV	RVRV/VB NK(  	  p
ppppp	RRP	                  V
4      ,           # u up	ppppi )T)colsre  r  r   rd  
RETURNING r   )rO  r   _select_iterablesr  r   )r  r4  r4  rN  r  r   rd  re  r|   rf  r  s   &&&$,      r  returning_clauseSQLCompiler.returning_clausep  s    2 22411.A 3 #
"# ((#	 %8		
 $,	 	 &	 	 # 	 
, dii000-
s   ,A8c                	   R pVP                   e,   VRV P                  ! VP                   3/ VB ,           ,          pVP                  eC   VP                   f
   VR,          pVRV P                  ! VP                  3/ VB ,           ,          pV# )r  z
 LIMIT z

 LIMIT -1z OFFSET )_limit_clauser  _offset_clause)r  r   r  r-  s   &&, r  r  SQLCompiler.limit_clause  s    +K$,,v/C/C"Jr"JJJD  ,##+%Jf.C.C!Jr!JJJDr  c                	@   Vf   VP                   pVP                  pMRRRR/pRpVP                  e`   VP                  pV'       d(   VP                  V4      '       d   VP	                  4       pV P
                  ! V3/ VB p	VRV	,          ,          pMV'       d
   VR,          pVew   V'       d(   VP                  V4      '       d   VP	                  4       pTRV P
                  ! V3/ VB : VR,          '       d   RMR: R	VR,          '       d   R
MR: 2,          pV# )Nr  F	with_tiesr  z
 OFFSET %s ROWSz
 OFFSET 0 ROWSz
 FETCH FIRST z PERCENTz ROWS z	WITH TIESONLY)r  _fetch_clause_optionsr=  _simple_int_clauserender_literal_executer  )
r  r   r  require_offset"use_literal_execute_for_simple_intr  fetch_clause_optionsr-  offset_clause
offset_strs
   &&&&&,    r  r  SQLCompiler.fetch_clause  s    !//L#)#?#? $-uk5#I   ,"11M2--m<< - D D Fm:r:J'*44D&&D#2--l;;+BBD\0R029==
2E3K@@fL D
 r  c
                	   V'       d   VP                   VP                  V&   V'       g
   V'       EdO   V P                  P                  V4      pV'       dV   V'       dN   V P                  P	                  V4      R ,           V P                  P                  VP                  4      ,           pMV P                  P                  VP                  4      pV	e   V	P                  VJdu   V'       gm   V'       de   VP                  V9   dT   V P                  RWP                  ,          4      pWP                  V P                  P                  RV4      4      ,           pV'       d    W9   d   V P                  WWQ,          V4      pV# R# )rS  Nr  r  )fullnamer  r  r	  r
  r  r   r  r  rT  rM  r~  )r  r   r  ru  r:  r;  
use_schemari  r  rw  r  r  r  	anon_names   &&&&&&&&&&,   r  visit_tableSQLCompiler.visit_table  s1    ',~~Ke$VV#}}>>uE.MM../?@mm))%**56  mm))%**5 (/*22%?,0

&>> $ : :!9**!E!I  ? ?224C! C U/00	 0& Jr  c                	0   V'       dk   VP                   P                  \        P                  ! \	        VP
                  P                  4      \	        VP                  P                  4      4      4       VP                  '       d   R pMVP                  '       d   RpMRpVP
                  P                  ! V 3RRRV/VB V,           VP                  P                  ! V 3RRRV/VB ,           R,           VP                  P                  ! V 3RV/VB ,           # )z FULL OUTER JOIN z LEFT OUTER JOIN z JOIN r  Tri   ON )r  r  r  rl  r'   r   r(   r   r   isouterr  onclause)r  r   r  ri  r  	join_types   &&&&, r  
visit_joinSQLCompiler.visit_join  s   $$!!dii556djj667 999+I\\\+I III((!/:>D  jj++!/:>D	  mm.."-17	
r  c                	4   VP                   P                  4        UUUu/ uF)  w  w  r4pVR V P                  P                  39   g   K'  W5bK+  	  ppppVP                  V9   d.   V P                  W!P                  WaP                  ,          R4      pWb3# u upppi )r  T)r  r  r  r   r   r~  )r  r4  
table_textr   r  r  dialect_hintss   &&&    r  _setup_crud_hintsSQLCompiler._setup_crud_hints  s     04{{/@/@/B
/B+ )3 1 122 E/B 	 

 ::&33JJjj(A4J ((
s   $BBc                    V ^8  d   QhRRRR/# )r  r   rR   r  rW  r  )r   s   "r  r  r  B  s     < <<	(<r  c                   V P                   P                  pVP                  pVP                  pVf   R# VP                  '       d(   V P
                  P                  VP                  ^ 4      pM&V P                  P                  VP                  ^ 4      pW%,          '       d   V# VP                  '       d9   \        P                  ! RV^ ,           RV P                   P                   R24      hR# )a  given a :class:`.Table`, return a usable sentinel column or
columns for this dialect if any.

Return None if no sentinel columns could be identified, or raise an
error if a column was marked as a sentinel explicitly but isn't
compatible with this dialect.

NzColumn z@ can't be explicitly marked as a sentinel column when using the a   dialect, as the particular type of default generation on this column is not currently compatible with this dialect's specific INSERT..RETURNING syntax which can receive the server-generated value in a deterministic way.  To remove this error, remove insert_sentinel=True from primary key autoincrement columns; these columns are automatically used as sentinels for supported dialects in any case.)r  "insertmanyvalues_implicit_sentinel _sentinel_column_characteristicsr  
is_autoinc_sentinel_col_autoinc_lookupr  default_characterization _sentinel_col_non_autoinc_lookupis_explicitr/   rD  r   )r  r   sentinel_optssentinel_characteristics	sent_colsbitmasks   &&    r  _get_sentinel_column_for_table*SQLCompiler._get_sentinel_column_for_tableB  s     GG#(#I#I ,44	#...77;;(AA1G ;;??(AA1G ""#/// )))A, (><<$$% &@
@  r  c               8    V ^8  d   QhRRRRRRRRR	R
RRRRRR/# )r  r3  r   r4  re   compiled_parametersz%List[_MutableCoreSingleExecuteParams]generic_setinputsizesra  
batch_sizerS  rU  r*  r  r  r  z Iterator[_InsertManyValuesBatch]r  )r   s   "r  r  r    sf     Y YY -Y C	Y
  CY Y "&Y ?Y 
*Yr  c              #  	  a aa@aAaBaCaD"   S P                   pVf   Q hVP                  '       g   R p	M\        P                  ! VP                  !  p	\	        V4      p
VP
                  '       d"   S P                  P                  '       g   RpRpM_S P                  P                  '       d;   V'       d8   S P                  '       d&   VP                  e   VP                  '       d   RpRpMRpRpV'       dV   \        \        R\        W#4      4      ^4       F0  w  pw  r\        TTSV.V	'       d
   V	! V4      .M. ^VV
VV4
      x  K2  	  R # V'       d.   \         P"                  ! S P$                  P&                  VR7      pMR pVP(                  pV'       d	   V! V4      pRV R2pVP+                  VR4      pS P                  P,                  pV'       dN   \	        S P.                  4      p\	        VP0                  4      pVV,
          p\3        VVV,
          V,          4      p\        R\5        V4      4      p\        R\5        V4      4      pR p^pW,          W,          '       d   ^M^ ,           pVP0                  pVf   Q hV'       d'   V UUUUu. uF  w  ppppVVV! V4      V3NK  	  ppppp^ ;oCoDS P6                  '       g   S P8                  '       d   S P8                  oAM/ oA\;        V^ ,          4      p VAV 3R	 lo@VP<                  '       d   R
p!MRp!RRP?                  V@3R lV 4       4       V! R2p"V PA                  VA3R lV 4       4      p#V PC                  V#4       Uu/ uF  pVV^ ,          V,          bK  	  p$pRoBEM'Rp"\;        4       p#/ p$VP<                  '       d   RV R2oBMRV R2oB\;        4       p%VP0                   F  p&V%PE                  V&^,          4       K  	  V%'       dq   S PF                  p'V'f   Q h\        V'4       U(U)u0 uF  w  p(p)V)V%9   g   K  V(kK  	  p*p(p)\3        V*4      oC\I        V*4      ^,           oD\	        V*4      SDSC,
          8X  g   Q hS PJ                  '       d<   \L        PN                  ! S PP                  4      p+\L        PR                  ! V+ R2RSB4      oBV'       Ed   V^ V p,V^ V p-. V^ V% . V^ V% V'       d   Tp.M\	        V,4      p.S'       d0   V3R l\U        V.4       4        U/U0U1u. uF  w  p/p0p1V/V0V13NK  	  pp0p/p1S P6                  '       Edl   VPV                  p2V2\	        V,^ ,          4      8X  d   R;p3p4T,p5M%V,^ ,          R SC p3V,^ ,          SDR  p4VCVD3R lV, 4       p5VP<                  '       d)   RP?                  VB3R l\        V,4       4       4      R R p6MSBV.,          R R p6S PJ                  '       dz   V2^ 8  ds   V4'       d   Q hSC^,           p7V2V.,          V7,           p8\X        ;QJ d!    . V 3R l\U        V7V84       4       F  NK  	  5M! V 3R l\U        V7V84       4       4      p9V6V9,          p6VP+                  RV64      p:\Y        \Z        P\                  P_                  V54      4      p;V3V;,           V4,           p;M. p<V$Pa                  4       p;\        V,4       F  w  p=pV"P+                  R\c        V=4      4      p>VP<                  '       d   V>P+                  R\c        V=4      4      p>V<Pe                  V>4       T;PE                  V# Uu/ uF  pV RV= 2VV,          bK  	  up4       K  	  VP+                  RRP?                  V<4      4      p:\        T:T;TT,V	'       d   V- U?u. uF  p?V	! V?4      NK  	  up?M. V.VVVR4
      x  V^,          pEK  R # u uppppi u upi u up)p(i u up1p0p/i u upi u up?i 5i)NTFzKSequence[Tuple[_DBAPISingleExecuteParams, _MutableCoreSingleExecuteParams]]r  rM  rO  __EXECMANY_TOKEN__zList[Sequence[Any]]c                   < V  FO  pSP                  W"4      pVP                  SP                  R V/,          SP                  R V R2/,          4      pKQ  	  V# )r   __EXECMANY_INDEX__)r  r+  ri  )r  	formattedr@  r{  r  s   && r  apply_placeholdersISQLCompiler._deliver_insertmanyvalues_batches.<locals>.apply_placeholders  se    C,00:C ) 1 1))VSM9))!cU*<#=>?!I   ! r  z, _IMV_VALUES_COUNTERr  r   c              3  <   <"   T F  w   rpS! W24      x  K  	  R # 5ir  r  )r?  rT  ru  	bind_keysrv  s   &   r  rA  @SQLCompiler._deliver_insertmanyvalues_batches.<locals>.<genexpr>  s'      62D.AqY #9882Ds   c              3  `   <"   T F#  w    rV F  pSP                  W34      x  K  	  K%  	  R # 5ir  r  )r?  rT  ry  r@  r{  s   &   r  rA  rz  !  s:      4*<&Aq!$C #&&s00$ 1*<   +.z, _IMV_VALUES_COUNTER), z), z\d+r  c              3  N   <"   T F  pS F  w  r#pV R V 2W43x  K  	  K  	  R# 5i)rT  Nr  )r?  r  r@  len_r6  rn  s   &    r  rA  rz  g  s9      /%>E.CNCs  5%)45.C 6%>   "%c              3  .   <"   T F
  pVSS x  K  	  R # 5ir  r  )r?  r  expand_pos_lower_indexexpand_pos_upper_indexs   & r  rA  rz  |  s!      &!&A 01GH!&s   c              3  ^   <"   T F"  w  rSP                  R \        V4      4      x  K$  	  R# 5i)_IMV_VALUES_COUNTERN)r+  r   )r?  rJ  rT  executemany_values_w_commas   &  r  rA  rz    s7        )9 7>> 5s1v  )9s   *-c              3  D   <"   T F  pSP                    V 2x  K  	  R # 5ir  )rk  )r?  rJ  r  s   & r  rA  rz    s(      &!2A  >>?sC!2s    EXECMANY_INDEX__r  __r  )3rw  rZ  r  r  r  rP  r  supports_default_metavaluesupports_multivalues_insertr  rX  rV  rI  r   r%  r^  	functoolspartialr  r  rQ  r+  insertmanyvalues_max_parametersre  rR  minr  r  r{  r   r\  r   r  r  r  r8  r  rp  r  r  rk  r  rangerT  rE  r  r  from_iterabler2  r   r  )Er  r3  r4  rm  rn  ro  rU  r  imv_sentinel_from_params	lenparamsuse_row_at_a_time
downgradedrf  paramcompiled_paramrstimv_single_values_exprexecutemany_values
max_paramstotal_num_of_paramsnum_params_per_batchnum_params_outside_of_batchbatchescompiled_batchesrb  rg  rR  r'  r@  r]  stall_keysimv_values_counterformatted_values_clausekeys_to_replacebase_parametersall_names_we_will_expandr  r8  r  r   all_expand_positionsescapedrc  compiled_batchre  new_keyr~  r6  num_ins_paramsextra_params_leftextra_params_rightbatch_iteratorexpanded_values_stringr  r   r  r_  r`  replaced_values_clausesrJ  fmvr  rv  r{  r  r  r  sE   f&&&f&&&                                                        @@@@@r  !_deliver_insertmanyvalues_batches-SQLCompiler._deliver_insertmanyvalues_batches  s`     $$&&&$(!$,$7$7((%! 
O	t||'N'N'N !%J999#$$$%%-1N1N1N
 !%J %J5>a
8 6115 -)G 1 /~>?+ 6. ##77%9C
 C!$!7!7%()?%@" !7 8:%%&8:NO	 \\AA
"%doo"6#&s'='=#> #&:: ( "==+,J ,d:.>?!4(;#<
 HL!/''AQ
 !33!--- +="*<&CdB c3t9b)*<  " ;<;!7&&&%)%<%<"%'":a=)H! '''%<"%'"*+DII 62D6 - , ""!''#
 '33 4*<4 O $..??C Z]3''?   *,&&(#!eO O'''.//GH + 011G0H-L*14$..(//Q8 / (".."... &/{%;(%;	T77 C%; % (
 *--A)B&),-A)BQ)F&,--0FFGG """))D$G$GH-/VVy$d,F.* gAj)E-a
;N$&GAj!-/Qz*%/"%(Z"$/%*+=%>/+/*s dC(/ ( + !$!B!B "Sq]2=??%(:%*N(-a1H2H(I%).q2H2I)J&&!&&N
 +++   )2%(8	   r.* 46HHr.* &&&>A+=  2112Q6E(,>?%GC !& &!&uc!2& &!&uc!2& !I .Di-O*%.%6%6(*@&" ',OO11.A'#
 &)*() $ +-'&5&:&:&<# )% 0HAu199*CFC ///!kk*?QH+2237'..>MNosC51#c
2oN !1 &/%6%6(II56&"
 )"#' - :HH2*2.H"'   MHI o"P:(D+x O Is   $_A_ _)_1__#_4A_A_=_B3__^$
'__B_"^,<A/_, _^1^1#A
_.A_2__$_=^7_&A _A__%_D_^>
4A_5_A_c                	  a a& VP                   ! VS 3/ VB pVP                  pVe   W4R&   RpMS P                  '       * pV'       d:   RS n        S P                  '       g   VS n        S P
                  '       g   VS n        S P                  P                  R\        4       R\        4       RV/4       ^ pR pS P                  '       d   Vf   . p\        P                  ! S VVV3RV/VB pS P                  '       dQ   VeM   \        V4      pS P                  '       d0   S P                  e   S ;P                  V,          un        MVS n        VP                  p	V	'       g   S P                  P                   '       gj   S P                  P"                  '       gN   S P                  P$                  '       g2   \&        P(                  ! RS P                  P*                  ,          4      hVP,                  '       d   S P                  P.                  '       g2   \&        P(                  ! R	S P                  P*                  ,          4      hS P0                  '       g   VP2                  '       d)   VP4                  '       d   \&        P(                  ! R
4      hVP                  p	MVP                  p	S P6                  p
S P                  P                   pRpVP8                  '       d%   VS P:                  ! WP8                  3/ VB ,          pVR,          pV
P=                  VP>                  4      pVP@                  '       d   S PC                  W4      w  rVPD                  '       d   S PG                  W4       W,          pV	'       g	   V'       g5   TRRPI                  V	 UUu. uF  w  r qNK
  	  upp4      ,          ,          pVPJ                  pR pR pRpS P0                  ;'       g    VP2                  pV'       Ed*   VPL                  pVe   V'       g   Q hV	 UUUu/ uF  w  p ppVVbK  	  pppp. pV FB  pVV9  d   R p M8S PO                  V4      pVVV,          9  d   R p MVP                  V4       KD  	  VfU   S P                  PP                  \R        PT                  ,          '       d   RpM V^ ,          PV                  '       d   Q R4       h\Y        V4      \Y        V4      ,           pS P[                  VVVR7      pS P\                  '       d   VRV,           ,          pMR pVP^                  e   S P`                  ! S P                  R$,          R,          3RR/VB pS Pb                  '       d_   S P                  Pd                  '       dC   V'       g   \        S P                  4      MR pVRS Pg                  VRR7      : V: 2,          pEMVRV,          ,          pEMV	'       gr   V'       dj   VR,          pV'       dW   \i        RS P                  Pj                  T	TVP4                  VPl                  R JTV'       d   \        V4      M^ VR7	      S n7        EMbVP,                  '       d0   VRRPI                  R VPp                   4       4      : 2,          pEM!V'       Ed   V'       Ed]   S P                  PP                  \R        Pr                  ,          '       Ed+   VPt                  '       Eg   RpS P                  PP                  \R        Pv                  ,          pT;'       g    R%o&RPI                  V	 UUUu. uF  w  ppppVS&9  g   K  VNK  	  uppp4      p RPI                  V&3R l\y        V	4       4       4      p!V'       d'   RPI                  V&V 3R l\y        V	4       4       4      p"M$RPI                  V&3R l\y        V	4       4       4      p"V	 U#u. uF  p#V#^ ,          S&9  g   K  V#NK  	  p$p#VRV" RV  RV! R 2,          pM9RpT	p$RPI                  V	 UUu. uF
  w   pppVNK  	  upp4      p VR!V  R"2,          p\i        RT T$TVP4                  VPl                  R JTV'       d   \        V4      M^ VVVR#7      S n7        M5RPI                  V	 UUu. uF
  w   pppVNK  	  upp4      p VR!V  R"2,          pVPl                  e6   S P`                  ! VPl                  3/ VB p%V%'       d   VRV%,           ,          pV'       d#   S P\                  '       g   VRV,           ,          pS Pb                  '       dV   S P                  Pd                  '       g:   V'       g   \        S P                  4      MR pS Pg                  VRR7      V,           pS P                  P{                  R$4       V# u uppi u upppi u upppi u up#i u uppi u uppi )&Nr<  FTr%  r$  r"   r'  zWThe '%s' dialect with current database version settings does not support empty inserts.zcThe '%s' dialect with current database version settings does not support in-place multirow inserts.zdRETURNING cannot be deterministically sorted when using an INSERT which includes multi-row values().zINSERT zINTO  (%s)r   zTsentinel selection rules should have prevented us from getting here for this dialectrN  rW  r/  r  r  ry  z DEFAULT VALUES)rU  rV  rX  rY  r[  z VALUES c              3  `   "   T F$  pR RP                  R V 4       4      ,          x  K&  	  R# 5i)r  r   c              3  ,   "   T F
  w   rqx  K  	  R # 5ir  r  )r?  rT  r  s   &  r  rA  5SQLCompiler.visit_insert.<locals>.<genexpr>.<genexpr>  s      L^>1a^s   Nrn  )r?  crud_param_sets   & r  rA  +SQLCompiler.visit_insert.<locals>.<genexpr>  s8       +N yy L^ LLN N*Ms   ,.c              3  R   <"   T F  w  rV^ ,          S9  g   K  RV 2x  K  	  R# 5i)r  pNr  )r?  rJ  cpadd_sentinel_sets   &  r  rA  r    s/      %!>!u$44 asG!>s   ''c              3     <"   T FW  w  pw  r#rCVS9  dD   SP                  VP                  VP                  P                  SP                  4      R V 24      MTx  KY  	  R# 5ir  N)rZ  r  r4  r  )r?  rJ  r'  rT  r]  r  r  s   &    r  rA  r    sl      050A0  #*:: !11 # # @ @ N"#A3 "&&5s   AA"c              3  L   <"   T F  w  pw  r#rCVS9  d   R V 2MTx  K  	  R# 5ir  r  )r?  rJ  r'  rT  r]  r  s   &    r  rA  r    s9      050A0 %(/?$?1QCTI5s   !$z SELECT z FROM (VALUES (z)) AS imp_sen(z#, sen_counter) ORDER BY sen_counterz	 VALUES (rO  )rP  rQ  rR  rT  rU  rV  rX  rY  rZ  r[  r\  r  r  )>r  r3  r  r\  r  r)  r  r   r  r   _get_crud_paramsr  rp  r}  single_paramsr  supports_default_valuesr  supports_empty_insertr/   r$  r   _has_multi_parametersr  rb  
_returning_sort_by_parameter_orderr  rQ  rP  format_tabler   r  r[  rE  rF  r   use_insertmanyvaluesuse_sentinel_columnsr  r_  rk  rp  _insert_sentinelr  r9  rf  r   r  r  cte_follows_insertrI  rO  default_metavalue_token_post_values_clauserw  all_multi_paramsrr  is_default_metavalue_onlyrs  rI  r  )'r  insert_stmtr'  r<  r  r)  rL  counted_bindparamcrud_params_structcrud_params_singler  r  r-  rY  rT  r]  r  named_sentinel_paramsadd_sentinel_colsr[  r4  r'  param_names_params_by_col_add_sentinel_col
param_namer9  select_textrC  embed_sentinel_valuerender_bind_castsr  r  colnamescolnames_w_castr  rR  post_values_clauser  s'   f&&&,                                 @r  visit_insertSQLCompiler.visit_insert  s	    $::
!#
 $--#!-~H::~H DM))))6&%%%%2"

!35k	
  ! ???|3
 !#!22	

 0
 
 ???0< #$5 6"""))5**.??*->D*/== #LL888LL;;;LL666""!\\../  ...<<;;;&&137<<3D3DE  ''';+A+A+A666&&I  "4!A!A!3!A!A=="&,,"F"F   D++2268 D 	**;+<+<=
 22;KMA(((++K<%<Gdii+=>+=-!1a+=>  D  2FF9= !00JJK4J4J> 2 G G ,+++ 3E"2D.Q; $2D  " )+%):%(>04-!%!C!C)"J "8I)JJ04-)00< *; )0 GG6HHI I -1) $5Q#7#H#H#H DH "&n!5=N8O!O#44$,  5   ---...  $),,

234BFJLK yyyT\\<<<7?DJJT++&304 ,     ++#(?%%D#):LL88&%#<< $77tC%62C-.&7*&" 000		  +=*M*M  D "!!!LLCC2IIJ J
 ,EEE (,$ LLCC2JJK "
 $5#:#: ,0II 1C0B,CE1&66 0B-)  99 %!*+=!>%  % '+ii 0 5>.50 'O '+ii 04=.50 'O !3& 2Aw&66 D 2 # & / 0  9: ;""* ,++ (-$%7",0II1CD1C~q!UAU1CD-) )$=#>a@@%6 %#<#5.?)4)M)M334?!2.?C)*Q$9"3%9&D"& )-		-?@-?>1a-?@)% i 9:!<<D**6!%//"35" "000D$B$B$BC***D999T\\<<<3;C

OM''"/,0 (  	  	

r] ?0"HV&& E2 As0   f)f/8f6f6f=)f=g
g
c                    R# )z3Provide a hook for MySQL to add LIMIT to the UPDATENr  )r  update_stmts   &&r  update_limit_clauseSQLCompiler.update_limit_clauseb      r  c                    R# )z3Provide a hook for MySQL to add LIMIT to the DELETENr  )r  delete_stmts   &&r  delete_limit_clauseSQLCompiler.delete_limit_clausef  r  r  c                6    RVR&   VP                   ! V 3RR/VB # )zdProvide a hook to override the initial table clause
in an UPDATE statement.

MySQL overrides this.

Tr  ru  r  )r  r  
from_tableextra_fromsr  s   &&&&,r  update_tables_clause SQLCompiler.update_tables_clausej  s(     8,,TE$E"EEr  c                    \        R4      h)zfProvide a hook to override the generation of an
UPDATE..FROM clause.

MySQL and MSSQL override this.

zCThis backend does not support multiple-table criteria within UPDATEr  r  r  r  r  
from_hintsr  s   &&&&&,r  update_from_clauseSQLCompiler.update_from_clauset  s     "%
 	
r  c               (    V ^8  d   QhRRRRRRRR/# )	r  r  r<   r<  r=  r  r   r  r   r  )r   s   "r  r  r    s8     R RR $R 	R
 
Rr  c                		   VP                   ! W3/ VB p\        '       d   \        V\        4      '       g   Q hVP                  pVe   W#R&   RpMV P
                  '       * pV'       d8   RV n        V P                  '       g   W@n        V P                  '       g   W@n        V P                  \        ,          '       d;   \        / \        4       4      pV P                  \        ,          pV'       d   W`n        MR pRpVP                  p\!        V4      p	V	'       dJ   \        \#        VP$                  4      4      p
V Uu. uF  qV
9  g   K  VNK  	  ppV
P'                  V4      pM. pVP$                  0pV P
                  P)                  RVRVRV/4       RpVP*                  '       d$   WP,                  ! WP*                  3/ VB ,          pV P.                  ! VVP$                  V3RV/VB p\0        P2                  ! WWE3/ VB pVP4                  pVP6                  '       d   V P9                  W4      w  ppMR pVP:                  '       d   V P=                  W4       W,          pVR	,          pVR
P?                  R \A        RV4       4       4      ,          pV PB                  '       g   VPD                  '       dS   V PF                  '       dA   TRT PI                  TV PB                  ;'       g    VPD                  VR7      ,           ,          pV'       d;   V PJ                  ! VVP$                  VV3RV/VB pV'       d   VRV,           ,          pVPL                  '       d8   V PN                  ! VPL                  3RV/VB pV'       d   VRV,           ,          pV PQ                  V4      pV'       d   VRV,           ,          pV PB                  '       g   VPD                  '       dS   V PF                  '       gA   TRT PI                  TV PB                  ;'       g    VPD                  VR7      ,           ,          pV PR                  '       d9   V'       g   \U        V P
                  4      MR pV PW                  VR7      V,           pV'       d   Vf   Q hVPY                  RR7       V P
                  P[                  R4       V# u upi )Nr<  FTr%  r$  r"   zUPDATE ri  z SET r   c              3  H   "   T F  w  rr1VR ,           V,           x  K  	  R# 5i)=Nr  )r?  rT  r]  r  s   &   r  rA  +SQLCompiler.visit_update.<locals>.<genexpr>  s,      
&! 3J&s    "zList[Tuple[Any, str, str, Any]]rW  r   WHERE rB  UPDATEr  r  ).r  r   r  r>   r3  r  r]  r  r)  r  r|  r  r   r}  ri  _extra_fromsr*  r(   r   r   r  rQ  rP  r  r   r  r  r  r[  rE  rF  r   r   rb  r  rf  r9  r  r  r|  r  r  r  rI  r  r  )r  r  r<  r  r)  rL  ri  r  r  is_multitable
main_fromsr  render_extra_fromsr%  r-  rY  r  crud_paramsrZ  extra_from_textr  r  rC  s   &&&,                   r  visit_updateSQLCompiler.visit_update  s{    $::
!#
 =m^<<<<#--#!-~H::~H DM))))6&%%%%2"<<444$R/K<<,6L#. K L#00[)];+<+<=>J&"&a:*=;  " )..{;O!#*001O

!?k	
    ++2268 D ..
 $	

 

 "22}
:<
 )66(,(>(>)%M: !M(((++K<		 
%)1;&
 
 	
 """k&<&<&<---d33++EE{/E/E(0 4    "55!!"	
 ( O o--&&&11++9DHJA 	A%//<C,&&D ###{'='='=000C$//''AA;+A+A$, 0   D 9993;C

OM***G$ND***x0

rS"s   ;R;R;c                    \        R4      h)zProvide 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.

zCThis backend does not support multiple-table criteria within DELETEr  r  r  r  r  r  r  s   &&&&&,r  delete_extra_from_clause$SQLCompiler.delete_extra_from_clause  s     "%
 	
r  c                	0    VP                   ! V 3R RRR/VB # )r  Tru  r  )r  r  r  r  r  s   &&&&,r  delete_table_clauseSQLCompiler.delete_table_clause&  s0    ,,

&*
.0
 	
r  c                	   VP                   ! W3/ VB pVP                  pVe   W#R&   RpMV P                  '       * pV'       d8   RV n        V P                  '       g   W@n        V P
                  '       g   W@n        V P                  \        ,          '       d;   \        / \        4       4      pV P                  \        ,          pV'       d   W`n        MR pRpVP                  pVP                  0P                  V4      p	V P                  P                  RV	RV	RV/4       Rp
VP                   '       d$   WP"                  ! WP                   3/ VB ,          p
V
R,          p
 V P%                  VVP                  VVR	7      p\*        P,                  ! WWE3/ VB  VP.                  '       d   V P1                  W4      w  rMR pVP2                  '       d   V P5                  W4       W,          p
V P6                  '       g   VP8                  '       dS   V P:                  '       dA   T
R
T P=                  TV P6                  ;'       g    VP8                  VR7      ,           ,          p
V'       d;   V P>                  ! VVP                  VV3RV/VB pV'       d   V
R
V,           ,          p
VP@                  '       d8   V PB                  ! VP@                  3RV/VB pV'       d   V
RV,           ,          p
V PE                  V4      pV'       d   V
R
V,           ,          p
V P6                  '       g   VP8                  '       dS   V P:                  '       gA   T
R
T P=                  TV P6                  ;'       g    VP8                  VR7      ,           ,          p
V PF                  '       d9   V'       g   \I        V P                  4      MR pV PK                  VR7      V
,           p
V'       d   Vf   Q hVPM                  RR7       V P                  PO                  R4       V
#   \&         dF    T P%                  YP                  T4      pT'       d   T P)                  TP                  TR	7      p ELi ; i)Nr<  FTr%  r$  r"   zDELETE FROM )ri  rW  r  ri  r  rB  DELETEr  r  )(r  r3  r  r[  r  r)  r  r|  r  r   r}  ri  r  r   r   r  rQ  rP  r  	TypeErrorr  r   r  r  r[  rE  rF  rb  r  rf  r9  r  r  r|  r  r  r  rI  r  r  )r  r  r<  r  r)  rL  ri  r  r  r%  r-  rY  rT  rZ  r  r  r  rC  s   &&&,              r  visit_deleteSQLCompiler.visit_delete+  s   #::
!#
 $--#!-~H::~H DM))))6&%%%%2"<<444$R/K<<,6L#. K L#00&,,-33K@

!?k	
    ++2268 D 		M11!!'	 2 J 	dOBO(,(>(>)%M: !M(((++K< ###{'='='=,,,C$//''AA;+A+A$, 0   D ";;!!	
 ( O o--&&&11++9DHJA 	A%//<C,&&D ###{'='='=000C$//''AA;+A+A$, 0   D 9993;C

OM***G$ND***x0

rU  	M 11..J LL!2!2LL	Ms    P AQ! Q!c                	F    R V P                   P                  V4      ,          # )zSAVEPOINT %sr  format_savepointr  savepoint_stmtr  s   &&,r  visit_savepointSQLCompiler.visit_savepoint  s     > >~ NNNr  c                	F    R V P                   P                  V4      ,          # )zROLLBACK TO SAVEPOINT %sr  r  s   &&,r  visit_rollback_to_savepoint'SQLCompiler.visit_rollback_to_savepoint  s#    )DMM,J,J-
 
 	
r  c                	F    R V P                   P                  V4      ,          # )zRELEASE SAVEPOINT %sr  r  s   &&,r  visit_release_savepoint#SQLCompiler.visit_release_savepoint  s#    %(F(F)
 
 	
r  )-rm  r|  rw  ro  rp  rk  rn  rr  rv  rt  rq  r  rl  r  r}  r  re  rd  ri  r  r  rj  r)  r  r  r  r  r{  r  ri  r  r  r[  r\  rc  r]  r  r  r  r  r  r8  r  r  r  r  )NT)NNTNTFF)NFFNr  )NTr  Nr  )NF)FNNr  )NFNN)FFFFF)FFNNNN)FFFNFFNN)FNN)NNNTFFT)FFNNNFN)NFF)FFFNTNNNr  )r  r  r  r  r	  EXTRACT_MAPr  r$   r  rX  r
  r	  COMPOUND_KEYWORDSr  r[  r\  r]  r_  r`  rb  rc  rf  rg  rh  rl  rm  rn  ro  rp  rq  rr  rt  rv  rw  rx  	frozensetry  rz  r  r{  r  postfetch_lastrowidr|  r8  r}  r~  r  r  r  rh  r  patternr  r  r  r  r{  r  rM  r  ro_memoized_propertyr  r  r  r  memoized_propertyr  memoized_instancemethodr  
contextlibcontextmanagerr  r  r  r  r  r  r  r  r@  r  r  preload_moduler~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r$  r.  r  r?  rO  rV  r^  rc  rp  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:  r8  rV  re  r&  rq  rt  rw  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  rZ  r+   rd  rG  r  r  r"  r6  rF  r"   _CTEOptsrK  ro  rr  rn  r  rm  r  r  r  r  rT  rH  r  r  r~  r  r  r  r  typingr   rD  r  r  r  r  r  r  rP  rI  r  r  r  r  r  r9  r  r  rO  rV  r[  r*   
CLIENTSIDErk  rq  SENTINEL_DEFAULTNONErn  ro  rd  r   rm  rb  rj  r  r  r  r  r  r  r  r  r  r  r  r  r"  r  r  r  r  r  r    s	    K 	SSSSSSSS		
  ; : /.66F)HdHdHd
 +*% .0O*/ .0O*/$ BF>E K((I--6 %$4 ',t+ 5:+T9
 "OT! B!! %('
 .-
 &+d* "OT! "d! ).- !ND  !&% =A "9@ +/-.
 6:295929=A:A<EK9G
 :C6D
 8<4F
   % 	    (,K$+ .2*1.2+2FD
,, 32 GFJJ'LM

#45**$$
%Q'<'D'D&EF # # C C )-/3 %%59Pd = =$ 
 0 ( (  M  MD G G 
  
!! ".  .9vGR 

 
8#  
 
.~ ~@ 
!!$ "$L 
3 
3C CJ 
34
 5
 43	  
	34P 5 Pd 
	34) 5 )V>@OO-
^+Z/b

/9O 9OvA



22h
"@L&&K
(
T
B


7
, ,\8
C?B3-$L6"BB


4$
H*TM1^6p8




 2GG 
I IJAEBFAEBFAEBF

	
AE




cJ$ $!%	DB%N*$A AFC .2&*,0(2(;(;E(BVp30bH0?"/b9(
2
*OJb
$ .-#11-	/LM 
: '+*KZ
!2h]~3j7 	
1@'R3j
<
)" (,'9'9,77,>>,==,>>,11,>>,55,55,55,55	
($& $D#I#I,11,::	
$ <|Yv
ENF
R Rh
 

AFO


 
r  r  c                     a  ] tR tRtRtR t]P                  ! R4      V 3R l4       tR t	R t
R tR	 tR
 R ltR tR tR tR tR tR tR tR tRtV ;t# )StrSQLCompileri  a_  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`

c                	    R # )z<name unknown>r  r  s   &&r  r  $StrSQLCompiler._fallback_column_name  s    r  zsqlalchemy.engine.urlc                	b  < VP                   R 8w  d   \        P                  P                  pVP                  P                  VP                   4      P                  4       ! 4       pVP                  VRV R7      p\        V\        4      '       g   VP                  ! V3/ VB # \        SV `1  W4      # )r   N)r  )stringify_dialectr$   rz  
engine_urlURLr~   get_dialectstatement_compilerr  r7  r  r  r  )r  r  r  r  urlr  compilerr  s   &&&,   r  r  ,StrSQLCompiler.visit_unsupported_compilation  s    $$	1..++CggnnW%>%>?KKMOG114 2 H h77''6266w4WBBr  c                	    V P                   ! VP                  3/ VB : R V P                   ! VP                  3/ VB : R2# )rU  rV  )r  r   r   r  s   &&&,r  visit_getitem_binary#StrSQLCompiler.visit_getitem_binary  s6    LL++LL,,
 	
r  c                	(    V P                   ! W3/ VB # r  rD  r  s   &&&,r  visit_json_getitem_op_binary+StrSQLCompiler.visit_json_getitem_op_binary      ((@R@@r  c                	(    V P                   ! W3/ VB # r  rG  r  s   &&&,r  !visit_json_path_getitem_op_binary0StrSQLCompiler.visit_json_path_getitem_op_binary  rJ  r  c                	@    R V P                   P                  V4       R2# )z<next sequence value: >)r  format_sequencer  s   &&,r  r  StrSQLCompiler.visit_sequence  s#    $T]]%B%B8%L$MQO	
r  c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# r3  r  )r   s   "r  r  StrSQLCompiler.__annotate__  s<     1 11 81
 "1 1 
1r  c          
     	    \         P                  ! V4       Uu. uF  pV P                  R VRR/ 4      NK  	  ppRRP                  V4      ,           # u upi )NTFr7  r   )r   r8  r  r   )r  r4  r4  rN  r  r  r  s   &&&$,  r  r9  StrSQLCompiler.returning_clause  s]     ++N;
; %%dAtUB?; 	 
 dii000	
s   Ac                	Z   a aa R SR&   RRP                  VVV 3R lV 4       4      ,           # )Tr  r  r   c              3  N   <"   T F  pVP                   ! S3R S/SB x  K  	  R# 5ir;  Nr  r?  r  r  r  r  s   & r  rA  4StrSQLCompiler.update_from_clause.<locals>.<genexpr>  s-      #
    BBrB r  rn  r  s   f&&&flr  r  !StrSQLCompiler.update_from_clause   s3     8 #
 #
 
 
 	
r  c                	Z   a aa R SR&   RRP                  VVV 3R lV 4       4      ,           # )Tr  r   c              3  N   <"   T F  pVP                   ! S3R S/SB x  K  	  R# 5irX  r  rY  s   & r  rA  :StrSQLCompiler.delete_extra_from_clause.<locals>.<genexpr>  s-       
    BBrB r  rn  r  s   f&&&flr  r  'StrSQLCompiler.delete_extra_from_clause	  s3     8dii  
  
 
 
 	
r  c                	    R # )zSELECT 1 WHERE 1!=1r  r=  s   &&,r  r8  #StrSQLCompiler.visit_empty_set_expr  s    $r  c                	    R V,          # )z[%s]r  r  s   &&&r  r  !StrSQLCompiler.get_from_hint_text  s    }r  c                	*    V P                   ! VR 3/ VB # )z
 <regexp> r+  r  s   &&&,r  r  +StrSQLCompiler.visit_regexp_match_op_binary  s    ,,V\HRHHr  c                	*    V P                   ! VR 3/ VB # )z <not regexp> re  r  s   &&&,r  r  /StrSQLCompiler.visit_not_regexp_match_op_binary  s    ,,V5ELLLr  c                	    R VP                   P                  ! V 3/ VB : RVP                  P                  ! V 3/ VB : R2# )z<regexp replace>(r   rO  )r   r  r   r  s   &&&,r  r  -StrSQLCompiler.visit_regexp_replace_op_binary  s:    KK**4626LL++D7B7
 	
r  c                	    R VP                   P                  ! V 3/ VB : RVP                  P                  ! V 3/ VB : R2# )z	TRY_CAST(r   rO  )r  r  r#  )r  r   r  s   &&,r  visit_try_castStrSQLCompiler.visit_try_cast$  s:    KK**4:6:OO..t>v>
 	
r  r  )r  r  r  r  r	  r  r$   r0  r  rD  rH  rL  r  r9  r  r  r8  r  r  r  r  rl  r  r  r  s   @r  r7  r7    sy    &  
01C 2C
AA

1

%IM

 
r  r7  c                  >   ] tR tRtRt]'       d	   ROR R llt]P                  R R l4       t	]P                  R 4       tRPR	 R
 lltR tR tR tR tRQR ltRRR ltR tR tR R ltRSR ltR tRQR R lltR tR tR tR tR tR tR tR  R! lt RRR" lt!R# t"R$ t#R% t$R& t%R' t&R( R) lt'R* R+ lt(R, t)R- t*R. t+R/ R0 lt,R1 R2 lt-R3 t.R4 R5 lt/R6 R7 lt0R8 R9 lt1R: R; lt2R< R= lt3R> R? lt4R@ RA lt5RB RC lt6RD RE lt7RF RG lt8RH RI lt9RJ RK lt:RL t;RM t<RNt=R# )TDDLCompileri+  Tc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r  r  rj   r3  r:   r  r  r  r*  r  r  r  )r   s   "r  r  DDLCompiler.__annotate__0  s=     	 		 ,	 #C		
 &*	 .	r  c                	    R # r  r  r  s   &&&&&&r  r  DDLCompiler.__init__0  s     r  c                   V ^8  d   QhRR/# r  r  )r   s   "r  r  rq  :  s     
 
k 
r  c                	f    V P                   P                  V P                   R V P                  R7      # )Nrq  )r  r?  r  rF  s   &r  r  DDLCompiler.sql_compiler9  s/    ||..LL$T5N5N / 
 	
r  c                	.    V P                   P                  # r  )r  r"  rF  s   &r  type_compilerDDLCompiler.type_compiler?  s    ||222r  Nc               (    V ^8  d   QhRRRRRRRR/# r  r  )r   s   "r  r  rq  C  s3      2 E 	
 
3r  c                	    R # r  r  r  s   &&&&r  r  DDLCompiler.construct_paramsC  s     r  c                	*   VP                   p\        VP                  \        P                  4      '       d   VP                  4       pV P                  pVP                  VP                  4      p\        V4      ^8X  d   V^ ,          RrvMVR,          V^ ,          rvVP                  RV4       VP                  RV4       VP                  RVP                  VP                  4      4       V P                  P                  VP                  V,          4      # )r  r  r   r!   rL  r  )contextr  targetr!   rR   r2  r  format_table_seqr  r  r  r  r.  r3  )r  ddlr  r~  r  pathr   schs   &&,     r  	visit_ddlDDLCompiler.visit_ddlK  s    ++cjj&,,//llnG}}H,,SZZ8D4yA~!!Wbs!"XtAwsw.x-z8+@+@+LM  223==73JKKr  c                	    R pVP                   '       d
   VR,          pW0P                  P                  VP                  4      ,           # )zCREATE SCHEMA IF NOT EXISTS )if_not_existsr  format_schemar  )r  r~   r  r-  s   &&, r  visit_create_schemaDDLCompiler.visit_create_schema^  s:    $$Dmm11&..AAAr  c                	    R pVP                   '       d
   VR,          pW0P                  P                  VP                  4      ,          pVP                  '       d
   VR,          pV# )zDROP SCHEMA 
IF EXISTS  CASCADE)	if_existsr  r  r  cascader  dropr  r-  s   &&, r  visit_drop_schemaDDLCompiler.visit_drop_schemad  sM    >>>L D++DLL99<<<JDr  c                	   VP                   pV P                  pR pVP                  '       d*   VRP                  VP                  4      R,           ,          pVR,          pVP                  '       d
   VR,          pWTP                  V4      R,           ,          pV P                  V4      pV'       d   WVR,           ,          pVR,          pRpRpVP                   Fo  p	V	P                   p
 T P                  YP                  ;'       d    V'       * R7      pVe   WW,          pR	pVR
V,           ,          pV
P                  '       d   RpKo  Kq  	  V P                  VVP                   R7      pV'       d   WWR
,           V,           ,          pVRV P#                  V4      ,          ,          pV#   \        P                   dN   p\        P                  ! RTP                  : RT
P                  : RTP                  ^ ,          : 24      ThRp?ii ; i)z
CREATE rW  zTABLE r  rM  
Ffirst_pkNr  	Tz(in table 'z', column 'z'): ) _include_foreign_key_constraintsz
)%s

)r  r  rQ  r   r  r  create_table_suffixr  r  r  r/   r$  descriptionr   argscreate_table_constraintsinclude_foreign_key_constraintspost_create_table)r  r~   r  r   r  r-  r  ro  r  create_columnr|   	processedceconsts   &&,           r  visit_create_tableDDLCompiler.visit_create_tablem  s   ==???CHHU__-33D$$D%%e,s22"66u=#--D	 #^^M"**F LL!,>,>,O,Ox< ) 	 (%D &ID9,,D%%%#H & ,$ ---3-S-S . 
 $u,,Dd44U;;; ## &&((&++rwwqzC s%   )F(<F(F((H
=AHH
c                	   a  VP                   pVP                  '       d   R # S P                  WBR7      pRP                  V 3R lVP                   4       4      pV'       d   VRV,           ,          pV# )Nr  rW  c              3  F   <"   T F  pSP                  V4      x  K  	  R # 5ir  )r  r?  r}   r  s   & r  rA  2DDLCompiler.visit_create_column.<locals>.<genexpr>  s!      
7IDLL$$7Ir  )r  systemget_column_specificationr   constraints)r  r~   r  r  r|   r-  r  s   f&&,   r  visit_create_columnDDLCompiler.visit_create_column  sd    ===,,V,G 
7=7I7I
 
 C%KDr  c                	  a  . pVP                   '       d   VP                  VP                   4       VP                  pVe   VP                  V4      pM
\	        4       pTP                  VP                   Uu. uF  pWqP                   Jg   K  Wv9  g   K  VNK   	  up4       RP                  R V 3R lV 4        4       4      # u upi )Nz, 
	c              3  2   "   T F  pVf   K	  Vx  K  	  R # 5ir  r  )r?  r  s   & r  rA  7DDLCompiler.create_table_constraints.<locals>.<genexpr>  s"      
  As   
c              3     <"   T F`  pVP                  S4      '       g   K  SP                  P                  '       d   \        VR R4      '       d   KM  SP	                  V4      x  Kb  	  R# 5i)	use_alterFN)_should_create_for_compilerr  supports_alterr  r  r  s   & r  rA  r    sW      "-J::4@ ) 333":{EB )Z(("-s   A+A+A+A+)r  r  foreign_key_constraintsr  r   rg  _sorted_constraintsr   )r  r   r  r  r  all_fkcs	omit_fkcsr  s   f&&,    r  r  $DDLCompiler.create_table_constraints  s    
 u00100+7 ++,LMII 222A--- 232D 2	
 }} 
"-
 
 	
s   6CCCc                	    R pVP                   '       d
   VR,          pW0P                  P                  VP                  4      ,           # )z
DROP TABLE r  )r  r  r  r  r  s   &&, r  visit_drop_tableDDLCompiler.visit_drop_table  s6    >>>L Dmm00>>>r  c                	Z    R V P                   P                  VP                  4      ,           # )z
DROP VIEW r  r  r  r  r  r  s   &&,r  visit_drop_viewDDLCompiler.visit_drop_view  s      : :4<< HHHr  c                    V ^8  d   QhRRRR/# )r  r  rP   r  r  r  )r   s   "r  r  rq    s       4 r  c                	p    VP                   f(   \        P                  ! RVP                  ,          4      hR # )Nz,Index '%s' is not associated with any table.)r   r/   r$  r   )r  r  s   &&r  _verify_index_tableDDLCompiler._verify_index_table  s0    ;;"">K  r  c           	     	  a  VP                   pS P                  V4       S P                  pR pVP                  '       d
   VR,          pVP                  f   \
        P                  ! R4      hVR,          pVP                  '       d
   VR,          pVS P                  WRR7      : RVP                  VP                  VR7      : RR	P                  V 3R
 lVP                   4       4      : R2,          pV# )zCREATE UNIQUE z0CREATE INDEX requires that the index have a namezINDEX r  include_schemarR  rM  r  r   c              3  `   <"   T F#  pSP                   P                  VR RR7      x  K%  	  R# 5i)FTr   r  N)r  r  )r?  r]  r  s   & r  rA  1DDLCompiler.visit_create_index.<locals>.<genexpr>  s>       .D !!))T *   .r|  rO  )r  r  r  r   r   r/   r$  r  _prepared_index_namer  r   r   expressions)r  r~   r  include_table_schemar  r  r  r-  s   f&&&,   r  visit_create_indexDDLCompiler.visit_create_index  s       '==<<<ID::""B  	$$D%%e%K!!(< "  II  "--	 
 	
 r  c                	    VP                   pVP                  f   \        P                  ! R4      hRpVP                  '       d
   VR,          pW@P                  VRR7      ,           # )Nz.DROP INDEX requires that the index have a namez
DROP INDEX r  Tr  )r  r   r/   r$  r  r  )r  r  r  r  r-  s   &&,  r  visit_drop_indexDDLCompiler.visit_drop_index  s^    ::""@  >>>L D//d/KKKr  c               $    V ^8  d   QhRRRRRR/# )r  r  rP   r  r*  r  r   r  )r   s   "r  r  rq    s$      ,0	r  c                	4   VP                   e'   V P                  P                  VP                   4      pMR pV'       d%   V'       d   V P                  P                  V4      pMR pV P                  P	                  V4      pV'       d   VR,           V,           pV# NrS  )r   r  r	  r
  format_index)r  r  r  r  schema_name
index_names   &&&   r  r   DDLCompiler._prepared_index_name  sy     ;;"#}}>>u{{K#.--445EFKK--44U;
$s*Z7Jr  c                	    R V P                   P                  VP                  P                  4      : RV P	                  VP                  4      : 2# )ALTER TABLE z ADD )r  r  r  r   r  r  r~   r  s   &&,r  visit_add_constraint DDLCompiler.visit_add_constraint#  s8    MM&&v~~';';<LL(
 	
r  c                	    R V P                   P                  VP                  4      : RV P                  P	                  VP                  P
                  \        P                  ! 4       4      : 2# )zCOMMENT ON TABLE r   )r  r  r  r  rG  commentr#   Stringr  s   &&,r  visit_set_table_comment#DDLCompiler.visit_set_table_comment)  sL    MM&&v~~622&&(9
 	
r  c                	Z    R V P                   P                  VP                  4      ,          # )zCOMMENT ON TABLE %s IS NULLr  r  s   &&,r  visit_drop_table_comment$DDLCompiler.visit_drop_table_comment1  s'    ,t}}/I/ILL0
 
 	
r  c                	    R V P                   P                  VP                  RRR7      : RV P                  P	                  VP                  P
                  \        P                  ! 4       4      : 2# )zCOMMENT ON COLUMN T)	use_tablerM  r   )r  format_columnr  r  rG  r  r#   r  r  s   &&,r  visit_set_column_comment$DDLCompiler.visit_set_column_comment6  sZ    MM''$4 (  22&&(9	
 	
r  c                	^    R V P                   P                  VP                  RR7      ,          # )zCOMMENT ON COLUMN %s IS NULLT)r  )r  r  r  r  s   &&,r  visit_drop_column_comment%DDLCompiler.visit_drop_column_comment@  s/    -0K0KLLD 1L 1
 
 	
r  c                	B    \         P                  ! V \        V4      4      hr  r  r  s   &&,r  visit_set_constraint_comment(DDLCompiler.visit_set_constraint_commentE  s    --dDLAAr  c                	B    \         P                  ! V \        V4      4      hr  r  r  s   &&,r  visit_drop_constraint_comment)DDLCompiler.visit_drop_constraint_commentH  s    --dDJ??r  c                    V ^8  d   QhRRRR/# )r  identity_optionsrO   r  r   r  )r   s   "r  r  rq  K  s      _  r  c                	   . pVP                   e#   VP                  RVP                   ,          4       VP                  e#   VP                  RVP                  ,          4       VP                  e#   VP                  RVP                  ,          4       VP                  e#   VP                  RVP                  ,          4       VP
                  e   VP                  R4       VP                  e   VP                  R4       VP                  e#   VP                  RVP                  ,          4       VP                  e&   TP                  VP                  '       d   RMR	4       R
P                  V4      # )NzINCREMENT BY %dzSTART WITH %dzMINVALUE %dzMAXVALUE %dzNO MINVALUEzNO MAXVALUEzCACHE %dCYCLEzNO CYCLErW  )
	incrementr  r  minvaluemaxvalue
nominvalue
nomaxvaluecachecycler   )r  r  r-  s   && r  get_identity_options DDLCompiler.get_identity_optionsK  s    %%1KK),<,F,FFG!!-KK*:*@*@@A$$0KK(8(A(AAB$$0KK(8(A(AAB&&2KK&&&2KK&!!-KK
%5%;%;;<!!-KK#3#9#9#9zJxx~r  c                	   R pVP                   '       d
   VR,          pW@P                  P                  VP                  4      ,          pV'       d	   WB,          pV P	                  VP                  4      pV'       d   VRV,           ,          pV# )zCREATE SEQUENCE r  rW  )r  r  rP  r  r	  )r  r~   r  r  r-  optionss   &&&,  r  visit_create_sequence!DDLCompiler.visit_create_sequence_  sm    !$$D--fnn==ND++FNN;C'M!Dr  c                	    R pVP                   '       d
   VR,          pW0P                  P                  VP                  4      ,           # )zDROP SEQUENCE r  )r  r  rP  r  r  s   &&, r  visit_drop_sequenceDDLCompiler.visit_drop_sequencel  s6    >>>L Dmm33DLLAAAr  c                	   VP                   pVP                  e   V P                  P                  V4      pMR pVf(   \        P
                  ! RVP                   ,          4      hRV P                  P                  VP                   P                  4      : RVP                  '       d   RMR: V: VP                  '       d   R: 2# R: 2# )Nz<Can't emit DROP CONSTRAINT for constraint %r; it has no namer  z DROP CONSTRAINT r  r  r  )
r  r   r  format_constraintr/   r$  r  r   r  r  )r  r  r  r}   formatted_names   &&,  r  visit_drop_constraint!DDLCompiler.visit_drop_constraintr  s    \\
??&!]]<<ZHN!N!""!#'<<0  " MM&&t||'9'9: NNNL2,,,J.	
 	
 -/.	
 	
r  c                	   V P                   P                  V4      R ,           V P                  P                  P	                  VP
                  VR7      ,           pV P                  V4      pVe   VRV,           ,          pVP                  e*   VR V P	                  VP                  4      ,           ,          pVP                  eF   V P                  P                  '       d*   VR V P	                  VP                  4      ,           ,          pVP                  '       g8   VP                  '       d   V P                  P                  '       g
   VR,          pV# )rW  )r!  z	 DEFAULT z	 NOT NULL)r  r  r  r"  r  r  get_column_default_stringcomputedidentitysupports_identity_columnsnullable)r  r|   r  colspecr   s   &&,  r  r  $DDLCompiler.get_column_specification  s   MM''/ll1199V :  	 008{W,,G??&sT\\&//:::G OO'666sT\\&//:::Gt||'M'M'M{"Gr  c                	    R # r  r  r  r   s   &&r  r  DDLCompiler.create_table_suffix      r  c                	    R # r	  r  r	  s   &&r  r  DDLCompiler.post_create_table  r	  r  c                    V ^8  d   QhRRRR/# )r  r|   zColumn[Any]r  rs  r  )r   s   "r  r  rq    s        r  c                	    \        VP                  \        P                  4      '       d&   V P	                  VP                  P
                  4      # R # r  )r  server_defaultr!   DefaultClauserender_default_stringargr  s   &&r  r	  %DDLCompiler.get_column_default_string  s;    f++V-A-ABB--f.C.C.G.GHHr  c                    V ^8  d   QhRRRR/# )r  r   zUnion[Visitable, str]r  r   r  )r   s   "r  r  rq    s     J J-B Js Jr  c                	    \        V\        4      '       d+   V P                  P                  V\        P
                  4      # V P                  P                  VR R7      # )T)r  )r  r   r  rG  r#   r  r  )r  r   s   &&r  r&	  !DDLCompiler.render_default_string  sQ    gs##$$99,,  $$,,WD,IIr  c                	j    VP                   '       d   V P                  V4      # V P                  V4      # r  )is_column_levelvisit_column_check_constraintvisit_check_constraintr  r}   r  s   &&,r  &visit_table_or_column_check_constraint2DDLCompiler.visit_table_or_column_check_constraint  s0    %%%55jAA..z::r  c                	    V P                   ! V3/ VB pW0P                  ! V3/ VB ,          pW0P                  V4      ,          pV# r  define_constraint_preambledefine_check_bodydefine_constraint_deferrabilityr  r}   r  r-  s   &&, r  r/	  "DDLCompiler.visit_check_constraint  G    ..z@R@&&z8R8844Z@@r  c                	    V P                   ! V3/ VB pW0P                  ! V3/ VB ,          pW0P                  V4      ,          pV# r  r4	  r8	  s   &&, r  r.	  )DDLCompiler.visit_column_check_constraint  r:	  r  c               $    V ^8  d   QhRRRRRR/# r  r}   rQ   r  r   r  r   r  )r   s   "r  r  rq    $      .69	r  c                	    \        V4      ^ 8X  d   R# V P                  ! V3/ VB pW0P                  ! V3/ VB ,          pW0P                  V4      ,          pV# r  r  )r  r5	  define_primary_key_bodyr7	  r8	  s   &&, r  visit_primary_key_constraint(DDLCompiler.visit_primary_key_constraint  sX     z?a..z@R@,,Z>2>>44Z@@r  c               $    V ^8  d   QhRRRRRR/# r  r}   rN   r  r   r  r   r  )r   s   "r  r  rq    r?	  r  c                	    V P                   ! V3/ VB pW0P                  ! V3/ VB ,          pW0P                  V4      ,          pW0P                  V4      ,          pW0P	                  V4      ,          pV# r  )r5	  define_foreign_key_bodydefine_constraint_matchdefine_constraint_cascadesr7	  r8	  s   &&, r  visit_foreign_key_constraint(DDLCompiler.visit_foreign_key_constraint  so     ..z@R@,,Z>2>>,,Z88//
;;44Z@@r  c                $    VP                  V4      # )z=Format the remote table clause of a CREATE CONSTRAINT clause.)r  )r  r}   r   r  s   &&&&r  define_constraint_remote_table*DDLCompiler.define_constraint_remote_table  s     $$U++r  c               $    V ^8  d   QhRRRRRR/# r  r}   rS   r  r   r  r   r  )r   s   "r  r  rq    s$      *25	r  c                	    \        V4      ^ 8X  d   R# V P                  ! V3/ VB pW0P                  ! V3/ VB ,          pW0P                  V4      ,          pV# rA	  )r  r5	  define_unique_bodyr7	  r8	  s   &&, r  visit_unique_constraint#DDLCompiler.visit_unique_constraint  sX     z?a..z@R@''
9b9944Z@@r  c               $    V ^8  d   QhRRRRRR/# )r  r}   rM   r  r   r  r   r  )r   s   "r  r  rq    s$      $,/	r  c                	    R pVP                   e0   V P                  P                  V4      pVe   VRV,          ,          pV# )r  zCONSTRAINT %s )r   r  r	  )r  r}   r  r-  r	  s   &&,  r  r5	  &DDLCompiler.define_constraint_preamble  sB     ??&!]]<<ZHN)(>99r  c               $    V ^8  d   QhRRRRRR/# r>	  r  )r   s   "r  r  rq    s$      .69	r  c                	   a  R pVR,          pTRRP                  V 3R lVP                  '       d   VP                  MVP                   4       4      ,          ,          pV# )r  zPRIMARY KEY r  r   c              3  n   <"   T F*  pSP                   P                  VP                  4      x  K,  	  R # 5ir  r  r  r   r?  r  r  s   & r  rA  6DDLCompiler.define_primary_key_body.<locals>.<genexpr>  s5      #
(  MM''(rJ  )r   _implicit_generatedcolumns_autoinc_firstr  r8	  s   f&, r  rB	  #DDLCompiler.define_primary_key_body  sh      #
 111 00''(#
 
 
 	
 r  c               $    V ^8  d   QhRRRRRR/# rF	  r  )r   s   "r  r  rq    s$      .69	r  c           	     	J  a V P                   o\        VP                  4      ^ ,          P                  P                  pRRP                  V3R lVP                   4       4      : RV P                  WS4      : RRP                  V3R lVP                   4       4      : R2pV# )r  zFOREIGN KEY(r   c              3  n   <"   T F*  pSP                  VP                  P                  4      x  K,  	  R # 5ir  )r  parentr   r?  r  r  s   & r  rA  6DDLCompiler.define_foreign_key_body.<locals>.<genexpr>  )      7J!qxx}}--7JrJ  z) REFERENCES r  c              3  n   <"   T F*  pSP                  VP                  P                  4      x  K,  	  R # 5ir  )r  r|   r   rf	  s   & r  rA  rg	    rh	  rJ  rO  )r  r  r   r|   r   r   rN	  )r  r}   r  remote_tabler-  r  s   &&,  @r  rH	  #DDLCompiler.define_foreign_key_body  s     ==J//03::@@II 7A7J7J  //( II 7A7J7J 

 r  c               $    V ^8  d   QhRRRRRR/# rQ	  r  )r   s   "r  r  rq    s$      *25	r  c                	r   a  R S P                   ! V3/ VB : RRP                  V 3R lV 4       4      : R2pV# )r  rM  r   c              3  n   <"   T F*  pSP                   P                  VP                  4      x  K,  	  R # 5ir  r\	  r]	  s   & r  rA  1DDLCompiler.define_unique_body.<locals>.<genexpr>  s'     F:admm))!&&11:rJ  rO  )!define_unique_constraint_distinctr   r8	  s   f&, r  rS	  DDLCompiler.define_unique_body  s8     22:DDIIF:FF
 r  c               $    V ^8  d   QhRRRRRR/# )r  r}   rK   r  r   r  r   r  )r   s   "r  r  rq    s!      O 3 3 r  c                	d    R V P                   P                  VP                  RRR7      ,          pV# )z
CHECK (%s)FTr  )r  r  r  r8	  s   &&, r  r6	  DDLCompiler.define_check_body  s8    d//77e4 8 
 
 r  c               $    V ^8  d   QhRRRRRR/# rQ	  r  )r   s   "r  r  rq  #  s$      *25	r  c                	    R # r	  r  r0	  s   &&,r  rp	  -DDLCompiler.define_unique_constraint_distinct#  s     r  c                    V ^8  d   QhRRRR/# r  r}   rN   r  r   r  )r   s   "r  r  rq  (  s     	 	.			r  c                	    R pVP                   e   W P                  V4      ,          pVP                  e   W P                  V4      ,          pV# r	  )ondelete"define_constraint_ondelete_cascadeonupdate"define_constraint_onupdate_cascader  r}   r-  s   && r  rJ	  &DDLCompiler.define_constraint_cascades(  sL     *;;JGGD*;;JGGDr  c                    V ^8  d   QhRRRR/# ry	  r  )r   s   "r  r  rq  3       
 
.
	
r  c                	d    R V P                   P                  VP                  \        4      ,          # )z ON DELETE %s)r  validate_sql_phraser{	  FK_ON_DELETEr  r}   s   &&r  r|	  .DDLCompiler.define_constraint_ondelete_cascade3  -     !B!B"
 
 	
r  c                    V ^8  d   QhRRRR/# ry	  r  )r   s   "r  r  rq  :  r	  r  c                	d    R V P                   P                  VP                  \        4      ,          # )z ON UPDATE %s)r  r	  r}	  FK_ON_UPDATEr	  s   &&r  r~	  .DDLCompiler.define_constraint_onupdate_cascade:  r	  r  c                    V ^8  d   QhRRRR/# )r  r}   rM   r  r   r  )r   s   "r  r  rq  A  s      *  r  c                	    R pVP                   e&   VP                   '       d   VR,          pM	VR,          pVP                  e9   VRV P                  P                  VP                  \        4      ,          ,          pV# )r  z DEFERRABLEz NOT DEFERRABLEz INITIALLY %s)r   r   r  r	  FK_INITIALLYr	  s   && r  r7	  +DDLCompiler.define_constraint_deferrabilityA  st      ,$$$%))+Odmm&G&G$$l'  D r  c                    V ^8  d   QhRRRR/# ry	  r  )r   s   "r  r  rq  N  s      2F 3 r  c                	Z    R pVP                   e   VRVP                   ,          ,          pV# )r  z	 MATCH %s)r  r	  s   && r  rI	  #DDLCompiler.define_constraint_matchN  s-    'K*"2"222Dr  c                	    R V P                   P                  VP                  RRR7      ,          pVP                  RJ d   VR,          pV# VP                  RJ d
   VR,          pV# )zGENERATED ALWAYS AS (%s)FTr  z STOREDz VIRTUAL)r  r  r  	persisted)r  	generatedr  r-  s   &&, r  visit_computed_column!DDLCompiler.visit_computed_columnT  sr    )D,=,=,E,EU$ -F -
 
 $&ID    E)JDr  c                	    R VP                   '       d   RMR: R2pV P                  V4      pV'       d   VRV,          ,          pV# )z
GENERATED ALWAYSz
BY DEFAULTz AS IDENTITYr  )alwaysr	  )r  r	  r  r-  r	  s   &&,  r  visit_identity_column!DDLCompiler.visit_identity_column^  sB     H\9
 ++H5Gg%%Dr  r  )...r  r$  r  )FT)>r  r  r  r  r
  r   r  r$   r+  r  r,  rx  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&	  r1	  r/	  r.	  rC	  rK	  rN	  rT	  r5	  rB	  rH	  rS	  r6	  rp	  rJ	  r|	  r~	  r7	  rI	  r	  r	  r  r  r  r  ro  ro  +  sC   F	 

 

 
3 3L&B2h#
J?I@L$






B@(B
&6J;,
$
	

r  ro  c                  D   ] tR tRtR R ltR R ltR R ltR R	 ltR
 R ltR R lt	R R lt
R R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR  R! ltR" R# ltR$ R% ltR& R' ltR( R) ltR* R+ ltR, R- ltR. R/ ltR0 R1 ltR2 R3 ltR4 R5 ltR6 R7 ltR8 R9 ltR: R; lt R< R= lt!R> R? lt"R@ RA lt#RB RC lt$RD RE lt%RF RG lt&RH RI lt'RJ RK lt(RL RM lt)RN RO lt*RP RQ lt+RR RS lt,RT RU lt-RV RW lt.RX RY lt/RZ t0R[ R\ lt1R] R^ lt2R_t3R`# )aGenericTypeCompilerih  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.Float[Any]r  r   r  r   r  )r   s   "r  r   GenericTypeCompiler.__annotate__i  s"      !4 C C r  c                	    R # )FLOATr  r  s   &&,r  visit_FLOATGenericTypeCompiler.visit_FLOATi      r  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.Double[Any]r  r   r  r   r  )r   s   "r  r  r	  l  s"      "6 c c r  c                	    R # )DOUBLEr  r  s   &&,r  visit_DOUBLE GenericTypeCompiler.visit_DOUBLEl      r  c               $    V ^8  d   QhRRRRRR/# )r  r  zsqltypes.DOUBLE_PRECISION[Any]r  r   r  r   r  )r   s   "r  r  r	  o  s$     " "3";>"	"r  c                	    R # )zDOUBLE PRECISIONr  r  s   &&,r  visit_DOUBLE_PRECISION*GenericTypeCompiler.visit_DOUBLE_PRECISIONo  s     "r  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.REAL[Any]r  r   r  r   r  )r   s   "r  r  r	  t  "       2 # # r  c                	    R # )REALr  r  s   &&,r  
visit_REALGenericTypeCompiler.visit_REALt  rX  r  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.Numeric[Any]r  r   r  r   r  )r   s   "r  r  r	  w  "     	 	#8 	 	 	r  c                	    VP                   f   R# VP                  f   RRVP                   /,          # RRVP                   RVP                  /,          # )NNUMERICzNUMERIC(%(precision)s)	precisionz!NUMERIC(%(precision)s, %(scale)s)scaler	  r	  r  s   &&,r  visit_NUMERIC!GenericTypeCompiler.visit_NUMERICw  Q    ??"[[ +{EOO.LLL6U__:  r  c               $    V ^8  d   QhRRRRRR/# )r  r  zsqltypes.DECIMAL[Any]r  r   r  r   r  )r   s   "r  r  r	    r	  r  c                	    VP                   f   R# VP                  f   RRVP                   /,          # RRVP                   RVP                  /,          # )NDECIMALzDECIMAL(%(precision)s)r	  z!DECIMAL(%(precision)s, %(scale)s)r	  r	  r  s   &&,r  visit_DECIMAL!GenericTypeCompiler.visit_DECIMAL  r	  r  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.Integerr  r   r  r   r  )r   s   "r  r  r	    "      #3 3 3 r  c                	    R # )INTEGERr  r  s   &&,r  visit_INTEGER!GenericTypeCompiler.visit_INTEGER      r  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.SmallIntegerr  r   r  r   r  )r   s   "r  r  r	    s"      $9   r  c                	    R # )SMALLINTr  r  s   &&,r  visit_SMALLINT"GenericTypeCompiler.visit_SMALLINT      r  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.BigIntegerr  r   r  r   r  )r   s   "r  r  r	    s"      "5 S S r  c                	    R # )BIGINTr  r  s   &&,r  visit_BIGINT GenericTypeCompiler.visit_BIGINT  r	  r  c               $    V ^8  d   QhRRRRRR/# )r  r  zsqltypes.TIMESTAMPr  r   r  r   r  )r   s   "r  r  r	    s"      %7 s s r  c                	    R # )	TIMESTAMPr  r  s   &&,r  visit_TIMESTAMP#GenericTypeCompiler.visit_TIMESTAMP  s    r  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.DateTimer  r   r  r   r  )r   s   "r  r  r	    s"      $5 S S r  c                	    R # )DATETIMEr  r  s   &&,r  visit_DATETIME"GenericTypeCompiler.visit_DATETIME  r	  r  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.Dater  r   r  r   r  )r   s   "r  r  r	    !       S S r  c                	    R # )DATEr  r  s   &&,r  
visit_DATEGenericTypeCompiler.visit_DATE  rX  r  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.Timer  r   r  r   r  )r   s   "r  r  r	    r	  r  c                	    R # )TIMEr  r  s   &&,r  
visit_TIMEGenericTypeCompiler.visit_TIME  rX  r  c               $    V ^8  d   QhRRRRRR/# )r  r  zsqltypes.CLOBr  r   r  r   r  )r   s   "r  r  r	    r	  r  c                	    R # )CLOBr  r  s   &&,r  
visit_CLOBGenericTypeCompiler.visit_CLOB  rX  r  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.Textr  r   r  r   r  )r   s   "r  r  r	    s!       c c r  c                	    R # )NCLOBr  r  s   &&,r  visit_NCLOBGenericTypeCompiler.visit_NCLOB  r	  r  c               (    V ^8  d   QhRRRRRRRR/# )r  r   r   lengthr  r  rs  r  r  )r   s   "r  r  r	    s,      !.;H	r  c                	^    TpV'       d   VR V R2,          pV'       d   VRV R2,          pV# )rM  rO  z
 COLLATE "r  r  )r  r   r
  r  r-  s   &&&& r  _render_string_type'GenericTypeCompiler._render_string_type  s9     axqM!Dj1--Dr  c               $    V ^8  d   QhRRRRRR/# )r  r  zsqltypes.CHARr  r   r  r   r  )r   s   "r  r  r	    &     O O OS OS Or  c                	P    V P                  R VP                  VP                  4      # )CHARr
  r
  r  r  s   &&,r  
visit_CHARGenericTypeCompiler.visit_CHAR      ''eooNNr  c               $    V ^8  d   QhRRRRRR/# )r  r  zsqltypes.NCHARr  r   r  r   r  )r   s   "r  r  r	    s&     P P Ps Ps Pr  c                	P    V P                  R VP                  VP                  4      # )NCHARr
  r  s   &&,r  visit_NCHARGenericTypeCompiler.visit_NCHAR  s    ''uOOr  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.Stringr  r   r  r   r  )r   s   "r  r  r	    s!     
 
? 
# 
# 
r  c                	P    V P                  R VP                  VP                  4      # )VARCHARr
  r  s   &&,r  visit_VARCHAR!GenericTypeCompiler.visit_VARCHAR  s$    ''u||U__
 	
r  c               $    V ^8  d   QhRRRRRR/# )r  r  zsqltypes.NVARCHARr  r   r  r   r  )r   s   "r  r  r	    s"     
 
$5 
S 
S 
r  c                	P    V P                  R VP                  VP                  4      # )NVARCHARr
  r  s   &&,r  visit_NVARCHAR"GenericTypeCompiler.visit_NVARCHAR  s$    ''eoo
 	
r  c               $    V ^8  d   QhRRRRRR/# r	  r  )r   s   "r  r  r	    r
  r  c                	P    V P                  R VP                  VP                  4      # )TEXTr
  r  s   &&,r  
visit_TEXTGenericTypeCompiler.visit_TEXT  r
  r  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.Uuid[Any]r  r   r  r   r  )r   s   "r  r  r	    r	  r  c                	    R # )UUIDr  r  s   &&,r  
visit_UUIDGenericTypeCompiler.visit_UUID  rX  r  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.LargeBinaryr  r   r  r   r  )r   s   "r  r  r	    s"       4 C C r  c                	    R # )BLOBr  r  s   &&,r  
visit_BLOBGenericTypeCompiler.visit_BLOB  rX  r  c               $    V ^8  d   QhRRRRRR/# )r  r  zsqltypes.BINARYr  r   r  r   r  )r   s   "r  r  r	    s&     I I/ I I Ir  c                	r    R VP                   ;'       d    RVP                   ,          ;'       g    R,           # )BINARY(%d)r  r
  r  s   &&,r  visit_BINARY GenericTypeCompiler.visit_BINARY  s*    5<<AAFU\\,AGGRHHr  c               $    V ^8  d   QhRRRRRR/# )r  r  zsqltypes.VARBINARYr  r   r  r   r  )r   s   "r  r  r	    s'     L L%7 Ls Ls Lr  c                	r    R VP                   ;'       d    RVP                   ,          ;'       g    R,           # )	VARBINARYr3
  r  r4
  r  s   &&,r  visit_VARBINARY#GenericTypeCompiler.visit_VARBINARY  s*    ellDDv/DJJKKr  c               $    V ^8  d   QhRRRRRR/# r  r  zsqltypes.Booleanr  r   r  r   r  )r   s   "r  r  r	    r	  r  c                	    R # )BOOLEANr  r  s   &&,r  visit_BOOLEAN!GenericTypeCompiler.visit_BOOLEAN  r	  r  c               $    V ^8  d   QhRRRRRR/# r%
  r  )r   s   "r  r  r	    s"     0 0 2 0# 0# 0r  c                	    VP                   '       d   V P                  P                  '       g   V P                  R ^ RR7      # V P                  ! V3/ VB # )r

  N)r
  r  )native_uuidr  supports_native_uuidr
  r(
  r  s   &&,r  
visit_uuidGenericTypeCompiler.visit_uuid  sI       (I(I(I++F2+NN??5/B//r  c               $    V ^8  d   QhRRRRRR/# r+
  r  )r   s   "r  r  r	    $     , ,),14,	,r  c                	(    V P                   ! V3/ VB # r  )r.
  r  s   &&,r  visit_large_binary&GenericTypeCompiler.visit_large_binary       u+++r  c               $    V ^8  d   QhRRRRRR/# r=
  r  )r   s   "r  r  r	    "     / /#3 /3 /3 /r  c                	(    V P                   ! V3/ VB # r  )r@
  r  s   &&,r  visit_boolean!GenericTypeCompiler.visit_boolean      !!%.2..r  c               $    V ^8  d   QhRRRRRR/# r	  r  )r   s   "r  r  r	    !     , , ,S ,S ,r  c                	(    V P                   ! V3/ VB # r  )r	  r  s   &&,r  
visit_timeGenericTypeCompiler.visit_time      u+++r  c               $    V ^8  d   QhRRRRRR/# r	  r  )r   s   "r  r  r	    s"     0 0$5 0S 0S 0r  c                	(    V P                   ! V3/ VB # r  )r	  r  s   &&,r  visit_datetime"GenericTypeCompiler.visit_datetime  s    ""5/B//r  c               $    V ^8  d   QhRRRRRR/# r	  r  )r   s   "r  r  r	    rU
  r  c                	(    V P                   ! V3/ VB # r  )r	  r  s   &&,r  
visit_dateGenericTypeCompiler.visit_date  rY
  r  c               $    V ^8  d   QhRRRRRR/# r	  r  )r   s   "r  r  r	    s"     . .': .# .# .r  c                	(    V P                   ! V3/ VB # r  )r	  r  s   &&,r  visit_big_integer%GenericTypeCompiler.visit_big_integer        -"--r  c               $    V ^8  d   QhRRRRRR/# r	  r  )r   s   "r  r  r	    s$     0 0*0250	0r  c                	(    V P                   ! V3/ VB # r  )r	  r  s   &&,r  visit_small_integer'GenericTypeCompiler.visit_small_integer  s     ""5/B//r  c               $    V ^8  d   QhRRRRRR/# r	  r  )r   s   "r  r  r	    rO
  r  c                	(    V P                   ! V3/ VB # r  )r	  r  s   &&,r  visit_integer!GenericTypeCompiler.visit_integer  rS
  r  c               $    V ^8  d   QhRRRRRR/# r	  r  )r   s   "r  r  r	    s"     , , 2 ,# ,# ,r  c                	(    V P                   ! V3/ VB # r  )r	  r  s   &&,r  
visit_realGenericTypeCompiler.visit_real  rY
  r  c               $    V ^8  d   QhRRRRRR/# r	  r  )r   s   "r  r  r	    s"     - -!4 -C -C -r  c                	(    V P                   ! V3/ VB # r  )r	  r  s   &&,r  visit_floatGenericTypeCompiler.visit_float  s    ,,,r  c               $    V ^8  d   QhRRRRRR/# r	  r  )r   s   "r  r  r	    s"     . ."6 .c .c .r  c                	(    V P                   ! V3/ VB # r  )r	  r  s   &&,r  visit_double GenericTypeCompiler.visit_double  rf
  r  c               $    V ^8  d   QhRRRRRR/# r	  r  )r   s   "r  r  r	    s"     / /#8 / / /r  c                	(    V P                   ! V3/ VB # r  )r	  r  s   &&,r  visit_numeric!GenericTypeCompiler.visit_numeric  rS
  r  c               $    V ^8  d   QhRRRRRR/# r
  r  )r   s   "r  r  r	    s!     / // / / /r  c                	(    V P                   ! V3/ VB # r  r
  r  s   &&,r  visit_string GenericTypeCompiler.visit_string  rS
  r  c               $    V ^8  d   QhRRRRRR/# )r  r  zsqltypes.Unicoder  r   r  r   r  )r   s   "r  r  r	    rO
  r  c                	(    V P                   ! V3/ VB # r  r
  r  s   &&,r  visit_unicode!GenericTypeCompiler.visit_unicode  rS
  r  c               $    V ^8  d   QhRRRRRR/# r	  r  )r   s   "r  r  r	    rU
  r  c                	(    V P                   ! V3/ VB # r  r"
  r  s   &&,r  
visit_textGenericTypeCompiler.visit_text  rY
  r  c               $    V ^8  d   QhRRRRRR/# )r  r  zsqltypes.UnicodeTextr  r   r  r   r  )r   s   "r  r  r	    rI
  r  c                	(    V P                   ! V3/ VB # r  r
  r  s   &&,r  visit_unicode_text&GenericTypeCompiler.visit_unicode_text  rM
  r  c               $    V ^8  d   QhRRRRRR/# )r  r  zsqltypes.Enumr  r   r  r   r  )r   s   "r  r  r	    s!     / / /S /S /r  c                	(    V P                   ! V3/ VB # r  r
  r  s   &&,r  
visit_enumGenericTypeCompiler.visit_enum  rS
  r  c                	<    \         P                  ! R V,          4      h)zKCan't generate DDL for %r; did you forget to specify a type on this Column?r  r  s   &&,r  rV  GenericTypeCompiler.visit_null  s"    #%*+
 	
r  c               $    V ^8  d   QhRRRRRR/# )r  r  zTypeDecorator[Any]r  r   r  r   r  )r   s   "r  r  r	    s)     C C'C/2C	Cr  c                	Z    V P                   ! VP                  V P                  4      3/ VB # r  )r  type_enginer  r  s   &&,r  visit_type_decorator(GenericTypeCompiler.visit_type_decorator  s'     ||E--dll;BrBBr  c               $    V ^8  d   QhRRRRRR/# )r  r  zUserDefinedType[Any]r  r   r  r   r  )r   s   "r  r  r	    s$     ( ()(14(	(r  c                	&    VP                   ! R/ VB # r%  )get_col_specr  s   &&,r  visit_user_defined&GenericTypeCompiler.visit_user_defined  s     !!'B''r  r  N)4r  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.
  r5
  r:
  r@
  rF
  rK
  rQ
  rW
  r\
  r`
  rd
  ri
  rm
  rq
  ru
  ry
  r}
  r
  r
  r
  r
  r
  rV  r
  r
  r  r  r  r  r	  r	  h  s    "
		OP



OIL0,
/,0,.0
/,-.///,,
/
C
( (r  r	  c                  4    ] tR tRtR tR tR tR tR tRt	R# )	StrSQLTypeCompileri%  c                	v     VP                   pV! V 3/ VB #   \         d    T P                  ! T3/ TB u # i ; ir  )r  AttributeError_visit_unknown)r  r  r  r  s   &&, r  r  StrSQLTypeCompiler.process&  sL    	2!&!9!9 &d1b11  	4&&u333	4s    88c                	^    VP                  R 4      '       d   V P                  # \        V4      h)r  )r  r
  r
  )r  r@  s   &&r  __getattr__StrSQLTypeCompiler.__getattr__.  s(    >>(##&&& %%r  c                	    VP                   P                  VP                   P                  P                  4       8X  d   VP                   P                  # \        V4      # r  )r  r  upperreprr  s   &&,r  r
  !StrSQLTypeCompiler._visit_unknown4  sA    ??##u'?'?'E'E'GG??+++;r  c                	    R # rS  r  r  s   &&,r  rV  StrSQLTypeCompiler.visit_null:  rX  r  c                	d     VP                   pV! R/ VB #   \         d    \        T4      u # i ; ir%  )r
  r
  r
  )r  r  r  r
  s   &&, r  r
  %StrSQLTypeCompiler.visit_user_defined=  s=    	& --L  %"%%  	;	s    //r  N)
r  r  r  r  r  r
  r
  rV  r
  r  r  r  r  r
  r
  %  s    2&&r  r
  c                  "    ] tR tRtR R ltRtR# )_SchemaForObjectCallableiF  c                    V ^8  d   QhRRRR/# )r  _SchemaForObjectCallable__objr   r  r   r  )r   s   "r  r  %_SchemaForObjectCallable.__annotate__G  s    ..c.c.r  c                	    R # r  r  )r  r
  s   &&r  r  !_SchemaForObjectCallable.__call__G  s    3r  r  Nr  r  r  r  r
  r
  F  s    ..r  r
  c                  "    ] tR tRtR R ltRtR# )r  iJ  c                    V ^8  d   QhRRRR/# )r  r'  r  r  r   r  )r   s   "r  r  $_BindNameForColProtocol.__annotate__K  s    ::-:#:r  c                	    R # r  r  )r  r'  s   &&r  r   _BindNameForColProtocol.__call__K  s    sr  r  Nr  r  r  r  r  r  J  s    ::r  r  c                     ] tR tRt$ Rt]t]t]	t
R]R&   R]R&   R]R&   ]P                  ! R4      tR	]R
&    RtR]R&   R@R R lltR tR R ltR R ltR R ltR tR R ltR R ltR tRAR R lltRAR  R! lltR" tRBR# R$ lltRAR% R& lltRAR' R( lltRAR) lt] PB                  ! R*4      RBR+ R, ll4       t"RBR- R. llt#RBR/ R0 llt$R1 R2 lt%R3 R4 lt&RCR5 R6 llt'R7 t(RAR8 lt)RDR9 R: llt*RBR; lt+] PX                  R< 4       t-R= R> lt.R?t/R# )Er  iN  z@Handle quoting and case-folding of identifiers based on options.r   initial_quotefinal_quotezMutableMapping[str, str]_stringsr!   r
  r	  Fr*  _includes_none_schema_translateNc               0    V ^8  d   QhRRRRRRRRRR	R
R	/# )r  r  rj   r
  r   r
  rs  escape_quotequote_case_sensitive_collationsr*  omit_schemar  )r   s   "r  r  IdentifierPreparer.__annotate__j  sF     "
 "
"
 "
 #	"

 "
 *."
 "
r  c                    Wn         W n        T;'       g    V P                  V n        W@n        V P                  ^,          V n        W`n        WPn        / V n        V P                   P                  R9   V n	        R# )a+  Construct 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.
N)r   r   )
r  r
  r
  r
  escape_to_quoter
  r
  r
  r  r*  )r  r  r
  r
  r
  r
  r
  s   &&&&&&&r  r  IdentifierPreparer.__init__j  sm    . *&<<$*<*<(#0014&/N, $ 7 7 <
 !
r  c                	   a V P                   P                  V P                   4      pVP                  P                  V P                  4       R V9   oV3R lpW2n        SVn        V# )Nc                
  < V P                   pV P                  '       dZ   Vf	   S'       dN   Ve,   RV9   g   RV9   d   \        P                  ! RV,          4      h\	        RT;'       g    R,          RR7      # V P                   # )NrU  rV  zJSquare bracket characters ([]) not supported in schema translate name '%s'z__[SCHEMA_%s]_noneFr  )r!   _use_schema_mapr/   r$  r,   )r  r   includes_nones   & r  symbol_getter@IdentifierPreparer._with_schema_translate.<locals>.symbol_getter  s|    ::D"""(8M#t**8:>?  ##tw7u  zz!r  )r  __new__r  r  r	  r
  )r  r  prepr
  r
  s   &&  @r  r  )IdentifierPreparer._with_schema_translate  sV    ~~%%dnn5T]]+ 44	" "//<,r  c               $    V ^8  d   QhRRRRRR/# )r  r3  r   r  rk   r  r  )r   s   "r  r  r
    s)     )F )F)F4J)F	)Fr  c                	   a a VoR S9   d5   S P                   '       g   \        P                  ! R4      hSR ,          SR&   VV 3R lp\        P                  ! RW14      # )Nzschema translate map which previously did not have `None` present as a key now has `None` present; compiled statement may lack adequate placeholders.  Please use consistent keys in successive schema_translate_map dictionaries.r
  c                   < V P                  ^4      pVS9   d   SV,          pMVR9   d   \        P                  ! R4      hTpV'       g5   SP                  P                  pV'       g   \        P
                  ! R4      hSP                  V4      # )r  zschema translate map which previously had `None` present as a key now no longer has it present; don't know how to apply schema for compiled statement. Please use consistent keys in successive schema_translate_map dictionaries.zLDialect has no default schema name; can't use None as dynamic schema target.)Nr
  )r   r/   rD  r  default_schema_namer$  r
  )r  r   r  dr  s   &  r  r+  =IdentifierPreparer._render_schema_translates.<locals>.replace  s    771:Dqy#$T7 ?*11=  $( ##'<<#C#C '**=  $$%566r  z(__\[SCHEMA_([^\]]+)\]))r
  r/   rD  r  r  )r  r3  r  r+  r
  s   f&& @r  r  ,IdentifierPreparer._render_schema_translates  s]     !19777--9  4AgJ	72 vv0'EEr  c                    V ^8  d   QhRRRR/# r  r  r   r  r  )r   s   "r  r  r
    s     
 
 
 
r  c                    VP                  V P                  V P                  4      pV P                  '       d   VP                  RR4      pV# )zhEscape an identifier.

Subclasses should override this to provide database-dependent
escaping behavior.
rK  r(  )r+  r
  r
  r*  r  r  s   &&r  _escape_identifier%IdentifierPreparer._escape_identifier  sA     d//1E1EF   MM#t,Er  c                    V ^8  d   QhRRRR/# r
  r  )r   s   "r  r  r
    s     F F# F# Fr  c                N    VP                  V P                  V P                  4      # )zCanonicalize an escaped identifier.

Subclasses should override this to provide database-dependent
unescaping behavior that reverses _escape_identifier.
)r+  r
  r
  r
  s   &&r  _unescape_identifier'IdentifierPreparer._unescape_identifier  s!     }}T1143D3DEEr  c                    VeA   VP                  V4      '       g*   \        P                  ! RV: RVP                  : R24      hV# )zkeyword 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

zUnexpected SQL phrase: z (matching against rO  )r  r/   r$  r*  )r  r  r  s   &&&r  r	  &IdentifierPreparer.validate_sql_phrase  s@     syy'9'9""CKK)  r  c                    V ^8  d   QhRRRR/# r
  r  )r   s   "r  r  r
    s     
 
c 
c 
r  c                h    V P                   V P                  V4      ,           V P                  ,           # )zfQuote an identifier.

Subclasses should override this to provide database-dependent
quoting behavior.
)r
  r
  r
  r
  s   &&r  quote_identifier#IdentifierPreparer.quote_identifier  s3     %%e,-	
r  c                    V ^8  d   QhRRRR/# )r  r  r   r  r*  r  )r   s   "r  r  r
    s     
 
c 
d 
r  c                    VP                  4       pW P                  9   ;'       gT    V^ ,          V P                  9   ;'       g6    V P                  P	                  \        V4      4      '       * ;'       g    W!8g  # )z5Return True if the given identifier requires quoting.)r  reserved_wordsillegal_initial_characterslegal_charactersr  r   )r  r  lc_values   && r  rS  #IdentifierPreparer._requires_quotes  sq    ;;=+++ # #Qx4:::# #((..s5z::# # !		
r  c                T    V P                   P                  \        V4      4      '       * # )zbReturn True if the given identifier requires quoting, but
not taking case convention into account.)r
  r  r   r
  s   &&r  r  1IdentifierPreparer._requires_quotes_illegal_chars  s"     ((..s5z:::r  c               $    V ^8  d   QhRRRRRR/# )r  r!   r   forcer   r  r  )r   s   "r  r  r
    s!     %" %"3 %"s %"c %"r  c                \    Ve   \         P                  ! RRR7       V P                  V4      # )a  Conditionally 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`.

zThe 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().0.9r#  )r$   r&  r  )r  r!   r
  s   &&&r  r
  IdentifierPreparer.quote_schema  s5    .    !  zz&!!r  c               $    V ^8  d   QhRRRRRR/# )r  rA  r   r
  r   r  r  )r   s   "r  r  r
  ;  s!     2 23 2s 2c 2r  c                   Ve   \         P                  ! RRR7       \        VRR4      pVf{   WP                  9   d   V P                  V,          # V P	                  V4      '       d    V P                  V4      V P                  V&   MWP                  V&   V P                  V,          # V'       d   V P                  V4      # V# )a  Conditionally 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`.

NzThe 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
  r#  r  )r$   r&  r  r
  rS  r
  )r  rA  r
  s   &&&r  r  IdentifierPreparer.quote;  s    ,    !  w-=%}}U++((//+/+@+@+GDMM%(+0MM%(}}U++((//Lr  c                	L    V P                   '       d   V P                  V4      # V# r  )r
  r  )r  collation_names   &&r  r  #IdentifierPreparer.format_collationo  s#    ///::n--!!r  c               $    V ^8  d   QhRRRRRR/# )r  r  zschema.SequencerM  r*  r  r   r  )r   s   "r  r  r
  u  s$      '59	r  c                	    V P                  VP                  4      pV P                  V4      pV P                  '       g,   V'       d$   Ve    V P	                  V4      R,           V,           pV# r  )r  r   r	  r
  r
  )r  r  rM  r   r  s   &&&  r  rP  "IdentifierPreparer.format_sequenceu  s^     zz(--(11(;     ,$$%56<tCDr  c               $    V ^8  d   QhRRRRRR/# )r  r#  z
Label[Any]r   rs  r  r   r  )r   s   "r  r  r
    s$     . ..'4.	.r  c                	L    T P                  T;'       g    VP                  4      # r  r  r   )r  r#  r   s   &&&r  r  IdentifierPreparer.format_label  s     zz$,,%**--r  c               $    V ^8  d   QhRRRRRR/# )r  r  zOptional[AliasedReturnsRows]r   rs  r  r   r  )r   s   "r  r  r
    s$     $ $1$9F$	$r  c                	n    Vf"   Vf   Q hV P                  VP                  4      # V P                  V4      # r  r  )r  r  r   s   &&&r  rM  IdentifierPreparer.format_alias  s7     <$$$::ejj))::d##r  c                	    T;'       g    VP                   pV P                  V4      '       d   V P                  V4      pV# r  )rA  rS  r
  )r  	savepointr   rA  s   &&& r  r  #IdentifierPreparer.format_savepoint  s;     ''	  ''))%0Er  zsqlalchemy.sql.namingc               $    V ^8  d   QhRRRRRR/# )r  r}   zUnion[Constraint, Index]_alembic_quoter*  r  rs  r  )r   s   "r  r  r
    s$      2DH	r  c                	0   \         P                  P                  pVP                  \        J d#   VP                  WP                  4      pVf   R # MVP                  pVf   Q hVP                  R8X  d   V P                  WBR7      # V P                  WBR7      # )Nr  )r  )
r$   rz  
sql_namingr   r)   _constraint_name_for_tabler   r8  truncate_and_render_index_name#truncate_and_render_constraint_name)r  r}   r  namingr   s   &&&  r  r	  $IdentifierPreparer.format_constraint  s     **??j(44,,D |  ??D$$/66 7   ;; <  r  c               $    V ^8  d   QhRRRRRR/# r  r   r   r  r*  r  r  )r   s   "r  r  r
    $     
 

)-
	
r  c                	    V P                   P                  ;'       g    V P                   P                  pV P                  WV4      # r  )r  max_index_name_lengthr   _truncate_and_render_maxlen_namer  r   r  max_s   &&& r  r  1IdentifierPreparer.truncate_and_render_index_name  sG     LL.. 2 2||11 	 44
 	
r  c               $    V ^8  d   QhRRRRRR/# r  r  )r   s   "r  r  r
    r  r  c                	    V P                   P                  ;'       g    V P                   P                  pV P                  WV4      # r  )r  max_constraint_name_lengthr  r  r  s   &&& r  r  6IdentifierPreparer.truncate_and_render_constraint_name  sG     LL33 2 2||11 	 44
 	
r  c               (    V ^8  d   QhRRRRRRRR/# )r  r   r   r  rS  r  r*  r  r  )r   s   "r  r  r
    s,     $ $$"$48$	$r  c                	2   \        V\        P                  4      '       dC   \        V4      V8  d2   V^ V^,
           R,           \        P
                  ! V4      RR ,           pMV P                  P                  V4       V'       g   V# V P                  V4      # )r  rT  N)	r  r   r@   r  r$   md5_hexr  validate_identifierr  )r  r   r  r  s   &&&&r  r  3IdentifierPreparer._truncate_and_render_maxlen_name  sw     dH55664y4Aq)C/$,,t2DRS2IILL,,T2K::d##r  c                    V ^8  d   QhRRRR/# )r  r  rP   r  r   r  )r   s   "r  r  r
    s      % C r  c                	4    V P                  V4      pVf   Q hV# r  )r	  )r  r  r   s   && r  r  IdentifierPreparer.format_index  s#    %%e,r  c               (    V ^8  d   QhRRRRRRRR/# )	r  r   rX   rM  r*  r   rs  r  r   r  )r   s   "r  r  r
    s2        	
 
r  c                4   Vf1   \         '       d   \        V\        4      '       g   Q hVP                  pV P	                  V4      pV P                  V4      pV P                  '       g0   V'       d(   V'       d    V P                  V4      R,           V,           pV# )z'Prepare a quoted table and schema name.rS  )r   r  rY   r   r  r	  r
  r
  )r  r   rM  r   r  r  s   &&&&  r  r  IdentifierPreparer.format_table  sz     <}!%9999::DD!11%8J3C&&'783>GFr  c                $    V P                  V4      # )zPrepare a quoted schema name.r
  r!  s   &&r  r   IdentifierPreparer.format_schema  s     zz$r  c                    Ve2   \        V\        P                  4      '       d   VP                  V4      pV P	                  V4      # )Prepare a quoted column name.)r  r   r@   r  r  )r  r   r  s   &&&r  r@  $IdentifierPreparer.format_label_name  s@     J(++%
 %
 >>(+Dzz$r  c               4    V ^8  d   QhRRRRRRRRRRR	R
RR/# )r  r|   zColumnElement[Any]r  r*  r   rs  
table_namerM  r  zOptional[Mapping[str, Any]]r  r   r  )r   s   "r  r  r
    sP     , ,", , 	,
 ", , ., 
,r  c                   Vf   VP                   pVf   Q hVe2   \        V\        P                  4      '       d   VP	                  V4      p\        VRR4      '       gT   V'       d;   V P                  VP                  WTR7      R,           V P                  V4      ,           # V P                  V4      # V'       d,   V P                  VP                  WTR7      R,           V,           # V# )r3  r  F)rM  r   rS  )	r   r  r   r@   r  r  r  r   r  )r  r|   r  r   r6  rM  r  s   &&&&&&&r  r   IdentifierPreparer.format_column  s     <;;D###J(++%
 %
 >>(+Dv|U33%% &   jj&	' zz$''
 %% &   	 r  c                    V P                  V4      pV P                  '       g5   V'       d-   V'       d%   V P                  V4      V P                  VRR7      3# V P                  VRR7      3# )z(Format table name and schema as a tuple.Fr  )r	  r
  r
  r  )r  r   rM  r  s   &&& r  r  #IdentifierPreparer.format_table_seq9  sm      11%8J3C!!"23!!%E!: 
 %%e%>@@r  c           	     	    R  V P                   V P                  V P                  V P                  4      3 4       w  rp\        P                  ! RRVRVRV/,          4      pV# )c              3  N   "   T F  p\         P                  ! V4      x  K  	  R # 5ir  )r  r  rg  s   & r  rA  4IdentifierPreparer._r_identifiers.<locals>.<genexpr>L  s%      )
 IIaLLs   #%zM(?:(?:%(initial)s((?:%(escaped)s|[^%(final)s])+)%(final)s|([^\.]+))(?=\.|$))+initialfinalr  )r
  r
  r
  r  r  )r  r>  r?  escaped_finalrs   &    r  _r_identifiers!IdentifierPreparer._r_identifiersJ  st    )
 ""  ''(8(89)
% JJ$ '7E9mLM
 r  c                    V ^8  d   QhRRRR/# )r  identifiersr   r  zSequence[str]r  )r   s   "r  r  r
  \  s     
 
 
 
r  c                    V P                   pVP                  V4       UUu. uF  w  r4T;'       g    TNK  	  upp Uu. uF  pV P                  V4      NK  	  up# u uppi u upi )z:Unpack 'schema.table.column'-like strings into components.)rB  findallr
  )r  rE  rA  ar  rJ  s   &&    r  unformat_identifiers'IdentifierPreparer.unformat_identifiers\  sh      *+;)?@)?aff1f)?@
@ %%a(@
 	
@
s   AAA!)	r*  r
  r  r
  r
  r
  r
  r
  r
  )r  Nr  TFr  )T)TN)FNNFN)0r  r  r  r  r	  RESERVED_WORDSr
  LEGAL_CHARACTERSr
  ILLEGAL_INITIAL_CHARACTERSr
  r
  r  
attrgetterr	  r
  r  r  r  r
  r
  r	  r
  rS  r  r
  r  r  rP  r  rM  r  r$   r0  r	  r  r  r  r  r  r  r@  r  r  r,  rB  rI  r  r  r  r  r  r  N  s   J#N'!;&&2:2E2Eh2O/O -2#T1"
H0)FV
F$

;
%"N2h".
$ 
01 22

$
( 
 ,\A" 
 "
 
r  r  )__conditional_annotations__r	  
__future__r   r  collections.abcabcrN  r.  enumr   r  r  r  r  timer   r2  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  _typingr%   r&   r'   r(   r)   r*   r+   r,   r-   visitorsr.   r/   r0   util.typingr1   r2   r3   r4   
annotationr5   r6   r7   r8   r  r9   r  r:   dmlr;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   rZ   r[   r\   type_apir]   r^   r_   r`   ra   engine.cursorrb   engine.interfacesrc   rd   re   rf   rg   rh   ri   rj   rk   r   _FromHintsTyperK  r  IrL  LEGAL_CHARACTERS_PLUS_SPACEr  r   rM  r	  r	  r	  UNICODEr>  r=  r  r  rx  or_r+  mulr  modnegltlenegtgeeqis_distinct_fromis_not_distinct_from	concat_opr'  not_match_opr7  r6  r+  r  r  r  r  r{   existsdistinct_opinvany_opall_opdesc_opasc_opnulls_first_opnulls_last_opbitwise_xor_opbitwise_or_opbitwise_and_opbitwise_not_opbitwise_lshift_opbitwise_rshift_opr  r   r   r   r   r   r   r   r   r   r   r   cuberollupgrouping_setsr   r
  r&  _CompoundSelectKeywordr   	UNION_ALLr   
EXCEPT_ALLr   INTERSECT_ALLr'  r   r  r  r  r   r!  r#  r(  r2  rO  r^  rk  ru  rz  rE  r{  r|  r}  r~  
namedtupler  r  EnsureKWArgr  BinaryElementRoleCompilerColumnElementr"  r;  r  r7  ro  r	  r
  r
  r  r  )r  rO  s   0@r  <module>r     s  " #  )      	             !                       &     2  !  %    ! "  #	+," #)#**''&' #'",',(1./&+'"','$)#4<:<=3=C+: lC'(_	__ _ 
	_
 
_ _ 	_ 
_ _ _ _ _ _ _ _  !_" #_$ %_& '_( )_* +_, -_. /_0 1_2 3_4 5_6 7_8 9_: ;_< =_> 	?_@ A_B 
C_D E_F G_H 
I_J K_L M_N O_P Q_R S_T U_V W_X Y_Z 	[_\ ]_^ __` a_b c_d 	e_f g_h i_j k_l m_n o_p q_r s_t u_v w_x 
y_z 
{_| }_~ _@ 
A_B C_D 
E_F 	G_H I_J 	K_L M_N O_P Q_R S_T U_V W_X Y_Z [_\ ]_^ 
__` a_b c_d e_f g_h i_j 	k_l m_n o_p q_r s_t u_v w_x y_z {_| }_B ::.5  jj):BDDA .3Arl;lc!fl;AA3%H zz<bdd zz<bdd zz5rtt<jjA2::N**92::F$ "Se~n[.NNG. MM6. MM5	.
 MM5. MM5. MM5. MM3. LL%. LL&. LL&. LL%. LL&. LL%.  4.  ""$<!." #.$ 	%.& M'.( OOV).* +., -.. OOX/.0 MM61.2 MM63.4 j5.6 {7.: i;.< ;=.> MM6?.@ fA.B fC.F wG.H fI.J nK.L ]eUec[.	b 
NN!4N.hyNNNFNNFh_-	) & W	5
Fh
F	5hy	5
FWNN_(& %%++W%%//%%,,h%%00,%%//%%33_  >   ! *   
J  i $1 $:J :zt
 tnZ 2!; !$G  g . FKF B
&l
?#''w6HI ?#DI' I'XF4## F0	C ("@"@2#
	C ("@"@#
L]V
( ]V
@ml
[ l
^z( zzz(, z(z&, &B/x /;h ;U
 U
mb <s   i