Пример #1
0
    def count(self,options):
        query = DBhandler.getQuery(options)

        condition = query["condition"]

        where = Encoder.enQuery(self,condition)

        return self.db(where).count()
Пример #2
0
    def find(self,options):
        query = DBhandler.getQuery(options)

        condition = query['condition']
        order = query['order']
        limit = query['limit']

        where = Encoder.enQuery(self,condition)
        rows = self.db(where).select(orderby=eval(order),limitby=limit)

        return rows