コード例 #1
0
 def filter(self, **kwargs):
     sql = "SELECT * FROM %s %s " % (self.table, self._get_where(**kwargs) + self._limit)
     return dbhelper.query(sql)
コード例 #2
0
 def get(self, **kwargs):
     sql = "SELECT * FROM %s %s LIMIT 1" % (self.table, self._get_where(**kwargs))
     result = dbhelper.query(sql)
     if result:
         return result[0]
     return None