@_generative
@_exclusive_against('_post_values_clause', msgs={'_post_values_clause': 'This Insert construct already has an ON DUPLICATE KEY clause present'})
def on_duplicate_key_update(self, *args, **kw):
    '\n        Specifies the ON DUPLICATE KEY UPDATE clause.\n\n        :param \\**kw:  Column keys linked to UPDATE values.  The\n         values may be any SQL expression or supported literal Python\n         values.\n\n        .. warning:: This dictionary does **not** take into account\n           Python-specified default UPDATE values or generation functions,\n           e.g. those specified using :paramref:`_schema.Column.onupdate`.\n           These values will not be exercised for an ON DUPLICATE KEY UPDATE\n           style of UPDATE, unless values are manually specified here.\n\n        :param \\*args: As an alternative to passing key/value parameters,\n         a dictionary or list of 2-tuples can be passed as a single positional\n         argument.\n\n         Passing a single dictionary is equivalent to the keyword argument\n         form::\n\n            insert().on_duplicate_key_update({"name": "some name"})\n\n         Passing a list of 2-tuples indicates that the parameter assignments\n         in the UPDATE clause should be ordered as sent, in a manner similar\n         to that described for the :class:`_expression.Update`\n         construct overall\n         in :ref:`updates_order_parameters`::\n\n            insert().on_duplicate_key_update(\n                [("name", "some name"), ("value", "some value")])\n\n         .. versionchanged:: 1.3 parameters can be specified as a dictionary\n            or list of 2-tuples; the latter form provides for parameter\n            ordering.\n\n\n        .. versionadded:: 1.2\n\n        .. seealso::\n\n            :ref:`mysql_insert_on_duplicate_key_update`\n\n        '
    if (args and kw):
        raise exc.ArgumentError("Can't pass kwargs and positional arguments simultaneously")
    if args:
        if (len(args) > 1):
            raise exc.ArgumentError('Only a single dictionary or list of tuples is accepted positionally.')
        values = args[0]
    else:
        values = kw
    inserted_alias = getattr(self, 'inserted_alias', None)
    self._post_values_clause = OnDuplicateClause(inserted_alias, values)
Specifies the ON DUPLICATE KEY UPDATE clause.

:param \**kw:  Column keys linked to UPDATE values.  The
 values may be any SQL expression or supported literal Python
 values.

.. warning:: This dictionary does **not** take into account
   Python-specified default UPDATE values or generation functions,
   e.g. those specified using :paramref:`_schema.Column.onupdate`.
   These values will not be exercised for an ON DUPLICATE KEY UPDATE
   style of UPDATE, unless values are manually specified here.

:param \*args: As an alternative to passing key/value parameters,
 a dictionary or list of 2-tuples can be passed as a single positional
 argument.

 Passing a single dictionary is equivalent to the keyword argument
 form::

    insert().on_duplicate_key_update({"name": "some name"})

 Passing a list of 2-tuples indicates that the parameter assignments
 in the UPDATE clause should be ordered as sent, in a manner similar
 to that described for the :class:`_expression.Update`
 construct overall
 in :ref:`updates_order_parameters`::

    insert().on_duplicate_key_update(
        [("name", "some name"), ("value", "some value")])

 .. versionchanged:: 1.3 parameters can be specified as a dictionary
    or list of 2-tuples; the latter form provides for parameter
    ordering.


.. versionadded:: 1.2

.. seealso::

    :ref:`mysql_insert_on_duplicate_key_update`
@_generative
@_exclusive_against('_post_values_clause', msgs={'_post_values_clause': 'This Insert construct already has an ON DUPLICATE KEY clause present'})
def on_duplicate_key_update(self, *args, **kw):
    '\n        Specifies the ON DUPLICATE KEY UPDATE clause.\n\n        :param \\**kw:  Column keys linked to UPDATE values.  The\n         values may be any SQL expression or supported literal Python\n         values.\n\n        .. warning:: This dictionary does **not** take into account\n           Python-specified default UPDATE values or generation functions,\n           e.g. those specified using :paramref:`_schema.Column.onupdate`.\n           These values will not be exercised for an ON DUPLICATE KEY UPDATE\n           style of UPDATE, unless values are manually specified here.\n\n        :param \\*args: As an alternative to passing key/value parameters,\n         a dictionary or list of 2-tuples can be passed as a single positional\n         argument.\n\n         Passing a single dictionary is equivalent to the keyword argument\n         form::\n\n            insert().on_duplicate_key_update({"name": "some name"})\n\n         Passing a list of 2-tuples indicates that the parameter assignments\n         in the UPDATE clause should be ordered as sent, in a manner similar\n         to that described for the :class:`_expression.Update`\n         construct overall\n         in :ref:`updates_order_parameters`::\n\n            insert().on_duplicate_key_update(\n                [("name", "some name"), ("value", "some value")])\n\n         .. versionchanged:: 1.3 parameters can be specified as a dictionary\n            or list of 2-tuples; the latter form provides for parameter\n            ordering.\n\n\n        .. versionadded:: 1.2\n\n        .. seealso::\n\n            :ref:`mysql_insert_on_duplicate_key_update`\n\n        '
    if (args and kw):
        raise exc.ArgumentError("Can't pass kwargs and positional arguments simultaneously")
    if args:
        if (len(args) > 1):
            raise exc.ArgumentError('Only a single dictionary or list of tuples is accepted positionally.')
        values = args[0]
    else:
        values = kw
    inserted_alias = getattr(self, 'inserted_alias', None)
    self._post_values_clause = OnDuplicateClause(inserted_alias, values)