@@ -13,6 +13,7 @@ export default class IRISDriver extends AbstractDriver<IRISdb, DriverOptions> im
13
13
14
14
queries : IQueries = queries ;
15
15
private showSystem = false ;
16
+ private filter = "" ;
16
17
17
18
public async open ( ) {
18
19
if ( this . connection ) {
@@ -22,6 +23,7 @@ export default class IRISDriver extends AbstractDriver<IRISdb, DriverOptions> im
22
23
const { namespace } = this . credentials ;
23
24
let config : IRISDirect ;
24
25
this . showSystem = this . credentials . showSystem || false ;
26
+ this . filter = this . credentials . filter || "" ;
25
27
26
28
if ( this . credentials . serverName ) {
27
29
throw new Error ( "not supported" ) ;
@@ -113,6 +115,7 @@ export default class IRISDriver extends AbstractDriver<IRISdb, DriverOptions> im
113
115
114
116
private async getSchemas ( { item } : Arg0 < IConnectionDriver [ 'getChildrenForItem' ] > ) {
115
117
item [ 'showSystem' ] = this . showSystem ;
118
+ item [ 'filter' ] = this . filter ;
116
119
117
120
switch ( item . childType ) {
118
121
case ContextValue . TABLE :
@@ -127,6 +130,7 @@ export default class IRISDriver extends AbstractDriver<IRISdb, DriverOptions> im
127
130
128
131
private async getChildrenForSchema ( { item } : Arg0 < IConnectionDriver [ 'getChildrenForItem' ] > ) {
129
132
item [ 'showSystem' ] = this . showSystem ;
133
+ item [ 'filter' ] = this . filter ;
130
134
131
135
switch ( item . childType ) {
132
136
case ContextValue . TABLE :
@@ -151,11 +155,11 @@ export default class IRISDriver extends AbstractDriver<IRISdb, DriverOptions> im
151
155
case ContextValue . DATABASE :
152
156
// Syntatically, a schema in IRIS SQL resembles a database in other databases.
153
157
// That's the simplest way to adapt IRIS SQL to the generic Hue parser vscode-sqltools uses.
154
- return this . queryResults ( this . queries . searchEverything ( { search, showSystem : this . showSystem } ) ) ;
158
+ return this . queryResults ( this . queries . searchEverything ( { search, showSystem : this . showSystem , filter : this . filter } ) ) ;
155
159
case ContextValue . TABLE :
156
160
case ContextValue . FUNCTION :
157
161
case ContextValue . VIEW :
158
- const searchParams = { search, showSystem : this . showSystem , itemType, ...extraParams } ;
162
+ const searchParams = { search, showSystem : this . showSystem , filter : this . filter , itemType, ...extraParams } ;
159
163
if ( extraParams [ 'database' ] ) {
160
164
searchParams [ 'schema' ] = extraParams [ 'database' ] ;
161
165
}
0 commit comments