Where is this syntax documented?

db(query1)(query2)

Is this the same as 'db(query1 & query2)' except web2py does the join
and not the database?

On Aug 11, 12:27 pm, mdipierro <[email protected]> wrote:
> d1=datetime.date(year_full,month,1)
> d2=datetime.date(year_full,month,31)
>
> count = db(db.posts.published_on>=d1)
> (db.posts.published_on<=d2).count()
>
> On Aug 11, 1:40 pm, "Martin.Mulone" <[email protected]> wrote:
>
> > I need to transform this query that works in RDBS to GAE. Both of them
> > are working i check it, but there are a better way, more simpler?.
>
> > RDBS:
> > count = db((db.posts.published_on.year()==year_full) &
> > (db.posts.published_on.month()==month)).count()
>
> > GAE:
> > count = len(db(db.posts.id>0).select().find(lambda
> > row:row.published_on.year==year_full).find(lambda
> > row:row.published_on.month==month))
>
>

Reply via email to