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:
Elle Mouton committed 2025-08-13 14:43:31 +02:00
1 parent ee292786b1
commit 185166b8d3
4 files changed
+67 -4

No files matched your search

+3
View File
@@ -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