Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions cue/datasource/proxy/sql/sql_patch.cue
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ import (
// options specifies command-line options to send to the server at connection start
options?: string @go(Options,string)
// max_conns is the maximum size of the pool
max_conns?: number @go(MaxConns,int)
maxConns?: number @go(MaxConns,int)
// connect_timeout the timeout value used for socket connect operations.
connect_timeout?: common.#DurationString @go(ConnectTimeout)
connectTimeout?: common.#DurationString @go(ConnectTimeout)
// prepare_threshold specifies the number of PreparedStatement executions that must occur before the driver begins using server-side prepared statements.
prepare_threshold?: number @go(PrepareThreshold,int)
prepareThreshold?: number @go(PrepareThreshold,int)
// ssl_mode to use when connecting to postgres
ssl_mode?: #enumSSLMode @go(SSLMode,int)
sslMode?: #enumSSLMode @go(SSLMode,int)
}

#Config: {
Expand Down
8 changes: 4 additions & 4 deletions go/datasource/proxy/sql/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ type MySQLConfig struct {

type PostgresConfig struct {
// MaxConns is the maximum size of the pool
MaxConns int32 `json:"max_conns,omitempty" yaml:"max_conns,omitempty"`
MaxConns int32 `json:"maxConns,omitempty" yaml:"maxConns,omitempty"`
// ConnectTimeout the timeout value used for socket connect operations.
ConnectTimeout common.DurationString `json:"connect_timeout,omitempty" yaml:"connect_timeout,omitempty"`
ConnectTimeout common.DurationString `json:"connectTimeout,omitempty" yaml:"connectTimeout,omitempty"`
// PrepareThreshold specifies the number of PreparedStatement executions that must occur before the driver begins using server-side prepared statements.
PrepareThreshold *int `json:"prepare_threshold,omitempty" yaml:"prepare_threshold,omitempty"`
PrepareThreshold *int `json:"prepareThreshold,omitempty" yaml:"prepareThreshold,omitempty"`
// SSLMode to use when connecting to postgres
SSLMode SSLMode `json:"ssl_mode,omitempty" yaml:"ssl_mode,omitempty"`
SSLMode SSLMode `json:"sslMode,omitempty" yaml:"sslMode,omitempty"`
// Options specifies command-line options to send to the server at connection start
Options string `json:"options,omitempty" yaml:"options,omitempty"`
}
Expand Down
18 changes: 9 additions & 9 deletions go/datasource/proxy/sql/sql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestUnmarshalJSONConfig(t *testing.T) {
"host": "localhost:5432",
"database": "test",
"postgres": {
"ssl_mode": "disable"
"sslMode": "disable"
}
}
`,
Expand Down Expand Up @@ -161,10 +161,10 @@ func TestUnmarshalJSONConfig(t *testing.T) {
"host": "localhost:5432",
"database": "test",
"postgres": {
"max_conns": 50,
"connect_timeout": "5m",
"prepare_threshold": 5,
"ssl_mode": "require",
"maxConns": 50,
"connectTimeout": "5m",
"prepareThreshold": 5,
"sslMode": "require",
"options": "-c search_path=myschema"
}
}
Expand All @@ -190,7 +190,7 @@ func TestUnmarshalJSONConfig(t *testing.T) {
"host": "localhost:5432",
"database": "test",
"postgres": {
"ssl_mode": "notreal"
"sslMode": "notreal"
}
}
`,
Expand Down Expand Up @@ -266,7 +266,7 @@ driver: postgres
host: localhost:5432
database: test
postgres:
ssl_mode: disable
sslMode: disable
`,
result: Config{
Driver: DriverPostgreSQL,
Expand Down Expand Up @@ -376,7 +376,7 @@ driver: postgres
host: localhost:5432
database: test
postgres:
ssl_mode: verify-full
sslMode: verify-full
`,
result: Config{
Driver: DriverPostgreSQL,
Expand All @@ -394,7 +394,7 @@ driver: postgres
host: localhost:5432
database: test
postgres:
ssl_mode: invalid
sslMode: invalid
`,
expectErr: true,
},
Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.perses</groupId>
<artifactId>spec</artifactId>
<version>0.2.0-beta.6</version>
<version>0.2.0-beta.9</version>
<packaging>jar</packaging>

<name>Perses</name>
Expand Down
4 changes: 2 additions & 2 deletions ts/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@perses-dev/spec",
"version": "0.2.0-beta.7",
"version": "0.2.0-beta.9",
"description": "Perses dashboard an datasource specification",
"license": "Apache-2.0",
"homepage": "https://github.com/perses/spec/blob/main/README.md",
Expand Down
Loading