Skip to content

Commit 94e54b0

Browse files
committed
capital D
1 parent a4b2e28 commit 94e54b0

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

config/pg_featureserv.toml.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ WriteTimeoutSec = 30
6969
# FunctionIncludes = [ "postgisftw", "schema2" ]
7070

7171
# Designate a column as the feature ID (where primary key is not available e.g. views/functions)
72-
# IdColumn = "id"
72+
# IDColumn = "id"
7373

7474
[Paging]
7575
# The default number of features in a response

hugo/content/installation/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ WriteTimeoutSec = 30
120120
# FunctionIncludes = [ "postgisftw", "schema2" ]
121121

122122
# Designate a column as the feature ID (where primary key is not available e.g. views/functions)
123-
# IdColumn = "id"
123+
# IDColumn = "id"
124124

125125
[Paging]
126126
# The default number of features in a response
@@ -246,7 +246,7 @@ Overrides items specified in `TableIncludes`.
246246
A list of the schemas to publish functions from.
247247
The default is to publish functions in the `postgisftw` schema.
248248

249-
#### IdColumn
249+
#### IDColumn
250250

251251
The column to use as the feature ID in cases where a primary key is not available. The default is `id`.
252252

internal/conf/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func setDefaultConfig() {
4444
viper.SetDefault("Database.TableIncludes", []string{})
4545
viper.SetDefault("Database.TableExcludes", []string{})
4646
viper.SetDefault("Database.FunctionIncludes", []string{"postgisftw"})
47-
viper.SetDefault("Database.IdColumn", "id")
47+
viper.SetDefault("Database.IDColumn", "id")
4848

4949
viper.SetDefault("Paging.LimitDefault", 10)
5050
viper.SetDefault("Paging.LimitMax", 1000)
@@ -95,7 +95,7 @@ type Database struct {
9595
TableIncludes []string
9696
TableExcludes []string
9797
FunctionIncludes []string
98-
IdColumn string
98+
IDColumn string
9999
}
100100

101101
// Metadata config

internal/data/catalog_db.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,9 @@ func scanTable(rows pgx.Rows) *Table {
355355
}
356356

357357
// detect ID column if primary key not defined.
358-
if idColumn == "" && conf.Configuration.Database.IdColumn != "" {
359-
if _, ok := datatypes[conf.Configuration.Database.IdColumn]; ok {
360-
idColumn = conf.Configuration.Database.IdColumn
358+
if idColumn == "" && conf.Configuration.Database.IDColumn != "" {
359+
if _, ok := datatypes[conf.Configuration.Database.IDColumn]; ok {
360+
idColumn = conf.Configuration.Database.IDColumn
361361
}
362362
}
363363

internal/data/catalog_db_fun.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ func scanFunctionDef(rows pgx.Rows) *Function {
116116
geomCol := geometryColumn(outNames, datatypes)
117117

118118
idColumn := ""
119-
if conf.Configuration.Database.IdColumn != "" {
120-
if _, ok := datatypes[conf.Configuration.Database.IdColumn]; ok {
121-
idColumn = conf.Configuration.Database.IdColumn
119+
if conf.Configuration.Database.IDColumn != "" {
120+
if _, ok := datatypes[conf.Configuration.Database.IDColumn]; ok {
121+
idColumn = conf.Configuration.Database.IDColumn
122122
}
123123
}
124124

0 commit comments

Comments
 (0)