code review

This commit is contained in:
meilin.huang
2022-12-17 22:24:21 +08:00
parent ffe250f8a9
commit 85349df8a1
6 changed files with 63 additions and 50 deletions

View File

@@ -103,3 +103,7 @@ func (mm *MysqlMetadata) GetCreateTableDdl(tableName string) []map[string]interf
res, _ := mm.di.innerSelect(fmt.Sprintf("show create table %s ", tableName))
return res
}
func (mm *MysqlMetadata) GetTableRecord(tableName string, pageNum, pageSize int) ([]string, []map[string]interface{}, error) {
return mm.di.SelectData(fmt.Sprintf("SELECT * FROM %s LIMIT %d, %d", tableName, (pageNum-1)*pageSize, pageSize))
}