From: Stepland <16676308+Stepland@users.noreply.github.com> Date: Mon, 16 Sep 2019 14:19:02 +0000 (+0200) Subject: Add note on the use of tuple_() for the IN operator X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b24584e78f2c211343230b33fde137231e4341d;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Add note on the use of tuple_() for the IN operator --- diff --git a/doc/build/orm/tutorial.rst b/doc/build/orm/tutorial.rst index 14ea82a0dd..3e3ac0cd4a 100644 --- a/doc/build/orm/tutorial.rst +++ b/doc/build/orm/tutorial.rst @@ -783,6 +783,9 @@ Here's a rundown of some of the most common operators used in session.query(User.name).filter(User.name.like('%ed%')) )) + .. note:: for composite (multi-column) IN queries, group columns together + using :func:`.tuple_` + * :meth:`NOT IN <.ColumnOperators.notin_>`:: query.filter(~User.name.in_(['ed', 'wendy', 'jack']))