@@ -63,6 +63,12 @@ describe('DBSQLSession', () => {
6363 const result = await session . executeStatement ( 'SELECT * FROM table' , { maxRows : 10 } ) ;
6464 expect ( result ) . instanceOf ( DBSQLOperation ) ;
6565 } ) ;
66+
67+ it ( 'should disable direct results' , async ( ) => {
68+ const session = createSession ( ) ;
69+ const result = await session . executeStatement ( 'SELECT * FROM table' , { maxRows : null } ) ;
70+ expect ( result ) . instanceOf ( DBSQLOperation ) ;
71+ } ) ;
6672 } ) ;
6773
6874 describe ( 'getTypeInfo' , ( ) => {
@@ -77,6 +83,12 @@ describe('DBSQLSession', () => {
7783 const result = await session . getTypeInfo ( { maxRows : 10 } ) ;
7884 expect ( result ) . instanceOf ( DBSQLOperation ) ;
7985 } ) ;
86+
87+ it ( 'should disable direct results' , async ( ) => {
88+ const session = createSession ( ) ;
89+ const result = await session . getTypeInfo ( { maxRows : null } ) ;
90+ expect ( result ) . instanceOf ( DBSQLOperation ) ;
91+ } ) ;
8092 } ) ;
8193
8294 describe ( 'getCatalogs' , ( ) => {
@@ -91,6 +103,12 @@ describe('DBSQLSession', () => {
91103 const result = await session . getCatalogs ( { maxRows : 10 } ) ;
92104 expect ( result ) . instanceOf ( DBSQLOperation ) ;
93105 } ) ;
106+
107+ it ( 'should disable direct results' , async ( ) => {
108+ const session = createSession ( ) ;
109+ const result = await session . getCatalogs ( { maxRows : null } ) ;
110+ expect ( result ) . instanceOf ( DBSQLOperation ) ;
111+ } ) ;
94112 } ) ;
95113
96114 describe ( 'getSchemas' , ( ) => {
@@ -111,9 +129,13 @@ describe('DBSQLSession', () => {
111129
112130 it ( 'should use direct results' , async ( ) => {
113131 const session = createSession ( ) ;
114- const result = await session . getSchemas ( {
115- maxRows : 10 ,
116- } ) ;
132+ const result = await session . getSchemas ( { maxRows : 10 } ) ;
133+ expect ( result ) . instanceOf ( DBSQLOperation ) ;
134+ } ) ;
135+
136+ it ( 'should disable direct results' , async ( ) => {
137+ const session = createSession ( ) ;
138+ const result = await session . getSchemas ( { maxRows : null } ) ;
117139 expect ( result ) . instanceOf ( DBSQLOperation ) ;
118140 } ) ;
119141 } ) ;
@@ -138,9 +160,13 @@ describe('DBSQLSession', () => {
138160
139161 it ( 'should use direct results' , async ( ) => {
140162 const session = createSession ( ) ;
141- const result = await session . getTables ( {
142- maxRows : 10 ,
143- } ) ;
163+ const result = await session . getTables ( { maxRows : 10 } ) ;
164+ expect ( result ) . instanceOf ( DBSQLOperation ) ;
165+ } ) ;
166+
167+ it ( 'should disable direct results' , async ( ) => {
168+ const session = createSession ( ) ;
169+ const result = await session . getTables ( { maxRows : null } ) ;
144170 expect ( result ) . instanceOf ( DBSQLOperation ) ;
145171 } ) ;
146172 } ) ;
@@ -157,6 +183,12 @@ describe('DBSQLSession', () => {
157183 const result = await session . getTableTypes ( { maxRows : 10 } ) ;
158184 expect ( result ) . instanceOf ( DBSQLOperation ) ;
159185 } ) ;
186+
187+ it ( 'should disable direct results' , async ( ) => {
188+ const session = createSession ( ) ;
189+ const result = await session . getTableTypes ( { maxRows : null } ) ;
190+ expect ( result ) . instanceOf ( DBSQLOperation ) ;
191+ } ) ;
160192 } ) ;
161193
162194 describe ( 'getColumns' , ( ) => {
@@ -179,9 +211,13 @@ describe('DBSQLSession', () => {
179211
180212 it ( 'should use direct results' , async ( ) => {
181213 const session = createSession ( ) ;
182- const result = await session . getColumns ( {
183- maxRows : 10 ,
184- } ) ;
214+ const result = await session . getColumns ( { maxRows : 10 } ) ;
215+ expect ( result ) . instanceOf ( DBSQLOperation ) ;
216+ } ) ;
217+
218+ it ( 'should disable direct results' , async ( ) => {
219+ const session = createSession ( ) ;
220+ const result = await session . getColumns ( { maxRows : null } ) ;
185221 expect ( result ) . instanceOf ( DBSQLOperation ) ;
186222 } ) ;
187223 } ) ;
@@ -207,6 +243,17 @@ describe('DBSQLSession', () => {
207243 } ) ;
208244 expect ( result ) . instanceOf ( DBSQLOperation ) ;
209245 } ) ;
246+
247+ it ( 'should disable direct results' , async ( ) => {
248+ const session = createSession ( ) ;
249+ const result = await session . getFunctions ( {
250+ catalogName : 'catalog' ,
251+ schemaName : 'schema' ,
252+ functionName : 'avg' ,
253+ maxRows : null ,
254+ } ) ;
255+ expect ( result ) . instanceOf ( DBSQLOperation ) ;
256+ } ) ;
210257 } ) ;
211258
212259 describe ( 'getPrimaryKeys' , ( ) => {
@@ -230,6 +277,17 @@ describe('DBSQLSession', () => {
230277 } ) ;
231278 expect ( result ) . instanceOf ( DBSQLOperation ) ;
232279 } ) ;
280+
281+ it ( 'should disable direct results' , async ( ) => {
282+ const session = createSession ( ) ;
283+ const result = await session . getPrimaryKeys ( {
284+ catalogName : 'catalog' ,
285+ schemaName : 'schema' ,
286+ tableName : 't1' ,
287+ maxRows : null ,
288+ } ) ;
289+ expect ( result ) . instanceOf ( DBSQLOperation ) ;
290+ } ) ;
233291 } ) ;
234292
235293 describe ( 'getCrossReference' , ( ) => {
@@ -259,6 +317,20 @@ describe('DBSQLSession', () => {
259317 } ) ;
260318 expect ( result ) . instanceOf ( DBSQLOperation ) ;
261319 } ) ;
320+
321+ it ( 'should disable direct results' , async ( ) => {
322+ const session = createSession ( ) ;
323+ const result = await session . getCrossReference ( {
324+ parentCatalogName : 'parentCatalogName' ,
325+ parentSchemaName : 'parentSchemaName' ,
326+ parentTableName : 'parentTableName' ,
327+ foreignCatalogName : 'foreignCatalogName' ,
328+ foreignSchemaName : 'foreignSchemaName' ,
329+ foreignTableName : 'foreignTableName' ,
330+ maxRows : null ,
331+ } ) ;
332+ expect ( result ) . instanceOf ( DBSQLOperation ) ;
333+ } ) ;
262334 } ) ;
263335
264336 describe ( 'getDelegationToken' , ( ) => {
0 commit comments