def count(self): ret = Query.count(self) self._sql = ret['sql'] data = self.getConnect().get(ret['sql'] , *ret['param']) if data : return data.row_count return 0
def add(self , attr): ret = Query.add(self , attr) self._sql = ret['sql'] #print ret['param'] return self.getConnect().execute(ret['sql'] , *ret['param'])
def __init__(self, table): Query.__init__(self, table) # 元数据绑定 self.Meta = False
def delete(self): ret = Query.delete(self) self._sql = ret['sql'] return self.getConnect().execute(ret['sql'] , *ret['param'])