error meesage update for package gdb; remove default batch number for batch insert statement for package gdb

This commit is contained in:
John Guo
2022-04-18 20:28:00 +08:00
parent f9c9750108
commit ebad3eb93e
3 changed files with 3 additions and 8 deletions

View File

@ -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.

View File

@ -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
}

View File

@ -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