Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
‹EYc@s•dZddlmZmZddlmZmZddlZddlZyddl	m
Z
d„ZWnek
rƒd„ZnXydd	l	m
Z
Wn'ek
rÁd
efd„ƒYZ
nXde
fd
„ƒYZy!ddlmZejeƒWnek
rnXdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdefd„ƒYZdS(sSDefine result set constructs including :class:`.ResultProxy`
and :class:`.RowProxy.i(texctutil(t
expressiontsqltypesiÿÿÿÿN(tsafe_rowproxy_reconstructorcCs
t||ƒS(N(R(tclststate((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pytrowproxy_reconstructorscCs |j|ƒ}|j|ƒ|S(N(t__new__t__setstate__(RRtobj((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRs
(tBaseRowProxyRcBsMeZdZd„Zd„Zd„Zd„Zd„Zd	„Zd
„Z	RS(t_parentt_rowt_processorst_keymapcCs(||_||_||_||_dS(s8RowProxy objects are constructed by ResultProxy objects.N(RR
RR(tselftparenttrowt
processorstkeymap((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__init__*s			cCst|j|jƒffS(N(Rt	__class__t__getstate__(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt
__reduce__2scCs
t|ƒS(s9Return the values represented by this RowProxy as a list.(tlist(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pytvalues6sccsIxBt|j|jƒD]+\}}|dkr6|Vq||ƒVqWdS(N(tzipRR
tNone(Rt	processortvalue((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__iter__:s"cCs
t|jƒS(N(tlenR
(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__len__AscCs&y|j|\}}}Wn»tk
rH|jj|ƒ\}}}ntk
r×t|tƒrÑg}xZt|j||j	|ƒD];\}}|dkr°|j|ƒqˆ|j||ƒƒqˆWt|ƒS‚nX|dkrút
jd|ƒ‚n|dk	r||j	|ƒS|j	|SdS(NsVAmbiguous column name '%s' in result set! try 'use_labels' option on select statement.(RtKeyErrorRt
_key_fallbackt	TypeErrort
isinstancetsliceRRR
RtappendttupleRtInvalidRequestError(RtkeyRR
tindextlR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__getitem__Ds*



cCs9y||SWn&tk
r4}t|jdƒ‚nXdS(Ni(R"tAttributeErrortargs(Rtnamete((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__getattr__^s(s_parents_rows_processorss_keymap(
t__name__t
__module__t	__slots__RRRRR!R-R2(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR's						tRowProxycBsªeZdZdZd„Zd„Zd„ZdZd„Z	d„Z
d„Zd„Zd„Z
d	„Zd
„Zd„Zd„Zd
„Zd„Zd„Zd„ZRS(sxProxy values from a single cursor row.

    Mostly follows "ordered dictionary" behavior, mapping result
    values to the string-based column name, the integer position of
    the result in the row, as well as Column instances which can be
    mapped to the original Columns that produced this result set (for
    results that correspond to constructed SQL expressions).
    cCs|jj|ƒS(N(Rt_has_key(RR*((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__contains__pscCsi|jd6t|ƒd6S(NRR
(RR((R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRss
cCs:|d|_}|d|_|j|_|j|_dS(NRR
(RR
RR(RRR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR	ys
cCs;t|tƒr(|t|ƒt|ƒƒS|t|ƒ|ƒS(N(R%R6R((Rtothertop((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt_ops(cCs|j|tjƒS(N(R;toperatortlt(RR9((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__lt__†scCs|j|tjƒS(N(R;R<tle(RR9((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__le__‰scCs|j|tjƒS(N(R;R<tge(RR9((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__ge__ŒscCs|j|tjƒS(N(R;R<tgt(RR9((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__gt__scCs|j|tjƒS(N(R;R<teq(RR9((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__eq__’scCs|j|tjƒS(N(R;R<tne(RR9((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__ne__•scCstt|ƒƒS(N(treprR((R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt__repr__˜scCs|jj|ƒS(s4Return True if this RowProxy contains the given key.(RR7(RR*((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pythas_key›scCs'g|jƒD]}|||f^q
S(s@Return a list of tuples, each tuple containing a key/value pair.(tkeys(RR*((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pytitems scCs
|jjS(s@Return the list of keys as strings represented by this RowProxy.(RRL(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRL¥scCst|jjƒS(N(titerRRL(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pytiterkeysªscCs
t|ƒS(N(RN(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt
itervalues­s(N(R3R4t__doc__R5R8RR	Rt__hash__R;R>R@RBRDRFRHRJRKRMRLRORP(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR6es&															(tSequencetResultMetaDatacBsweZdZd„Zeed„ƒZejddƒd„ƒZ	ed„Z
d„Zed„Zd	„Z
d
„ZRS(sRHandle cursor.description, applying additional info from an execution
    context.cCs·|j}|j}|j}|j}|j|_}d|_|jrd|j\}}	t|ƒ}
nd}
|
r|	r|
t|ƒkrgt	|ƒD]Y\}\}}
}}|||sÅ|
j
ƒn|
|j||||dƒ|df^q•}g|D]}|d^qû|_n€|
r2|j
||ƒ}ng}g|_d}xMt	|ƒD]?\}}|d}|d}|jr|j|ƒ}n|rª||ƒ\}}n|jrÅ|j|ƒ}n|jj|ƒ|sê|j
ƒ}n|
rDy||}Wn,tk
r,|j|tjƒ}d}q_X|d}|d}n|j|tjƒ}d}|j|||ƒ}|j||||||fƒqTWtg|D]+}|d|d|d|dff^q¡ƒ|_g|D]}|d^qß|_|
r&tg|D]+}|d|d|d|dff^qƒ}t|ƒ|
krÇtƒ}xm|D]b}|d}||kr³|js|j
ƒn|}d||ddf||<n|j|ƒq^Wn|jjg|D]5}|dr×|dD]}|||df^qïq׃|jj|ƒn|jjg|D]+}|d|d|d|dff^q6ƒ|r³|jjg|D]+}|dr~|d|j|df^q~ƒndS(Niiiiii(tcontexttdialecttdbapi_type_mapt_translate_colnametcase_sensitiveRt_orig_processorstresult_column_structR t	enumeratetlowertget_result_processorRLt_create_result_maptdescription_encodingt_description_decodertrequires_name_normalizetnormalize_nameR'R"tgetRtNULLTYPEtdictRRtsettaddtupdate(RRtmetadataRURVttypemapttranslate_colnameRYtresult_columnstcols_are_orderedtnum_ctx_colstidxR*R0R
ttype_trawtelemt
result_maptuntranslatedtrectcolnametcoltypetctx_rectmapped_typeRtby_keytseentobj_elem((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR½s˜						
i#	

		



; 8	

	,	6	c
CsŒi}x|D]w}|d|d}}|s=|jƒ}n||krz||\}}}	|||d|	f||<q
|||<q
W|S(Nii(R](
RRmRYtdRsR*Rvte_namete_objte_type((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR_Ns
s0.8s,sqlite dialect uses _translate_colname() nowcCsg|j|jr|n	|jƒ}\}}}|jj||ƒ|k	rc||df|j|<ndS(s´Set a synonym for the given name.

        Some dialects (SQLite at the moment) may use this to
        adjust the column names that are significant within a
        row.

        N(RRYR]t
setdefaultR(RR0torignameRvRR
ti((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt_set_keymap_synonym`s

cCs¦|j}d}t|tjƒrH|j|jr6|n	|jƒƒ}nt|tj	ƒr`|j
r²|jru|j
n|j
jƒ|kr²||jrŸ|j
n|j
jƒ}n^t|dƒr|jrÓ|jn|jjƒ|kr||jrý|jn|jjƒ}n|dk	r`|ddk	r`x.|dD]}|j
|ƒr7Pq7q7Wd}q`n|dkr˜|r‘tjdtj|ƒƒ‚q¢dSn
|||<|S(NR0is.Could not locate column in row for column '%s'(RRR%Rtstring_typesRdRYR]Rt
ColumnElementt_labelthasattrR0t_compare_name_for_resultRtNoSuchColumnErrort_string_or_unprintable(RR*traiseerrtmaptresultR
((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR#ps>	'	
cCs-||jkrtS|j|tƒdk	SdS(N(RtTrueR#tFalseR(RR*((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR7ŸscCsˆ||jkr(|j|\}}}n1|j||ƒ}|dkrJdS|\}}}|dkr{tjd|ƒ‚ntj|ƒS(NsVAmbiguous column name '%s' in result set! try 'use_labels' option on select statement.(RR#RRR)R<t
itemgetter(RR*RRR
R+tret((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt_getter¥s
cCs8itd„|jjƒDƒƒd6|jd6|jd6S(NcssC|]9\}\}}}t|tjtjƒr||fVqdS(N(R%RR†t	int_types(t.0R*RR
R+((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pys	<genexpr>¸st_pickled_keymapRLRY(RfRRMRLRY(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRµs
cCs”gtt|dƒƒD]}d^q|_i|_}x1|djƒD]\}}dd|f||<qJW|d|_|d|_t|_	dS(NRLR—RY(
trangeR RRRRMRLRYR‘t_echo(RRt_RR*R+((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR	Às,


(R3R4RQRtclassmethodRR_Rtpending_deprecationR…R#R7R”RR	(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRT¹s	‘/		tResultProxycBsˆeZdZeZd!ZeZd!Z	eZ
eZd„Ze
d„Zd„Zd„Zd„Zejd„ƒZed„ƒZed„ƒZed	„ƒZd
„Ze
d„Zd„Zd
„Zejd„ƒZd„Zd„Zed„ƒZ d„Z!d„Z"d„Z#d„Z$d„Z%d„Z&d!d„Z'd„Z(d„Z)d„Z*d„Z+d!d„Z,d„Z-d„Z.d „Z/RS("s[Wraps a DB-API cursor object to provide easier access to row columns.

    Individual columns may be accessed by their integer position,
    case-insensitive column name, or by ``schema.Column``
    object. e.g.::

      row = fetchone()

      col1 = row[0]    # access via integer position

      col2 = row['col2']   # access via name

      col3 = row[mytable.c.mycol] # access via Column object.

    ``ResultProxy`` also handles post-processing of result column
    data using ``TypeEngine`` objects, which are referenced from
    the originating SQL statement that produced this result set.

    cCs`||_|j|_|j|_|_|j|_|jjoL|jjƒ|_|j	ƒdS(N(
RURVtcursort
_saved_cursortroot_connectiont
connectionR™tenginet_should_log_debugt_init_metadata(RRU((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRês	cCs?y|jj}Wntk
r-|jdƒSX|||ƒSdS(N(t	_metadataR”R.t_non_resultR(RR*Rtgetter((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR”ós

cCs<y|jj}Wntk
r-|jdƒSX||ƒSdS(N(R¥R7R.R¦R(RR*RK((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR7ûs

cCsÊ|jƒ}|dk	rÆ|jjr|d|jjkr||jjjrZ|jjj|_qŽt||ƒ|_|jj_nt||ƒ|_|jrÆ|jj	j
jdtd„|DƒƒƒqÆndS(Ntcompiled_cachesCol %rcss|]}|dVqdS(iN((R–tx((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pys	<genexpr>s(
t_cursor_descriptionRRUtcompiledtexecution_optionst_cached_metadataR¥RTR™R¢tloggertdebugR((RRj((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR¤s"	cCs|jr|jjSgSdS(s/Return the current set of string keys for rows.N(R¥RL(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRLs	
cCsJy|jjSWn5tk
rE}|jj|dd|j|jƒnXdS(sÑReturn the 'rowcount' for this result.

        The 'rowcount' reports the number of rows *matched*
        by the WHERE criterion of an UPDATE or DELETE statement.

        .. note::

           Notes regarding :attr:`.ResultProxy.rowcount`:


           * This attribute returns the number of rows *matched*,
             which is not necessarily the same as the number of rows
             that were actually *modified* - an UPDATE statement, for example,
             may have no net change on a given row if the SET values
             given are the same as those present in the row already.
             Such a row would be matched but not modified.
             On backends that feature both styles, such as MySQL,
             rowcount is configured by default to return the match
             count in all cases.

           * :attr:`.ResultProxy.rowcount` is *only* useful in conjunction
             with an UPDATE or DELETE statement.  Contrary to what the Python
             DBAPI says, it does *not* return the
             number of rows available from the results of a SELECT statement
             as DBAPIs cannot support this functionality when rows are
             unbuffered.

           * :attr:`.ResultProxy.rowcount` may not be fully implemented by
             all dialects.  In particular, most DBAPIs do not support an
             aggregate rowcount result from an executemany call.
             The :meth:`.ResultProxy.supports_sane_rowcount` and
             :meth:`.ResultProxy.supports_sane_multi_rowcount` methods
             will report from the dialect if each usage is known to be
             supported.

           * Statements that use RETURNING may not return a correct
             rowcount.

        N(RUtrowcountt	ExceptionR¡t_handle_dbapi_exceptionRRž(RR1((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR°s
)	cCsJy|jjSWn5tk
rE}|jj|dd|j|jƒnXdS(s/return the 'lastrowid' accessor on the DBAPI cursor.

        This is a DBAPI specific method and is only functional
        for those backends which support it, for statements
        where it is appropriate.  It's behavior is not
        consistent across backends.

        Usage of this method is normally unnecessary when
        using insert() expression constructs; the
        :attr:`~ResultProxy.inserted_primary_key` attribute provides a
        tuple of primary key values for a newly inserted row,
        regardless of database backend.

        N(RŸt	lastrowidR±R¡R²RRU(RR1((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR³Is		cCs
|jdk	S(sãTrue if this :class:`.ResultProxy` returns rows.

        I.e. if it is legal to call the methods
        :meth:`~.ResultProxy.fetchone`,
        :meth:`~.ResultProxy.fetchmany`
        :meth:`~.ResultProxy.fetchall`.

        N(R¥R(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pytreturns_rows`s
cCs
|jjS(sdTrue if this :class:`.ResultProxy` is the result
        of a executing an expression language compiled
        :func:`.expression.insert` construct.

        When True, this implies that the
        :attr:`inserted_primary_key` attribute is accessible,
        assuming the statement did not include
        a user defined "returning" construct.

        (RUtisinsert(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt	is_insertlscCs
|jjS(s May be overridden by subclasses.(RŸtdescription(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRªzscCs^|jr
dSt|_|j}|jj|ƒ|rQ|jjrQ|jjƒnd|_dS(slSoft close this :class:`.ResultProxy`.

        This releases all DBAPI cursor resources, but leaves the
        ResultProxy "open" from a semantic perspective, meaning the
        fetchXXX() methods will continue to return empty results.

        This method is called automatically when:

        * all result rows are exhausted using the fetchXXX() methods.
        * cursor.description is None.

        This method is **not public**, but is documented in order to clarify
        the "autoclose" process used.

        .. versionadded:: 1.0.0

        .. seealso::

            :meth:`.ResultProxy.close`


        N(t_soft_closedRRžR¡t_safe_close_cursortshould_close_with_resulttcloseR(Rt_autoclose_connectionRž((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt_soft_closes			cCs#|js|jƒt|_ndS(s~Close this ResultProxy.

        This closes out the underlying DBAPI cursor corresonding
        to the statement execution, if one is still present.  Note that the
        DBAPI cursor is automatically released when the :class:`.ResultProxy`
        exhausts all available rows.  :meth:`.ResultProxy.close` is generally
        an optional method except in the case when discarding a
        :class:`.ResultProxy` that still has additional rows pending for fetch.

        In the case of a result that is the product of
        :ref:`connectionless execution <dbengine_implicit>`,
        the underyling :class:`.Connection` object is also closed, which
        :term:`releases` DBAPI connection resources.

        After this method is called, it is no longer valid to call upon
        the fetch methods, which will raise a :class:`.ResourceClosedError`
        on subsequent use.

        .. versionchanged:: 1.0.0 - the :meth:`.ResultProxy.close` method
           has been separated out from the process that releases the underlying
           DBAPI cursor resource.   The "auto close" feature of the
           :class:`.Connection` now performs a so-called "soft close", which
           releases the underlying DBAPI cursor, but allows the
           :class:`.ResultProxy` to still behave as an open-but-exhausted
           result set; the actual :meth:`.ResultProxy.close` method is never
           called.    It is still safe to discard a :class:`.ResultProxy`
           that has been fully exhausted without calling this method.

        .. seealso::

            :ref:`connections_toplevel`

            :meth:`.ResultProxy._soft_close`

        N(tclosedR½R(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR» s%	
ccs2x+tr-|jƒ}|dkr%dS|VqWdS(N(RtfetchoneR(RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÉs
	cCsd|jjstjdƒ‚n<|jjs<tjdƒ‚n|jjrZtjdƒ‚n|jjS(s±Return the primary key for the row just inserted.

        The return value is a list of scalar values
        corresponding to the list of primary key columns
        in the target table.

        This only applies to single row :func:`.insert`
        constructs which did not explicitly specify
        :meth:`.Insert.returning`.

        Note that primary key columns which specify a
        server_default clause,
        or otherwise do not qualify as "autoincrement"
        columns (see the notes at :class:`.Column`), and were
        generated using the database-side default, will
        appear in this list as ``None`` unless the backend
        supports "returning" and the insert statement executed
        with the "implicit returning" enabled.

        Raises :class:`~sqlalchemy.exc.InvalidRequestError` if the executed
        statement is not a compiled expression construct
        or is not an insert() construct.

        s1Statement is not a compiled expression construct.s2Statement is not an insert() expression construct.s9Can't call inserted_primary_key when returning() is used.(RUR«RR)Rµt_is_explicit_returningtinserted_primary_key(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÁÑscCsd|jjstjdƒ‚nB|jjs<tjdƒ‚n$|jjrR|jjS|jjdSdS(sReturn the collection of updated parameters from this
        execution.

        Raises :class:`~sqlalchemy.exc.InvalidRequestError` if the executed
        statement is not a compiled expression construct
        or is not an update() construct.

        s1Statement is not a compiled expression construct.s2Statement is not an update() expression construct.iN(RUR«RR)tisupdatetexecutemanytcompiled_parameters(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pytlast_updated_paramsüs	
cCsd|jjstjdƒ‚nB|jjs<tjdƒ‚n$|jjrR|jjS|jjdSdS(sReturn the collection of inserted parameters from this
        execution.

        Raises :class:`~sqlalchemy.exc.InvalidRequestError` if the executed
        statement is not a compiled expression construct
        or is not an insert() construct.

        s1Statement is not a compiled expression construct.s2Statement is not an insert() expression construct.iN(RUR«RR)RµRÃRÄ(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pytlast_inserted_paramss	
cCs
|jjS(sžReturn the values of default columns that were fetched using
        the :meth:`.ValuesBase.return_defaults` feature.

        The value is an instance of :class:`.RowProxy`, or ``None``
        if :meth:`.ValuesBase.return_defaults` was not used or if the
        backend does not support RETURNING.

        .. versionadded:: 0.9.0

        .. seealso::

            :meth:`.ValuesBase.return_defaults`

        (RUtreturned_defaults(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÇ(scCs
|jjƒS(s˜Return ``lastrow_has_defaults()`` from the underlying
        :class:`.ExecutionContext`.

        See :class:`.ExecutionContext` for details.

        (RUtlastrow_has_defaults(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÈ:scCsT|jjstjdƒ‚n,|jjrJ|jjrJtjdƒ‚n|jjS(sMReturn ``postfetch_cols()`` from the underlying
        :class:`.ExecutionContext`.

        See :class:`.ExecutionContext` for details.

        Raises :class:`~sqlalchemy.exc.InvalidRequestError` if the executed
        statement is not a compiled expression construct
        or is not an insert() or update() construct.

        s1Statement is not a compiled expression construct.s>Statement is not an insert() or update() expression construct.(RUR«RR)RµRÂtpostfetch_cols(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÉDscCsT|jjstjdƒ‚n,|jjrJ|jjrJtjdƒ‚n|jjS(sLReturn ``prefetch_cols()`` from the underlying
        :class:`.ExecutionContext`.

        See :class:`.ExecutionContext` for details.

        Raises :class:`~sqlalchemy.exc.InvalidRequestError` if the executed
        statement is not a compiled expression construct
        or is not an insert() or update() construct.

        s1Statement is not a compiled expression construct.s>Statement is not an insert() or update() expression construct.(RUR«RR)RµRÂt
prefetch_cols(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÊZscCs
|jjS(sxReturn ``supports_sane_rowcount`` from the dialect.

        See :attr:`.ResultProxy.rowcount` for background.

        (RVtsupports_sane_rowcount(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRËpscCs
|jjS(s~Return ``supports_sane_multi_rowcount`` from the dialect.

        See :attr:`.ResultProxy.rowcount` for background.

        (RVtsupports_sane_multi_rowcount(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÌyscCs3y|jjƒSWntk
r.|jdƒSXdS(N(RžR¿R.R¦R(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt_fetchone_impl‚s
cCsOy-|dkr|jjƒS|jj|ƒSWntk
rJ|jgƒSXdS(N(RRžt	fetchmanyR.R¦(Rtsize((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt_fetchmany_implˆs

cCs3y|jjƒSWntk
r.|jgƒSXdS(N(RžtfetchallR.R¦(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt_fetchall_impl‘s
cCsD|jdkr!tjdƒ‚n|jr<tjdƒ‚n|SdS(NsJThis result object does not return rows. It has been closed automatically.sThis result object is closed.(R¥RRtResourceClosedErrorR¾(Rtdefault((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR¦—s	c	Cs­|j}|j}|j}|j}|jrƒ|jjjj}g}x7|D]/}|d|ƒ|j	|||||ƒƒqLW|Sg|D]}|||||ƒ^qŠSdS(NsRow %r(
t_process_rowR¥RRR™RUR¢R®R¯R'(	Rtrowstprocess_rowRjRRtlogR,R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pytprocess_rows¢s					

 cCscy'|j|jƒƒ}|jƒ|SWn5tk
r^}|jj|dd|j|jƒnXdS(svFetch all rows, just like DB-API ``cursor.fetchall()``.

        After all rows have been exhausted, the underlying DBAPI
        cursor resource is released, and the object may be safely
        discarded.

        Subsequent calls to :meth:`.ResultProxy.fetchall` will return
        an empty list.   After the :meth:`.ResultProxy.close` method is
        called, the method will raise :class:`.ResourceClosedError`.

        .. versionchanged:: 1.0.0 - Added "soft close" behavior which
           allows the result to be used in an "exhausted" state prior to
           calling the :meth:`.ResultProxy.close` method.

        N(	RÙRÒR½R±R¡R²RRžRU(RR,R1((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRѲs
		cCs{y?|j|j|ƒƒ}t|ƒdkr:|jƒn|SWn5tk
rv}|jj|dd|j|j	ƒnXdS(s¶Fetch many rows, just like DB-API
        ``cursor.fetchmany(size=cursor.arraysize)``.

        After all rows have been exhausted, the underlying DBAPI
        cursor resource is released, and the object may be safely
        discarded.

        Calls to :meth:`.ResultProxy.fetchmany` after all rows have been
        exhuasted will return
        an empty list.   After the :meth:`.ResultProxy.close` method is
        called, the method will raise :class:`.ResourceClosedError`.

        .. versionchanged:: 1.0.0 - Added "soft close" behavior which
           allows the result to be used in an "exhausted" state prior to
           calling the :meth:`.ResultProxy.close` method.

        iN(
RÙRÐR R½R±R¡R²RRžRU(RRÏR,R1((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÎÌs
		cCszy>|jƒ}|dk	r/|j|gƒdS|jƒdSWn5tk
ru}|jj|dd|j|jƒnXdS(sŽFetch one row, just like DB-API ``cursor.fetchone()``.

        After all rows have been exhausted, the underlying DBAPI
        cursor resource is released, and the object may be safely
        discarded.

        Calls to :meth:`.ResultProxy.fetchone` after all rows have
        been exhausted will return ``None``.
        After the :meth:`.ResultProxy.close` method is
        called, the method will raise :class:`.ResourceClosedError`.

        .. versionchanged:: 1.0.0 - Added "soft close" behavior which
           allows the result to be used in an "exhausted" state prior to
           calling the :meth:`.ResultProxy.close` method.

        iN(	RÍRRÙR½R±R¡R²RžRU(RRR1((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR¿és
		cCsž|jdkr|jdƒSy|jƒ}Wn5tk
rc}|jj|dd|j|jƒnXz(|dk	r‡|j	|gƒdSdSWd|j
ƒXdS(sFetch the first row and then close the result set unconditionally.

        Returns None if no row is present.

        After calling this method, the object is fully closed,
        e.g. the :meth:`.ResultProxy.close` method will have been called.

        iN(R¥RR¦RÍR±R¡R²RžRURÙR»(RRR1((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pytfirsts	
		cCs(|jƒ}|dk	r |dSdSdS(sFetch the first column of the first row, and close the result set.

        Returns None if no row is present.

        After calling this method, the object is fully closed,
        e.g. the :meth:`.ResultProxy.close` method will have been called.

        iN(RÚR(RR((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pytscalar!s	N(0R3R4RQR6RÕRtout_parametersR‘t_can_close_connectionR¥R¸R¾RRR”R7R¤RLRtmemoized_propertyR°tpropertyR³R´R¶RªR½R»RRÁRÅRÆRÇRÈRÉRÊRËRÌRÍRÐRÒR¦RÙRÑRÎR¿RÚRÛ(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÎsN					/	!	)	+			
														tBufferedRowResultProxycBs…eZdZd„Zidd6dd6dd6dd6dd6dd6d	d6d
d	6Zd„Zd„Zd
„Zdd„Z	d„Z
RS(süA ResultProxy with row buffering behavior.

    ``ResultProxy`` that buffers the contents of a selection of rows
    before ``fetchone()`` is called.  This is to allow the results of
    ``cursor.description`` to be available immediately, when
    interfacing with a DB-API that requires rows to be consumed before
    this information is available (currently psycopg2, when used with
    server-side cursors).

    The pre-fetching behavior fetches only one row initially, and then
    grows its buffer size by a fixed amount with each successive need
    for additional rows up to a size of 1000.

    The size argument is configurable using the ``max_row_buffer``
    execution option::

        with psycopg2_engine.connect() as conn:

            result = conn.execution_options(
                stream_results=True, max_row_buffer=50
                ).execute("select * from table")

    .. versionadded:: 1.0.6 Added the ``max_row_buffer`` option.

    .. seealso::

        :ref:`psycopg2_execution_options`
    cCs<|jjjddƒ|_|jƒtt|ƒjƒdS(Ntmax_row_buffer(	RUR¬RdRt_max_row_buffert$_BufferedRowResultProxy__buffer_rowstsuperRàR¤(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR¤Os
iii
ii2idiúiôiècCs‰|jdkrdSt|ddƒ}tj|jj|ƒƒ|_|jj||ƒ|_	|j
dk	r…t|j
|j	ƒ|_	ndS(Nt_bufsizei(RžRtgetattrtcollectionstdequeRÎt"_BufferedRowResultProxy__rowbuffertsize_growthRdRåRâtmin(RRÏ((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt
__buffer_rowsdscKs'|jjƒtt|ƒj|dS(N(RétclearRäRàR½(Rtkw((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR½ms
cCsL|jdkr|jdƒS|js?|jƒ|js?dSn|jjƒS(N(RžRR¦RéRãtpopleft(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÍqs
	
	cCsc|dkr|jƒSg}x@td|ƒD]/}|jƒ}|dkrNPn|j|ƒq,W|S(Ni(RRÒR˜RÍR'(RRÏRR©R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÐzs
cCsQ|jdkr|jgƒS|jj|jjƒƒ|j}tjƒ|_|S(N(RžRR¦RétextendRÑRçRè(RR“((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR҅s
	N(R3R4RQR¤RêRãR½RÍRRÐRÒ(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRà1s 	

					tFullyBufferedResultProxycBsGeZdZd„Zd„Zd„Zd„Zdd„Zd„Z	RS(sçA result proxy that buffers rows fully upon creation.

    Used for operations where a result is to be delivered
    after the database conversation can not be continued,
    such as MSSQL INSERT...OUTPUT after an autocommit.

    cCs&tt|ƒjƒ|jƒ|_dS(N(RäRñR¤t_buffer_rowst$_FullyBufferedResultProxy__rowbuffer(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR¤—scCstj|jjƒƒS(N(RçRèRžRÑ(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRò›scKs'|jjƒtt|ƒj|dS(N(RóRíRäRñR½(RRî((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR½žs
cCs'|jr|jjƒS|jdƒSdS(N(RóRïR¦R(R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÍ¢s	
cCsc|dkr|jƒSg}x@td|ƒD]/}|jƒ}|dkrNPn|j|ƒq,W|S(Ni(RRÒR˜RÍR'(RRÏRR©R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRШs
cCs2|js|jgƒS|j}tjƒ|_|S(N(RžR¦RóRçRè(RR“((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÒ³s
	
	N(
R3R4RQR¤RòR½RÍRRÐRÒ(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRñŽs				tBufferedColumnRowcBseZd„ZRS(cCs‚t|ƒ}d}x>|jD]3}|dk	rE|||ƒ||<n|d7}qWt|ƒ}tt|ƒj||||ƒdS(Nii(RRZRR(RäRôR(RRRRRR+R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR¼s(R3R4R(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRô»stBufferedColumnResultProxycBs2eZdZeZd„Zd„Zdd„ZRS(sœA ResultProxy with column buffering behavior.

    ``ResultProxy`` that loads all columns into memory each time
    fetchone() is called.  If fetchmany() or fetchall() are called,
    the full grid of results is fetched.  This is to operate with
    databases where result rows contain "live" results that fall out
    of scope unless explicitly fetched.  Currently this includes
    cx_Oracle LOB objects.

    cCs´tt|ƒjƒ|j}|jdkr°|j|_gtt|j	ƒƒD]}d^qM|_i}x9|j
jƒD](\}\}}}d||f||<qxW||_
ndS(N(RäRõR¤R¥RZRRR˜R RLRRM(RRjRšRtktfuncR
R+((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyR¤Øs	+%cCs@g}x3tr;|jƒ}|dkr+Pn|j|ƒq	W|S(N(RR¿RR'(RR,R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÑês	cCs`|dkr|jƒSg}x=t|ƒD]/}|jƒ}|dkrKPn|j|ƒq)W|S(N(RRÑR˜R¿R'(RRÏR,R„R((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRÎõs
N(	R3R4RQRôRÕR¤RÑRRÎ(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyRõÊs

		(RQtRRtsqlRRRçR<tsqlalchemy.cresultproxyRRtImportErrorRtobjectR6RStregisterRTRRàRñRôRõ(((sM/home/tvault/.virtenv/lib/python2.7/site-packages/sqlalchemy/engine/result.pyt<module>	s8



>K
ÿÿÿe]-