Re: [sqlalchemy] how to count function

2013-09-13 Thread Alysson Bruno
I think so your problem is in this line: rowCounter = rowCounter.filter(and_(getattr(MaterialsTable,attr).like("%%%s%%" % val))).count() Here you put a integer in your rowCounter variable, then in your next call of this the don't have a filter method in your rowCounter ;) Em quinta-feira, 12 d

[sqlalchemy] how to count function

2013-09-12 Thread Mohsen Pahlevanzadeh
Dear all, I have the following code: // query = self.dbObj.session.query(MaterialsTable) rowCounter = self.dbObj.session.query(MaterialsTable) for attr , val in interfaceCodesObject.filterNameDict.items