-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:ydb-platform/fq-connector-go
- Loading branch information
Showing
13 changed files
with
232 additions
and
165 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
app/server/datasource/rdbms/clickhouse/get_query_and_args.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package clickhouse | ||
|
||
import ( | ||
api_service_protos "github.com/ydb-platform/fq-connector-go/libgo/service/protos" | ||
) | ||
|
||
func GetQueryAndArgs(request *api_service_protos.TDescribeTableRequest) (string, []any) { | ||
query := "SELECT name, type FROM system.columns WHERE table = ? and database = ?" | ||
args := []any{request.Table, request.DataSourceInstance.Database} | ||
|
||
return query, args | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
app/server/datasource/rdbms/postgresql/get_query_and_args.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package postgresql | ||
|
||
import ( | ||
api_service_protos "github.com/ydb-platform/fq-connector-go/libgo/service/protos" | ||
) | ||
|
||
func GetQueryAndArgs(request *api_service_protos.TDescribeTableRequest) (string, []any) { | ||
opts := request.GetDataSourceInstance().GetPgOptions().GetSchema() | ||
query := "SELECT column_name, data_type FROM information_schema.columns WHERE table_name = $1 AND table_schema = $2" | ||
args := []any{request.Table, opts} | ||
|
||
return query, args | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.