From: Mike Bayer Date: Wed, 22 Mar 2006 15:33:26 +0000 (+0000) Subject: added some references to selectfirst X-Git-Tag: rel_0_1_5~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f560d1b4cba39dffd4fb96bdaebab34e884725b;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git added some references to selectfirst --- diff --git a/doc/build/content/datamapping.myt b/doc/build/content/datamapping.myt index 10dd6e475c..d341d56d5c 100644 --- a/doc/build/content/datamapping.myt +++ b/doc/build/content/datamapping.myt @@ -65,7 +65,7 @@ UPDATE users SET user_name=:user_name userlist = User.mapper.select_by(user_id=12) -

There is also a full-blown "monkeypatch" function that creates a primary mapper, attaches the above mapper class property, and also the methods get, get_by, select, select_by, selectone, commit and delete:

+

There is also a full-blown "monkeypatch" function that creates a primary mapper, attaches the above mapper class property, and also the methods get, get_by, select, select_by, selectone, selectfirst, commit and delete:

<&|formatting.myt:code&> assign_mapper(User, users) userlist = User.select_by(user_id=12) @@ -124,7 +124,7 @@ UPDATE users SET user_name=:user_name result = mapper.select(or_(users.c.user_name == 'john', users.c.user_name=='fred')) # using a WHERE criterion to get a scalar - u = mapper.selectone(users.c.user_name=='john') + u = mapper.selectfirst(users.c.user_name=='john') # using a full select object result = mapper.select(users.select(users.c.user_name=='john'))