Skip to content

Commit 058ac72

Browse files
committed
remove config option
Signed-off-by: hfuss <hayden.fuss@kaleido.io>
1 parent a9c1400 commit 058ac72

3 files changed

Lines changed: 0 additions & 17 deletions

File tree

pkg/dbsql/config.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ const (
3737
SQLConfMaxIdleConns = "maxIdleConns"
3838
// SQLConfMaxConnLifetime maximum connections to the database
3939
SQLConfMaxConnLifetime = "maxConnLifetime"
40-
// SQLConfMaxPlaceholders overrides the provider's max SQL placeholders per statement (0 = use provider default)
41-
SQLConfMaxPlaceholders = "maxPlaceholders"
4240
)
4341

4442
const (
@@ -53,5 +51,4 @@ func (s *Database) InitConfig(provider Provider, config config.Section) {
5351
config.AddKnownKey(SQLConfMaxConnIdleTime, "1m")
5452
config.AddKnownKey(SQLConfMaxIdleConns) // defaults to the max connections
5553
config.AddKnownKey(SQLConfMaxConnLifetime)
56-
config.AddKnownKey(SQLConfMaxPlaceholders) // overrides provider default for max SQL placeholders
5754
}

pkg/dbsql/database.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ func (s *Database) Init(ctx context.Context, provider Provider, config config.Se
8080
s.features = s.provider.Features()
8181
s.sequenceColumn = s.provider.SequenceColumn()
8282

83-
if maxPlaceholders := config.GetInt(SQLConfMaxPlaceholders); maxPlaceholders > 0 {
84-
s.features.MaxPlaceholders = maxPlaceholders
85-
}
86-
8783
if config.GetString(SQLConfDatasourceURL) == "" {
8884
return i18n.NewError(ctx, i18n.MsgMissingConfig, "url", fmt.Sprintf("database.%s", s.provider.Name()))
8985
}

pkg/dbsql/database_test.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@ func TestInitDatabaseFeatures(t *testing.T) {
7878
assert.Equal(t, false, s.Features().MultiRowInsert)
7979
}
8080

81-
func TestInitDatabaseMaxPlaceholdersConfig(t *testing.T) {
82-
s := &Database{}
83-
tp := NewMockProvider()
84-
s.InitConfig(tp, tp.config)
85-
tp.config.Set(SQLConfMaxPlaceholders, 1000)
86-
err := s.Init(context.Background(), tp, tp.config)
87-
assert.NoError(t, err)
88-
assert.Equal(t, 1000, s.Features().MaxPlaceholders)
89-
}
90-
9181
func TestInitDatabaseMaxPlaceholdersProviderDefault(t *testing.T) {
9282
mp := NewMockProvider()
9383
mp.MaxPlaceholders = 65535

0 commit comments

Comments
 (0)