mirror of
https://gitee.com/johng/gf
synced 2026-07-07 22:27:06 +08:00
error meesage update for package gdb; remove default batch number for batch insert statement for package gdb
This commit is contained in:
@ -280,7 +280,6 @@ const (
|
||||
queryTypeCount = 1
|
||||
unionTypeNormal = 0
|
||||
unionTypeAll = 1
|
||||
defaultBatchNumber = 10 // Per count for batch insert/replace/save.
|
||||
defaultMaxIdleConnCount = 10 // Max idle connection count in pool.
|
||||
defaultMaxOpenConnCount = 0 // Max open connection count in pool. Default is no limit.
|
||||
defaultMaxConnLifeTime = 30 * time.Second // Max lifetime for per connection in pool in seconds.
|
||||
|
||||
@ -428,9 +428,5 @@ func (m *Model) formatOnDuplicateExKeys(onDuplicateEx interface{}) ([]string, er
|
||||
}
|
||||
|
||||
func (m *Model) getBatch() int {
|
||||
batch := defaultBatchNumber
|
||||
if m.batch > 0 {
|
||||
batch = m.batch
|
||||
}
|
||||
return batch
|
||||
return m.batch
|
||||
}
|
||||
|
||||
@ -182,7 +182,7 @@ func (m *Model) Value(fieldsAndWhere ...interface{}) (Value, error) {
|
||||
}
|
||||
return nil, gerror.NewCode(
|
||||
gcode.CodeInternalError,
|
||||
`query value error: the internal context data is missing. there's' internal issue should be fixed'`,
|
||||
`query value error: the internal context data is missing. there's internal issue should be fixed`,
|
||||
)
|
||||
}
|
||||
|
||||
@ -399,7 +399,7 @@ func (m *Model) Count(where ...interface{}) (int, error) {
|
||||
}
|
||||
return 0, gerror.NewCode(
|
||||
gcode.CodeInternalError,
|
||||
`query count error: the internal context data is missing. there's' internal issue should be fixed'`,
|
||||
`query count error: the internal context data is missing. there's internal issue should be fixed`,
|
||||
)
|
||||
}
|
||||
return 0, nil
|
||||
|
||||
Reference in New Issue
Block a user