Add row limit configuration for database.
This commit is contained in:
parent
1df76ee4e2
commit
24be86ef5f
|
|
@ -14,4 +14,13 @@ var (
|
|||
PwdDB = beego.AppConfig.String("mysqlpass")
|
||||
HostDB = beego.AppConfig.String("mysqlurls")
|
||||
DataBase = beego.AppConfig.String("mysqldb")
|
||||
RowLimit = 4500
|
||||
)
|
||||
|
||||
|
||||
func init() {
|
||||
row_limit, err = beego.AppConfig.Int64("row_limit")
|
||||
if err == nil {
|
||||
RowLimit = row_limit
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ var (
|
|||
func init() {
|
||||
log.SetLogger(variables.LogType, variables.LogParams)
|
||||
orm.RegisterModel(new(SoilMoistureTable),new(CapteurSoilMoistureTable))
|
||||
orm.DefaultRowsLimit = 4500
|
||||
orm.DefaultRowsLimit = database.RowLimit
|
||||
}
|
||||
|
||||
//——————————————————————————————————————————————————————————————————————————————
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ var (
|
|||
func init() {
|
||||
log.SetLogger(variables.LogType, variables.LogParams)
|
||||
orm.RegisterModel(new(TeleinfoTable), new(CompteurTeleinfoTable))
|
||||
orm.DefaultRowsLimit = 4500
|
||||
orm.DefaultRowsLimit = database.RowLimit
|
||||
|
||||
optionTarifaireTranslate["BASE"] = "Base"
|
||||
optionTarifaireTranslate["HC.."] = "Heures Creuses"
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ var (
|
|||
func init() {
|
||||
log.SetLogger(variables.LogType, variables.LogParams)
|
||||
orm.RegisterModel(new(TempTable))
|
||||
orm.DefaultRowsLimit = 4500
|
||||
orm.DefaultRowsLimit = database.RowLimit
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue