Skip to content

Commit 2960817

Browse files
authored
fix: Handle NoConnection (#14126)
#### Summary Same as #14120 Required for the package command to work <!--
1 parent d1497ac commit 2960817

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

plugins/source/oracledb/client/client.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,13 @@ func (*Client) ID() string {
3030
}
3131

3232
func Configure(ctx context.Context, logger zerolog.Logger, spec []byte, opts plugin.NewClientOptions) (plugin.Client, error) {
33+
if opts.NoConnection {
34+
return &Client{
35+
logger: logger,
36+
options: opts,
37+
tables: schema.Tables{},
38+
}, nil
39+
}
3340
var oracleDBSpec Spec
3441
err := json.Unmarshal(spec, &oracleDBSpec)
3542
if err != nil {
@@ -63,6 +70,9 @@ func Configure(ctx context.Context, logger zerolog.Logger, spec []byte, opts plu
6370
}
6471

6572
func (c Client) Tables(ctx context.Context, opts plugin.TableOptions) (schema.Tables, error) {
73+
if c.options.NoConnection {
74+
return schema.Tables{}, nil
75+
}
6676
return c.tables.FilterDfs(opts.Tables, opts.SkipTables, opts.SkipDependentTables)
6777
}
6878

0 commit comments

Comments
 (0)