Skip to content

Commit 5645b2e

Browse files
committed
chore: sort config dump alphabetically
The config dump in Config.hs listed db-config, db-pre-config and the db-pool-* settings out of alphabetical order, while the rest of the dump was sorted. Now the whole dump is consistently alphabetical and update the expected IO test configs to match.
1 parent 1d6e0bd commit 5645b2e

15 files changed

Lines changed: 60 additions & 60 deletions

src/PostgREST/Config.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,21 +170,21 @@ toText conf =
170170
,("db-anon-role", q . T.decodeUtf8 . fromMaybe "" . configDbAnonRole)
171171
,("db-channel", q . configDbChannel)
172172
,("db-channel-enabled", T.toLower . show . configDbChannelEnabled)
173+
,("db-config", T.toLower . show . configDbConfig)
173174
,("db-extra-search-path", q . T.intercalate "," . configDbExtraSearchPath)
174175
,("db-hoisted-tx-settings", q . T.intercalate "," . configDbHoistedTxSettings)
175176
,("db-max-rows", maybe "\"\"" show . configDbMaxRows)
176177
,("db-plan-enabled", T.toLower . show . configDbPlanEnabled)
177178
,("db-pool", show . configDbPoolSize)
178179
,("db-pool-acquisition-timeout", show . configDbPoolAcquisitionTimeout)
179-
,("db-pool-max-lifetime", show . configDbPoolMaxLifetime)
180-
,("db-pool-max-idletime", show . configDbPoolMaxIdletime)
181180
,("db-pool-automatic-recovery", T.toLower . show . configDbPoolAutomaticRecovery)
181+
,("db-pool-max-idletime", show . configDbPoolMaxIdletime)
182+
,("db-pool-max-lifetime", show . configDbPoolMaxLifetime)
183+
,("db-pre-config", q . maybe mempty dumpQi . configDbPreConfig)
182184
,("db-pre-request", q . maybe mempty dumpQi . configDbPreRequest)
183185
,("db-prepared-statements", T.toLower . show . configDbPreparedStatements)
184186
,("db-root-spec", q . maybe mempty dumpQi . configDbRootSpec)
185187
,("db-schemas", q . T.intercalate "," . toList . configDbSchemas)
186-
,("db-config", T.toLower . show . configDbConfig)
187-
,("db-pre-config", q . maybe mempty dumpQi . configDbPreConfig)
188188
,("db-timezone-enabled", T.toLower . show . configDbTimezoneEnabled)
189189
,("db-tx-end", q . showTxEnd)
190190
,("db-uri", q . configDbUri)

test/io/configs/expected/aliases.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ db-aggregates-enabled = false
33
db-anon-role = ""
44
db-channel = "pgrst"
55
db-channel-enabled = true
6+
db-config = true
67
db-extra-search-path = "public"
78
db-hoisted-tx-settings = "statement_timeout,plan_filter.statement_cost_limit,default_transaction_isolation"
89
db-max-rows = 1000
910
db-plan-enabled = false
1011
db-pool = 10
1112
db-pool-acquisition-timeout = 10
12-
db-pool-max-lifetime = 1800
13-
db-pool-max-idletime = 5
1413
db-pool-automatic-recovery = true
14+
db-pool-max-idletime = 5
15+
db-pool-max-lifetime = 1800
16+
db-pre-config = ""
1517
db-pre-request = "check_alias"
1618
db-prepared-statements = true
1719
db-root-spec = "open_alias"
1820
db-schemas = "provided_through_alias"
19-
db-config = true
20-
db-pre-config = ""
2121
db-timezone-enabled = true
2222
db-tx-end = "commit"
2323
db-uri = "postgresql://"

test/io/configs/expected/boolean-numeric.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ db-aggregates-enabled = false
33
db-anon-role = ""
44
db-channel = "pgrst"
55
db-channel-enabled = true
6+
db-config = true
67
db-extra-search-path = "public"
78
db-hoisted-tx-settings = "statement_timeout,plan_filter.statement_cost_limit,default_transaction_isolation"
89
db-max-rows = ""
910
db-plan-enabled = false
1011
db-pool = 10
1112
db-pool-acquisition-timeout = 10
12-
db-pool-max-lifetime = 1800
13-
db-pool-max-idletime = 30
1413
db-pool-automatic-recovery = true
14+
db-pool-max-idletime = 30
15+
db-pool-max-lifetime = 1800
16+
db-pre-config = ""
1517
db-pre-request = ""
1618
db-prepared-statements = false
1719
db-root-spec = ""
1820
db-schemas = "public"
19-
db-config = true
20-
db-pre-config = ""
2121
db-timezone-enabled = true
2222
db-tx-end = "commit"
2323
db-uri = "postgresql://"

test/io/configs/expected/boolean-string.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ db-aggregates-enabled = false
33
db-anon-role = ""
44
db-channel = "pgrst"
55
db-channel-enabled = true
6+
db-config = true
67
db-extra-search-path = "public"
78
db-hoisted-tx-settings = "statement_timeout,plan_filter.statement_cost_limit,default_transaction_isolation"
89
db-max-rows = ""
910
db-plan-enabled = false
1011
db-pool = 10
1112
db-pool-acquisition-timeout = 10
12-
db-pool-max-lifetime = 1800
13-
db-pool-max-idletime = 30
1413
db-pool-automatic-recovery = true
14+
db-pool-max-idletime = 30
15+
db-pool-max-lifetime = 1800
16+
db-pre-config = ""
1517
db-pre-request = ""
1618
db-prepared-statements = false
1719
db-root-spec = ""
1820
db-schemas = "public"
19-
db-config = true
20-
db-pre-config = ""
2121
db-timezone-enabled = true
2222
db-tx-end = "commit"
2323
db-uri = "postgresql://"

test/io/configs/expected/defaults.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ db-aggregates-enabled = false
33
db-anon-role = ""
44
db-channel = "pgrst"
55
db-channel-enabled = true
6+
db-config = false
67
db-extra-search-path = "public"
78
db-hoisted-tx-settings = "statement_timeout,plan_filter.statement_cost_limit,default_transaction_isolation"
89
db-max-rows = ""
910
db-plan-enabled = false
1011
db-pool = 10
1112
db-pool-acquisition-timeout = 10
12-
db-pool-max-lifetime = 1800
13-
db-pool-max-idletime = 30
1413
db-pool-automatic-recovery = true
14+
db-pool-max-idletime = 30
15+
db-pool-max-lifetime = 1800
16+
db-pre-config = ""
1517
db-pre-request = ""
1618
db-prepared-statements = true
1719
db-root-spec = ""
1820
db-schemas = "public"
19-
db-config = false
20-
db-pre-config = ""
2121
db-timezone-enabled = true
2222
db-tx-end = "commit"
2323
db-uri = "postgresql://"

test/io/configs/expected/jspath-str-op-dump1.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ db-aggregates-enabled = false
33
db-anon-role = ""
44
db-channel = "pgrst"
55
db-channel-enabled = true
6+
db-config = true
67
db-extra-search-path = "public"
78
db-hoisted-tx-settings = "statement_timeout,plan_filter.statement_cost_limit,default_transaction_isolation"
89
db-max-rows = ""
910
db-plan-enabled = false
1011
db-pool = 10
1112
db-pool-acquisition-timeout = 10
12-
db-pool-max-lifetime = 1800
13-
db-pool-max-idletime = 30
1413
db-pool-automatic-recovery = true
14+
db-pool-max-idletime = 30
15+
db-pool-max-lifetime = 1800
16+
db-pre-config = ""
1517
db-pre-request = ""
1618
db-prepared-statements = true
1719
db-root-spec = ""
1820
db-schemas = "public"
19-
db-config = true
20-
db-pre-config = ""
2121
db-timezone-enabled = true
2222
db-tx-end = "commit"
2323
db-uri = "postgresql://"

test/io/configs/expected/jspath-str-op-dump2.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ db-aggregates-enabled = false
33
db-anon-role = ""
44
db-channel = "pgrst"
55
db-channel-enabled = true
6+
db-config = true
67
db-extra-search-path = "public"
78
db-hoisted-tx-settings = "statement_timeout,plan_filter.statement_cost_limit,default_transaction_isolation"
89
db-max-rows = ""
910
db-plan-enabled = false
1011
db-pool = 10
1112
db-pool-acquisition-timeout = 10
12-
db-pool-max-lifetime = 1800
13-
db-pool-max-idletime = 30
1413
db-pool-automatic-recovery = true
14+
db-pool-max-idletime = 30
15+
db-pool-max-lifetime = 1800
16+
db-pre-config = ""
1517
db-pre-request = ""
1618
db-prepared-statements = true
1719
db-root-spec = ""
1820
db-schemas = "public"
19-
db-config = true
20-
db-pre-config = ""
2121
db-timezone-enabled = true
2222
db-tx-end = "commit"
2323
db-uri = "postgresql://"

test/io/configs/expected/jspath-str-op-dump3.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ db-aggregates-enabled = false
33
db-anon-role = ""
44
db-channel = "pgrst"
55
db-channel-enabled = true
6+
db-config = true
67
db-extra-search-path = "public"
78
db-hoisted-tx-settings = "statement_timeout,plan_filter.statement_cost_limit,default_transaction_isolation"
89
db-max-rows = ""
910
db-plan-enabled = false
1011
db-pool = 10
1112
db-pool-acquisition-timeout = 10
12-
db-pool-max-lifetime = 1800
13-
db-pool-max-idletime = 30
1413
db-pool-automatic-recovery = true
14+
db-pool-max-idletime = 30
15+
db-pool-max-lifetime = 1800
16+
db-pre-config = ""
1517
db-pre-request = ""
1618
db-prepared-statements = true
1719
db-root-spec = ""
1820
db-schemas = "public"
19-
db-config = true
20-
db-pre-config = ""
2121
db-timezone-enabled = true
2222
db-tx-end = "commit"
2323
db-uri = "postgresql://"

test/io/configs/expected/jspath-str-op-dump4.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ db-aggregates-enabled = false
33
db-anon-role = ""
44
db-channel = "pgrst"
55
db-channel-enabled = true
6+
db-config = true
67
db-extra-search-path = "public"
78
db-hoisted-tx-settings = "statement_timeout,plan_filter.statement_cost_limit,default_transaction_isolation"
89
db-max-rows = ""
910
db-plan-enabled = false
1011
db-pool = 10
1112
db-pool-acquisition-timeout = 10
12-
db-pool-max-lifetime = 1800
13-
db-pool-max-idletime = 30
1413
db-pool-automatic-recovery = true
14+
db-pool-max-idletime = 30
15+
db-pool-max-lifetime = 1800
16+
db-pre-config = ""
1517
db-pre-request = ""
1618
db-prepared-statements = true
1719
db-root-spec = ""
1820
db-schemas = "public"
19-
db-config = true
20-
db-pre-config = ""
2121
db-timezone-enabled = true
2222
db-tx-end = "commit"
2323
db-uri = "postgresql://"

test/io/configs/expected/jspath-str-op-dump5.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ db-aggregates-enabled = false
33
db-anon-role = ""
44
db-channel = "pgrst"
55
db-channel-enabled = true
6+
db-config = true
67
db-extra-search-path = "public"
78
db-hoisted-tx-settings = "statement_timeout,plan_filter.statement_cost_limit,default_transaction_isolation"
89
db-max-rows = ""
910
db-plan-enabled = false
1011
db-pool = 10
1112
db-pool-acquisition-timeout = 10
12-
db-pool-max-lifetime = 1800
13-
db-pool-max-idletime = 30
1413
db-pool-automatic-recovery = true
14+
db-pool-max-idletime = 30
15+
db-pool-max-lifetime = 1800
16+
db-pre-config = ""
1517
db-pre-request = ""
1618
db-prepared-statements = true
1719
db-root-spec = ""
1820
db-schemas = "public"
19-
db-config = true
20-
db-pre-config = ""
2121
db-timezone-enabled = true
2222
db-tx-end = "commit"
2323
db-uri = "postgresql://"

0 commit comments

Comments
 (0)