@_generative()
def with_for_update(self, read=False, nowait=False, of=None):
    'return a new :class:`.Query` with the specified options for the\n        ``FOR UPDATE`` clause.\n\n        The behavior of this method is identical to that of\n        :meth:`.SelectBase.with_for_update`.  When called with no arguments,\n        the resulting ``SELECT`` statement will have a ``FOR UPDATE`` clause\n        appended.  When additional arguments are specified, backend-specific\n        options such as ``FOR UPDATE NOWAIT`` or ``LOCK IN SHARE MODE``\n        can take effect.\n\n        E.g.::\n\n            q = sess.query(User).with_for_update(nowait=True, of=User)\n\n        The above query on a Postgresql backend will render like::\n\n            SELECT users.id AS users_id FROM users FOR UPDATE OF users NOWAIT\n\n        .. versionadded:: 0.9.0 :meth:`.Query.with_for_update` supersedes\n           the :meth:`.Query.with_lockmode` method.\n\n        .. seealso::\n\n            :meth:`.GenerativeSelect.with_for_update` - Core level method with\n            full argument and behavioral description.\n\n        '
    self._for_update_arg = LockmodeArg(read=read, nowait=nowait, of=of)
return a new :class:`.Query` with the specified options for the
``FOR UPDATE`` clause.

The behavior of this method is identical to that of
:meth:`.SelectBase.with_for_update`.  When called with no arguments,
the resulting ``SELECT`` statement will have a ``FOR UPDATE`` clause
appended.  When additional arguments are specified, backend-specific
options such as ``FOR UPDATE NOWAIT`` or ``LOCK IN SHARE MODE``
can take effect.

E.g.::

    q = sess.query(User).with_for_update(nowait=True, of=User)

The above query on a Postgresql backend will render like::

    SELECT users.id AS users_id FROM users FOR UPDATE OF users NOWAIT

.. versionadded:: 0.9.0 :meth:`.Query.with_for_update` supersedes
   the :meth:`.Query.with_lockmode` method.

.. seealso::

    :meth:`.GenerativeSelect.with_for_update` - Core level method with
    full argument and behavioral description.
@_generative()
def with_for_update(self, read=False, nowait=False, of=None):
    'return a new :class:`.Query` with the specified options for the\n        ``FOR UPDATE`` clause.\n\n        The behavior of this method is identical to that of\n        :meth:`.SelectBase.with_for_update`.  When called with no arguments,\n        the resulting ``SELECT`` statement will have a ``FOR UPDATE`` clause\n        appended.  When additional arguments are specified, backend-specific\n        options such as ``FOR UPDATE NOWAIT`` or ``LOCK IN SHARE MODE``\n        can take effect.\n\n        E.g.::\n\n            q = sess.query(User).with_for_update(nowait=True, of=User)\n\n        The above query on a Postgresql backend will render like::\n\n            SELECT users.id AS users_id FROM users FOR UPDATE OF users NOWAIT\n\n        .. versionadded:: 0.9.0 :meth:`.Query.with_for_update` supersedes\n           the :meth:`.Query.with_lockmode` method.\n\n        .. seealso::\n\n            :meth:`.GenerativeSelect.with_for_update` - Core level method with\n            full argument and behavioral description.\n\n        '
    self._for_update_arg = LockmodeArg(read=read, nowait=nowait, of=of)