%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/
Upload File :
Create Path :
Current File : //opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/dml.pyc

�
��4]c@s�ddlmZddlmZddlmZddlmZddlmZ	ddl
mZddlm
Z
dd	lmZdZd
e	fd��YZeed
�Zdefd��YZdefd��YZdefd��YZdS(i(texti(tutil(tschema(t_generative(tInsert(t
ClauseElement(talias(tpublic_factoryRtinsertcBsVeZdZejd��Zedddddd��Zedddd��Z	RS(s�PostgreSQL-specific implementation of INSERT.

    Adds methods for PG-specific syntaxes such as ON CONFLICT.

    .. versionadded:: 1.1

    cCst|jdd�jS(s�Provide the ``excluded`` namespace for an ON CONFLICT statement

        PG's ON CONFLICT clause allows reference to the row that would
        be inserted, known as ``excluded``.  This attribute provides
        all columns in this row to be referenceable.

        .. seealso::

            :ref:`postgresql_insert_on_conflict` - example of how
            to use :attr:`.Insert.excluded`

        tnametexcluded(Rttabletcolumns(tself((sU/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/dml.pyR
scCst|||||�|_|S(s
        Specifies a DO UPDATE SET action for ON CONFLICT clause.

        Either the ``constraint`` or ``index_elements`` argument is
        required, but only one of these can be specified.

        :param constraint:
         The name of a unique or exclusion constraint on the table,
         or the constraint object itself if it has a .name attribute.

        :param index_elements:
         A sequence consisting of string column names, :class:`.Column`
         objects, or other column expression objects that will be used
         to infer a target index.

        :param index_where:
         Additional WHERE criterion that can be used to infer a
         conditional target index.

        :param set\_:
         Required argument. A dictionary or other mapping object
         with column names as keys and expressions or literals as values,
         specifying the ``SET`` actions to take.
         If the target :class:`.Column` specifies a ".key" attribute distinct
         from the column name, that key should be used.

         .. warning:: This dictionary does **not** take into account
            Python-specified default UPDATE values or generation functions,
            e.g. those specified using :paramref:`.Column.onupdate`.
            These values will not be exercised for an ON CONFLICT style of
            UPDATE, unless they are manually specified in the
            :paramref:`.Insert.on_conflict_do_update.set_` dictionary.

        :param where:
         Optional argument. If present, can be a literal SQL
         string or an acceptable expression for a ``WHERE`` clause
         that restricts the rows affected by ``DO UPDATE SET``. Rows
         not meeting the ``WHERE`` condition will not be updated
         (effectively a ``DO NOTHING`` for those rows).

         .. versionadded:: 1.1


        .. seealso::

            :ref:`postgresql_insert_on_conflict`

        (tOnConflictDoUpdatet_post_values_clause(R
t
constrainttindex_elementstindex_wheretset_twhere((sU/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/dml.pyton_conflict_do_update.s9cCst|||�|_|S(s"
        Specifies a DO NOTHING action for ON CONFLICT clause.

        The ``constraint`` and ``index_elements`` arguments
        are optional, but only one of these can be specified.

        :param constraint:
         The name of a unique or exclusion constraint on the table,
         or the constraint object itself if it has a .name attribute.

        :param index_elements:
         A sequence consisting of string column names, :class:`.Column`
         objects, or other column expression objects that will be used
         to infer a target index.

        :param index_where:
         Additional WHERE criterion that can be used to infer a
         conditional target index.

         .. versionadded:: 1.1

        .. seealso::

            :ref:`postgresql_insert_on_conflict`

        (tOnConflictDoNothingR(R
RRR((sU/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/dml.pyton_conflict_do_nothinglsN(
t__name__t
__module__t__doc__Rtmemoized_propertyR
RtNoneRR(((sU/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/dml.pyRs7s.dialects.postgresql.inserttOnConflictClausecBseZdddd�ZRS(cCs�|dk	r[t|tj�r[t|tjtjtjf�r[t	|d�pR|}q[n|dk	r/|dk	r�t
d��nt|tj�r�||_d|_d|_
q/t|tj�r�|j}|jdjd�}q/t|tj�r
|j}|j}q/|j}|jdjd�}n|dk	rYd|_||_||_
n&|dkrd|_|_|_
ndS(NR	s8'constraint' and 'index_elements' are mutually exclusivet
postgresqlR(Rt
isinstanceRtstring_typesRtIndext
ConstraintRtExcludeConstrainttgetattrt
ValueErrortconstraint_targettinferred_target_elementstinferred_target_whereclausetexpressionstdialect_optionstgetRR(R
RRR((sU/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/dml.pyt__init__�s:			
		
		N(RRRR,(((sU/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/dml.pyR�sRcBseZdZRS(R(RRt__visit_name__(((sU/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/dml.pyR�sRcBs&eZdZdddddd�ZRS(RcCs�tt|�jd|d|d|�|jdkrR|jdkrRtd��nt|t�si|rxtd��ng|j	�D]\}}||f^q�|_
||_dS(NRRRsVEither constraint or index_elements, but not both, must be specified unless DO NOTHINGs,set parameter must be a non-empty dictionary(tsuperRR,R'RR&R%Rtdicttitemstupdate_values_to_settupdate_whereclause(R
RRRRRtkeytvalue((sU/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/dml.pyR,�s.N(RRR-RR,(((sU/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/dml.pyR�sN(RR(tRRtsqlRtsql.baseRtsql.dmlRtStandardInserttsql.elementsRtsql.expressionRtutil.langhelpersRt__all__RRRR(((sU/opt/alt/python27/lib64/python2.7/site-packages/sqlalchemy/dialects/postgresql/dml.pyt<module>s{,

Zerion Mini Shell 1.0