SQLStore: Create utility for bulk inserts (#57632)
* Add batchsize to dialects * Some intermediary progress * Reflection-based implementation * Validate batch size * Implement a few simple tests * Fix linter error * Add debug message when falling back to default batch size
This commit is contained in:
@@ -45,6 +45,10 @@ func (db *PostgresDialect) BooleanStr(value bool) string {
|
||||
return strconv.FormatBool(value)
|
||||
}
|
||||
|
||||
func (db *PostgresDialect) BatchSize() int {
|
||||
return 1000
|
||||
}
|
||||
|
||||
func (db *PostgresDialect) Default(col *Column) string {
|
||||
if col.Type == DB_Bool {
|
||||
if col.Default == "0" {
|
||||
|
||||
Reference in New Issue
Block a user