コード例 #1
0
ファイル: APIhandler.py プロジェクト: danmt/SPE_Refact
    def count(self,options):
        query = DBhandler.getQuery(options)

        condition = query["condition"]

        where = Encoder.enQuery(self,condition)

        return self.db(where).count()
コード例 #2
0
ファイル: APIhandler.py プロジェクト: danmt/SPE_Refact
    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