File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ export default class Schemas {
124124 }
125125 }
126126
127- const query = `${ selects . join ( " UNION ALL " ) } Order by QSYS2.DELIMIT_NAME(NAME) asc` ;
127+ const query = `with results as ( ${ selects . join ( " UNION ALL " ) } ) select * from results Order by QSYS2.DELIMIT_NAME(NAME) asc` ;
128128
129129 const objects : any [ ] = await JobManager . runSQL ( [
130130 query ,
Original file line number Diff line number Diff line change 11import assert from "assert" ;
22import { TestSuite } from "." ;
33import { JobManager } from "../config" ;
4- import Database from "../database/schemas" ;
4+ import Database , { AllSQLTypes } from "../database/schemas" ;
55import Statement from "../database/statement" ;
66import Callable from "../database/callable" ;
77import { getInstance } from "../base" ;
@@ -97,6 +97,12 @@ export const DatabaseSuite: TestSuite = {
9797 assert . notStrictEqual ( objects . length , 0 ) ;
9898 } } ,
9999
100+ { name : `Schema filter test` , test : async ( ) => {
101+ const objects = await Database . getObjects ( systemLibrary , AllSQLTypes , { filter : `emp` } ) ;
102+
103+ assert . notStrictEqual ( objects . length , 0 ) ;
104+ } } ,
105+
100106 { name : `Get tables, sqlSchema name` , test : async ( ) => {
101107 const objects = await Database . getObjects ( Statement . noQuotes ( sqlSchema ) , [ `tables` ] ) ;
102108
You can’t perform that action at this time.
0 commit comments