Just tried this: test = db(db.cumulativeProperties.id>0).select(limitby=(0,1)) print 'test: {0}'.format(test)
results: cumulativeProperties.id,cumulativeProperties.uuid,cumulativeProperties.name,cumulativeProperties.value,cumulativeProperties.tag,cumulativeProperties.cmdName 1,365674dc-6371-4215-ad44-c35b5f6159bf,ftp_user,nmcbuild,<NULL>,None perfect!!!! :) and the bonus, makes it easy and quick to test if individual fields have content as well just by looping through results and doing dict(testItems).keys(). If a given field has value,it can also indicate a met or unmet condition. question: if i do the this, i get a 'update_record' in the returned list, does that indicate that something has in fact updated the record? and would 'isempty' be a shortcut for ...select(limitby=(0,1) and return the same data? thanks, Mart :) On Apr 12, 5:11 pm, Massimo Di Pierro <massimo.dipie...@gmail.com> wrote: > may be faster to do > > db(db.tablename.id>0).select(limitby=(0,1)) > > perhaps we should have something like: > > db(db.tablename).isempty() > > On Apr 12, 12:02 pm, Marin Pranjic <marin.pran...@gmail.com> wrote: > > > > > > > > > Something like db(db.tablename.id>0).count() ? > > > On Tue, Apr 12, 2011 at 5:22 PM, mart <msenecal...@gmail.com> wrote: > > > Hi, > > > > is there a shortcut to check if a table is empty? (not look to see > > > what the content is, just if it has any at all) > > > > Thanks, > > > Mart :)