ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙ 4]c@sdZddlZddlZddlmZddlmZddlmZejdZ ejd Z d e fd YZ d Z ejd ZdejjfdYZdejjfdYZde fdYZde fdYZdefdYZde fdYZdefdYZdejfdYZdejefdYZd ejfd!YZdd"Z dS(#s4Foundational utilities common to many sql modules. iNi(t ClauseVisitori(texc(tutiltPARSE_AUTOCOMMITtNO_ARGt ImmutablecBs)eZdZdZdZdZRS(s@mark a ClauseElement as 'immutable' when expressions are cloned.cOstddS(Ns(Immutable objects do not support copying(tNotImplementedError(tselft optionaldicttkwargs((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt unique_paramsscOstddS(Ns(Immutable objects do not support copying(R(RRR ((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pytparamsscCs|S(N((R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt_clone"s(t__name__t __module__t__doc__R R R (((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRs  cGs#tjg|D]}|j^q S(N(t itertoolstchaint _from_objects(telementstelement((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyR&scOs(|dj}|||d||S(sMark a method as generative.ii(t _generate(tfntargstkwR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt _generative*st_DialectArgViewcBsMeZdZdZdZdZdZdZdZdZ RS(saA dictionary view of dialect-level arguments in the form _. cCs ||_dS(N(tobj(RR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt__init__9scCsJy|jdd\}}Wntk r;t|n X||fSdS(Nt_i(tsplitt ValueErrortKeyError(Rtkeytdialectt value_key((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt_key<s  cCsX|j|\}}y|jj|}Wn tjk rKt|n X||SdS(N(R$Rtdialect_optionsRtNoSuchModuleErrorR (RR!R"R#topt((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt __getitem__Ds cCsTy|j|\}}Wn tk r;tjdnX||jj||_(R$R Rt ArgumentErrorRR%(RR!tvalueR"R#((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt __setitem__Ns   cCs*|j|\}}|jj||=dS(N(R$RR%(RR!R"R#((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt __delitem__XscCs td|jjjDS(Ncss|]}t|jVqdS(N(tlent _non_defaults(t.0R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pys ^s(tsumRR%tvalues(R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt__len__\scsfdjjDS(Nc3sB|]8}jj|jD]}tjd||fVqqdS(s%s_%sN(RR%R.Rt safe_kwarg(R/t dialect_namet value_name(R(sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pys ds (RR%(R((RsF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt__iter__bs ( R RRRR$R(R+R,R2R6(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyR3s    t_DialectArgDictcBsDeZdZdZdZdZdZdZdZRS(sA dictionary view of dialect-level arguments for a specific dialect. Maintains a separate collection of user-specified arguments and dialect-specified default arguments. cCsi|_i|_dS(N(R.t _defaults(R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRus cCstt|jj|jS(N(R-tsetR.tunionR8(R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyR2yscCstt|jj|jS(N(titerR9R.R:R8(R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyR6|scCs)||jkr|j|S|j|SdS(N(R.R8(RR!((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyR(s cCs||j|_`` format. Only arguments that were actually passed are included; unlike the :attr:`.DialectKWArgs.dialect_options` collection, which contains all options known by this dialect including defaults. The collection is also writable; keys are accepted of the form ``_`` where the value will be assembled into the list of options. .. versionadded:: 0.9.2 .. versionchanged:: 0.9.4 The :attr:`.DialectKWArgs.dialect_kwargs` collection is now writable. .. seealso:: :attr:`.DialectKWArgs.dialect_options` - nested dictionary form (R(R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pytdialect_kwargsscCs|jS(s4A synonym for :attr:`.DialectKWArgs.dialect_kwargs`.(RD(R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyR sssqlalchemy.dialectscCs2|jj|}|jdkr%dSt|jS(N(tregistrytloadtconstruct_argumentsR>tdict(tdialectsR4t dialect_cls((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt_kw_reg_for_dialectscCstj|}t}|dkr<|jjidd6n@x=t|jjD])}||krO|jj||qOqOW|S(Nt*( R<R=R7R>R8tupdatetreversedt __class__t__mro__(RR4RBtdR?((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt_kw_reg_for_dialect_clss    cCstjtj|jS(sA collection of keyword arguments specified as dialect-specific options to this construct. This is a two-level nested registry, keyed to ```` and ````. For example, the ``postgresql_where`` argument would be locatable as:: arg = my_object.dialect_options['postgresql']['where'] .. versionadded:: 0.9.2 .. seealso:: :attr:`.DialectKWArgs.dialect_kwargs` - flat dictionary form (Rt PopulateDicttportable_instancemethodRR(R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyR%scCs%|s dSx|D] }tjd|}|sBtd|n|jdd\}}y|j|}Wngtjk rtjd||ft |j|<}|j j idd6|||j |_, got '%s'iisHCan't validate argument %r; can't locate any SQLAlchemy dialect named %rRLs9Argument %r is not accepted by dialect %r on behalf of %r(tretmatcht TypeErrortgroupR%RR&RtwarnR7R8RMR>R.R)RO(RR tktmR4targ_nameRBRQ((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt_validate_dialect_kwargss0    (R RRt classmethodRCRtmemoized_propertyRDtpropertyR t dependenciesRKRSR=RRR%R](((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyR<s 2 t GenerativecBseZdZdZRS(sRAllow a ClauseElement to generate itself via the @_generative decorator. cCs+|jj|j}|jj|_|S(N(ROt__new__t__dict__tcopy(Rts((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRDs(R RRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRb>st ExecutablecBs_eZdZeZejZdZ e dZ dZ dZ dZedZRS(sMark a ClauseElement as supporting execution. :class:`.Executable` is a superclass for all "statement" types of objects, including :func:`select`, :func:`delete`, :func:`update`, :func:`insert`, :func:`text`. cKsUd|krtjdnd|kr<tjdn|jj||_dS(sc Set non-SQL options for the statement which take effect during execution. Execution options can be set on a per-statement or per :class:`.Connection` basis. Additionally, the :class:`.Engine` and ORM :class:`~.orm.query.Query` objects provide access to execution options which they in turn configure upon connections. The :meth:`execution_options` method is generative. A new instance of this statement is returned that contains the options:: statement = select([table.c.x, table.c.y]) statement = statement.execution_options(autocommit=True) Note that only a subset of possible execution options can be applied to a statement - these include "autocommit" and "stream_results", but not "isolation_level" or "compiled_cache". See :meth:`.Connection.execution_options` for a full list of possible options. .. seealso:: :meth:`.Connection.execution_options` :meth:`.Query.execution_options` :meth:`.Executable.get_execution_options` tisolation_levels'isolation_level' execution option may only be specified on Connection.execution_options(), or per-engine using the isolation_level argument to create_engine().tcompiled_cachesm'compiled_cache' execution option may only be specified on Connection.execution_options(), not per statement.N(RR)t_execution_optionsR:(RR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pytexecution_optionsWs    cCs|jS(s Get the non-SQL options which will take effect during execution. .. versionadded:: 1.3 .. seealso:: :meth:`.Executable.execution_options` (Rj(R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pytget_execution_optionss cOs\|j}|dkrIt|d|jj}d|}tj|n|j|||S(s.Compile and execute this :class:`.Executable`.t descriptionsThis %s is not directly bound to a Connection or Engine. Use the .execute() method of a Connection or Engine to execute this construct.N(tbindR>tgetattrROR RtUnboundExecutionErrort_execute_clauseelement(Rt multiparamsR tetlabeltmsg((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pytexecutes  cOs|j||jS(snCompile and execute this :class:`.Executable`, returning the result's scalar representation. (Rvtscalar(RRrR ((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRwscCs`|jdk r|jSxCt|D]1}||kr;q#n|j}|dk r#|Sq#WdSdS(s5Returns the :class:`.Engine` or :class:`.Connection` to which this :class:`.Executable` is bound, or None if none found. This is a traversal which checks locally, then checks among the "from" clauses of associated objects until a bound engine or connection is found. N(t_bindR>RRn(Rtftengine((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRns    N(R RRtTruetsupports_executionRt immutabledictRjR>RxRRkRlRvRwR`Rn(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRgJs . tSchemaEventTargetcBs eZdZdZdZRS(sBase class for elements that are the targets of :class:`.DDLEvents` events. This includes :class:`.SchemaItem` as well as :class:`.SchemaType`. cCsdS(s0Associate with this SchemaEvent's parent object.N((Rtparent((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt _set_parenttcCs7|jj|||j||jj||dS(N(tdispatchtbefore_parent_attachRtafter_parent_attach(RR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt_set_parent_with_dispatchs (R RRRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyR~s t SchemaVisitorcBseZdZied6ZRS(s/Define the visiting for ``SchemaItem`` objects.tschema_visitor(R RRR{t__traverse_options__(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRstColumnCollectioncBseZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d ZdZejd dZdZdZdZdZdZRS(sAn ordered dictionary that stores a list of ColumnElement instances. Overrides the ``__eq__()`` method to produce SQL clauses between sets of correlated columns. t _all_columnscGsHtt|jtj|dgx|D]}|j|q-WdS(NR(tsuperRRtobjectt __setattr__tadd(Rtcolumnstc((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRs cCs#tg|D]}t|^q S(N(treprtstr(RR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt__str__scCsd}|j|kr_|j|jkr_||j}|j|jkr_|}|j|j=q_n|j|jkr|j|j}n||j|j<|dk rg|jD]}||kr|n|^q|j(n|jj|dS(sadd the given column to this collection, removing unaliased versions of this column as well as existing columns with the same key. e.g.:: t = Table('sometable', metadata, Column('col1', Integer)) t.columns.replace(Column('col1', Integer, key='columnone')) will remove the original 'col1' from the collection, and add the new column under the name 'columnname'. Used by schema.Column to override columns during table reflection. N(R>tnameR!t_dataRtappend(Rtcolumnt remove_coltotherR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pytreplaces!  5cCs,|jstjdn|||jR_tresetRRR(RR!R*texisting((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyR+s    cCs tdS(N(R(R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pytclear7scCs=|j|j=g|jD]}||k r|^q|j(dS(N(RR!R(RRR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pytremove:s csYt|}t|j|jjfd|D|jjd|DdS(Nc3s'|]\}}|kr|VqdS(N((R/RtR(t all_col_set(sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pys Dscss!|]\}}||fVqdS(N((R/RtR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pys Fs(tlistR9RtextendRRM(Rtiter_tcols((RsF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRM@s   csYt|}t|j|jjfd|D|jjd|DdS(Nc3s!|]}|kr|VqdS(N((R/R(R(sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pys Kscss|]}|j|fVqdS(N(R!(R/R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pys Ls(RR9RRRRM(RRR((RsF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRHs  ssqlalchemy.sql.elementscCsig}xSt|d|D]?}x6|jD]+}|j|r)|j||kq)q)WqW|j|S(NR(RoRRRtand_(RRRtlRtlocal((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt__eq__Ps cCs7t|tjs$tjdntjj||S(Ns'__contains__ requires a string argument(t isinstanceRt string_typesRR)tOrderedPropertiest __contains__(RR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRYscCsi|jd6|jd6S(NRR(RR(R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt __getstate__^scCs2tj|d|dtj|d|ddS(NRR(RR(Rtstate((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt __setstate__ascCs|t|jkS(N(R9R(Rtcol((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pytcontains_columnescCst|j|jS(N(tImmutableColumnCollectionRR(R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt as_immutablehsN(R RRt __slots__RRRRR,RR+RRRMRR>t__hash__RRaRRRRRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRs(   "           RcBs!eZdZejjZZRS(cCs*tjj||tj|d|dS(NR(RtImmutablePropertiesRRR(Rtdatat all_columns((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRms(R RRRRt _immutableRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRls t ColumnSetcBsDeZdZdZdZejddZdZRS(cCs ||kS(N((RR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRuscCs"x|D]}|j|qWdS(N(R(RRR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRxs cCst|t|S(N(R(RR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt__add__|sssqlalchemy.sql.elementscCsZg}xD|D]<}x3|D]+}|j|r|j||kqqWq W|j|S(N(RRR(RRRRRR((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRs   cCsttd|DS(Ncss|] }|VqdS(N((R/tx((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pys s(thashttuple(R((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRs( R RRRRRRaRR(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyRts     cCs|j}|s|jj}t|dt|dd}|rRd||f}n d|}|dkrud|}ntj|n|S(NtfullnameRs %s object %rs %s objectsm%s is not bound to an Engine or Connection. Execution can not proceed without a database to execute against.(RnROR RoR>RRp(t schemaitemRuRnRRttitem((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt_bind_or_errors     (!RRRUtvisitorsRRRRtsymbolRRRRRt decoratorRtcollections_abctMutableMappingRR7R<RbRgR~RRRRRtordered_column_setRR>R(((sF/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/sql/base.pyt s*    9  q