Update of /cvsroot/sqlobject/SQLObject/docs
In directory sc8-pr-cvs1:/tmp/cvs-serv7708/docs
Modified Files:
SQLObject.txt
Log Message:
Added a little more documentation about count(), and an example
Index: SQLObject.txt
===================================================================
RCS file: /cvsroot/sqlobject/SQLObject/docs/SQLObject.txt,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** SQLObject.txt 12 Nov 2003 17:09:52 -0000 1.18
--- SQLObject.txt 30 Nov 2003 21:46:11 -0000 1.19
***************
*** 390,396 ****
negative indexes.
! You can get the length of the result without fetching all the results.
! A ``COUNT(*)`` query is used. Together with slicing, this makes
! batched queries easy to write.
For more information on the where clause in the queries, see the
--- 390,401 ----
negative indexes.
! You can get the length of the result without fetching all the results
! by calling ``count`` on the result object, like
! ``MyClass.select().count()``. A ``COUNT(*)`` query is used -- the
! actual objects are not fetched from the database. Together with
! slicing, this makes batched queries easy to write:
!
! .. raw:: html
! :file: ../examples/snippets/slicing-batch.html
For more information on the where clause in the queries, see the
|