mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 18:56:30 +02:00
multi: remove DefaultQueryConfig
And always make use of either the new DefaultSQLiteConfig or DefaultPostgresConfig.
This commit is contained in:
@@ -72,14 +72,6 @@ func (c *QueryConfig) Validate(sqlite bool) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// DefaultQueryConfig returns a default configuration for SQL queries.
|
||||
func DefaultQueryConfig() *QueryConfig {
|
||||
return &QueryConfig{
|
||||
MaxBatchSize: 250,
|
||||
MaxPageSize: 10000,
|
||||
}
|
||||
}
|
||||
|
||||
// DefaultSQLiteConfig returns a default configuration for SQL queries to a
|
||||
// SQLite backend.
|
||||
func DefaultSQLiteConfig() *QueryConfig {
|
||||
|
@@ -22,7 +22,7 @@ func TestExecuteBatchQuery(t *testing.T) {
|
||||
|
||||
t.Run("empty input returns nil", func(t *testing.T) {
|
||||
var (
|
||||
cfg = DefaultQueryConfig()
|
||||
cfg = DefaultSQLiteConfig()
|
||||
inputItems []int
|
||||
)
|
||||
|
||||
@@ -144,7 +144,7 @@ func TestExecuteBatchQuery(t *testing.T) {
|
||||
|
||||
t.Run("query function error is propagated", func(t *testing.T) {
|
||||
var (
|
||||
cfg = DefaultQueryConfig()
|
||||
cfg = DefaultSQLiteConfig()
|
||||
inputItems = []int{1, 2, 3}
|
||||
)
|
||||
|
||||
@@ -174,7 +174,7 @@ func TestExecuteBatchQuery(t *testing.T) {
|
||||
|
||||
t.Run("callback error is propagated", func(t *testing.T) {
|
||||
var (
|
||||
cfg = DefaultQueryConfig()
|
||||
cfg = DefaultSQLiteConfig()
|
||||
inputItems = []int{1, 2, 3}
|
||||
)
|
||||
|
||||
@@ -307,7 +307,7 @@ func TestSQLSliceQueries(t *testing.T) {
|
||||
|
||||
err := ExecuteBatchQuery(
|
||||
ctx,
|
||||
DefaultQueryConfig(),
|
||||
DefaultSQLiteConfig(),
|
||||
queryParams,
|
||||
func(s string) string {
|
||||
return s
|
||||
|
Reference in New Issue
Block a user