OK. Now in trunk:
>>> db=DAL()
>>> db.define_table('a',Field('b'),Field('c'))
>>> db(db.a.b>0)._count()
"SELECT count(*) FROM a WHERE (a.b > '0')"
>>> db(db.a.b>0)._count(distinct=db.a.b)
"SELECT count(DISTINCT a.b) FROM a WHERE (a.b > '0')"
>>> db(db.a.b>0)._count(distinct=db.a.b|db.a.c)
"SELECT count(DISTINCT a.b, a.c) FROM a WHERE (a.b > '0')"
>>> db(db.a.b>0)._count(distinct=(db.a.b,db.a.c))
"SELECT count(DISTINCT a.b, a.c) FROM a WHERE (a.b > '0')"
Give it a try and report any bug.
Massimo
On Jan 29, 7:18 am, "beto (R3)" <[email protected]> wrote:
> Postgres too!
>
>
>
>
>
>
>
> On Fri, Jan 28, 2011 at 1:41 PM, villas <[email protected]> wrote:
> >> It seems to work in SQLite and MS-SQL though.
>
> > Firebird seems OK too.