File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -20,17 +20,21 @@ type connector struct {
2020}
2121
2222func (c * connector ) Connect (ctx context.Context ) (driver.Conn , error ) {
23+ var catalogName * cli_service.TIdentifier
24+ var schemaName * cli_service.TIdentifier
2325 var initialNamespace * cli_service.TNamespace
2426
2527 if c .cfg .Catalog != "" {
26- initialNamespace = & cli_service.TNamespace {}
27- initialNamespace .CatalogName = cli_service .TIdentifierPtr (cli_service .TIdentifier (c .cfg .Catalog ))
28+ catalogName = cli_service .TIdentifierPtr (cli_service .TIdentifier (c .cfg .Catalog ))
2829 }
2930 if c .cfg .Schema != "" {
30- if initialNamespace == nil {
31- initialNamespace = & cli_service.TNamespace {}
31+ schemaName = cli_service .TIdentifierPtr (cli_service .TIdentifier (c .cfg .Schema ))
32+ }
33+ if catalogName != nil || schemaName != nil {
34+ initialNamespace = & cli_service.TNamespace {
35+ CatalogName : catalogName ,
36+ SchemaName : schemaName ,
3237 }
33- initialNamespace .SchemaName = cli_service .TIdentifierPtr (cli_service .TIdentifier (c .cfg .Schema ))
3438 }
3539
3640 // we need to ensure that open session will eventually end
You can’t perform that action at this time.
0 commit comments