From 6bbc7dd157faf5b513852286ba656fa6723cd2d6 Mon Sep 17 00:00:00 2001 From: Ants Aasma Date: Tue, 16 Oct 2007 22:57:05 +0000 Subject: change the in_ API to accept a sequence or a selectable [ticket:750] --- doc/build/content/ormtutorial.txt | 6 +++--- doc/build/content/tutorial.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/build/content/ormtutorial.txt b/doc/build/content/ormtutorial.txt index 4ef853f91..1a8de8265 100644 --- a/doc/build/content/ormtutorial.txt +++ b/doc/build/content/ormtutorial.txt @@ -861,7 +861,7 @@ So far, so good. How about Jack's `Address` objects ? {python} {sql}>>> session.query(Address).filter( - ... Address.email_address.in_('jack@google.com', 'j25@yahoo.com') + ... Address.email_address.in_(['jack@google.com', 'j25@yahoo.com']) ... ).count() SELECT count(addresses.id) FROM addresses @@ -913,7 +913,7 @@ Now when we load Jack, removing an address from his `addresses` collection will # only one address remains {sql}>>> session.query(Address).filter( - ... Address.email_address.in_('jack@google.com', 'j25@yahoo.com') + ... Address.email_address.in_(['jack@google.com', 'j25@yahoo.com']) ... ).count() DELETE FROM addresses WHERE addresses.id = ? [2] @@ -945,7 +945,7 @@ Deleting Jack will delete both Jack and his remaining `Address`: {stop}0 {sql}>>> session.query(Address).filter( - ... Address.email_address.in_('jack@google.com', 'j25@yahoo.com') + ... Address.email_address.in_(['jack@google.com', 'j25@yahoo.com']) ... ).count() SELECT count(addresses.id) FROM addresses diff --git a/doc/build/content/tutorial.txt b/doc/build/content/tutorial.txt index 702cf859a..57e85eb4a 100644 --- a/doc/build/content/tutorial.txt +++ b/doc/build/content/tutorial.txt @@ -505,7 +505,7 @@ Below, we create a session with `autoflush=True`, which implies that it's transa >>> metadata.bind.echo = False >>> session = create_session(autoflush=True) >>> (ed, harry, mary) = session.query(User).filter( - ... User.c.user_name.in_('Ed', 'Harry', 'Mary') + ... User.c.user_name.in_(['Ed', 'Harry', 'Mary']) ... ).order_by(User.c.user_name).all() # doctest: +NORMALIZE_WHITESPACE >>> del mary.addresses[1] >>> harry_address = Address('harry2@gmail.com') -- cgit v1.2.1