File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- import { SQLExample } from "../views/examples" ;
2
1
import { JobManager } from "../config" ;
2
+ import { SQLExample } from "../views/examples" ;
3
3
import Statement from "./statement" ;
4
4
5
- export async function getServiceInfo ( ) : Promise < SQLExample [ ] | undefined > {
5
+ export async function getServiceInfo ( ) : Promise < SQLExample [ ] > {
6
6
// The reason we check for a selection is because we don't want it to prompt the user to start one here
7
7
if ( JobManager . getSelection ( ) ) {
8
- const resultSet = await JobManager . runSQL < { SERVICE_NAME : string , EXAMPLE : string } > ( `select SERVICE_NAME, EXAMPLE from qsys2.services_info` ) ;
8
+ const resultSet = await JobManager . runSQL < { SERVICE_NAME : string , EXAMPLE : string } > ( `select SERVICE_NAME, EXAMPLE from qsys2.services_info` ) ;
9
9
10
10
return resultSet . map ( r => ( {
11
11
name : Statement . prettyName ( r . SERVICE_NAME ) ,
12
12
content : [ r . EXAMPLE ] ,
13
13
} ) )
14
14
} else {
15
- return undefined ;
15
+ return [ { name : "Please start an SQL job to load the examples" , content : [ "" ] } ] ;
16
16
}
17
17
}
You can’t perform that action at this time.
0 commit comments