sqldb+config: validate maximum batch size config value
Now that the SQL query config values are configurable, we add some validation to make sure that the user doesnt set a max batch size that is larger than the limits for sqlite/postgres that have been determined by the TestSQLSliceQueries test.
This commit is contained in:
4 files changed
+67
-4
No files matched your search
@@ -143,6 +143,9 @@ func (db *DB) Validate() error {
|
||||
}
|
||||
|
||||
case SqliteBackend:
|
||||
if err := db.Sqlite.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
case PostgresBackend:
|
||||
if err := db.Postgres.Validate(); err != nil {
|
||||
return err
|
||||
|
||||
Reference in new issue
Block a user