[storm] Limit clause

Christopher Armstrong radix at twistedmatrix.com
Thu Jul 26 17:04:41 BST 2007


result_set.order_by(Foo.column). You can wrap Foo.column in Desc() or
Asc() if you want,

like

result_set.order_by(Asc(Foo.column))

On 7/26/07, shawn bright <nephish at gmail.com> wrote:
> thanks for this.
> how do i do an ORDER BY ?
>
> thanks
>
>
> On 7/26/07, Jamu Kakar <jamshed.kakar at canonical.com > wrote:
> > Hi Akira,
> >
> > akira wrote:
> > > Is there an actual LIMIT clause? If yes, could someone show an example
> > > of its use?
> >
> > You can use the following, in addition to the slicing method Chris
> > suggested:
> >
> > result = store.find(Person, Person.name.like("Bob%"))
> > result.config(limit=5, offset=2)
> >
> > Note, that you can also pass 'distinct=True' to ResultSet.config to
> > make it use 'SELECT DISTINCT' queries.
> >
> > Hope this helps,
> > J.
> >
> >
> > --
> > storm mailing list
> > storm at lists.canonical.com
> > Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/storm
> >
>
>
> --
> storm mailing list
> storm at lists.canonical.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/storm
>
>


-- 
Christopher Armstrong
International Man of Twistery
http://radix.twistedmatrix.com/
http://twistedmatrix.com/
http://canonical.com/



More information about the storm mailing list