Skip to content

Commit c7d1284

Browse files
committed
Merge remote-tracking branch 'upstream/main' into add-hidden-query-button
Signed-off-by: OrReuben <orreuven1243@gmail.com>
1 parent 7284b2f commit c7d1284

2 files changed

Lines changed: 30 additions & 1 deletion

File tree

cue-test/common/proxy/sql.cue

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Copyright The Perses Authors
2+
// Licensed under the Apache License, Version 2.0 (the "License");
3+
// you may not use this file except in compliance with the License.
4+
// You may obtain a copy of the License at
5+
//
6+
// http://www.apache.org/licenses/LICENSE-2.0
7+
//
8+
// Unless required by applicable law or agreed to in writing, software
9+
// distributed under the License is distributed on an "AS IS" BASIS,
10+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11+
// See the License for the specific language governing permissions and
12+
// limitations under the License.
13+
14+
package proxy
15+
16+
mySQLProxySpec: #baseSQLDatasourceSpec & {
17+
proxy: #SQLProxy & {
18+
kind: "SQLProxy"
19+
spec: {
20+
driver: "postgres"
21+
host: "localhost:5432"
22+
database: "mydb"
23+
}
24+
}
25+
}

cue/common/proxy/sql.cue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ import (
4646
#SQLProxy: {
4747
kind: "SQLProxy"
4848
spec: {
49-
driver: "mysql" | "postgres"
49+
driver: "mysql" | "mariadb" | "postgres"
5050
// host is the hostname and port of the datasource. It is not the hostname of the proxy.
5151
// The Perses server is the proxy, so it needs to know where to redirect the request.
5252
host: string
@@ -57,7 +57,11 @@ import (
5757
secret?: string
5858
// mysql specific driver configurations
5959
mysql?: #MySQL
60+
// mariadb specific driver configurations
61+
mariadb?: #MySQL
6062
// postgres specific driver configurations
6163
postgres?: #Postgres
6264
}
6365
}
66+
67+
#baseSQLDatasourceSpec: { driver: "mysql" | "mariadb" | "postgres", host: string, database: string }| { proxy: #SQLProxy }

0 commit comments

Comments
 (0)