orm support use any numeric type set QuerySeter.Limit value

This commit is contained in:
slene
2013-09-13 18:06:44 +08:00
parent 8e8d39d3cb
commit 1596aa7a34
4 changed files with 21 additions and 16 deletions

View File

@@ -360,9 +360,9 @@ func (d *dbTables) getOrderSql(orders []string) (orderSql string) {
return
}
func (d *dbTables) getLimitSql(mi *modelInfo, offset int64, limit int) (limits string) {
func (d *dbTables) getLimitSql(mi *modelInfo, offset int64, limit int64) (limits string) {
if limit == 0 {
limit = DefaultRowsLimit
limit = int64(DefaultRowsLimit)
}
if limit < 0 {
// no limit