@@ -933,7 +933,9 @@ describe('BigQuery', () => {
933933 . table ( tableRef ! . tableId ! ) ;
934934
935935 let [ rows ] = await table . getRows ( {
936- selectedFields : 'data.nested.object.a,data.nested.object.b' ,
936+ selectedFields : [ 'data.nested.object.a' , 'data.nested.object.b' ] . join (
937+ ',' ,
938+ ) ,
937939 } ) ;
938940 console . log ( 'rows' , rows ) ;
939941 assert . deepEqual ( rows [ 0 ] , {
@@ -973,7 +975,11 @@ describe('BigQuery', () => {
973975 assert . deepEqual ( rows , [ { age : 10 } , { age : 20 } , { age : 30 } , { age : 40 } ] ) ;
974976
975977 [ rows ] = await table . getRows ( {
976- selectedFields : 'data.nested.object.a,data.nested.object.b,age' ,
978+ selectedFields : [
979+ 'data.nested.object.a' ,
980+ 'data.nested.object.b' ,
981+ 'age' ,
982+ ] . join ( ',' ) ,
977983 } ) ;
978984 console . log ( 'rows 4' , rows ) ;
979985 assert . deepEqual ( rows [ 0 ] , {
@@ -1006,6 +1012,20 @@ describe('BigQuery', () => {
10061012 } ,
10071013 age : 10 ,
10081014 } ) ;
1015+
1016+ [ rows ] = await table . getRows ( {
1017+ selectedFields : undefined ,
1018+ startIndex : '1' ,
1019+ maxResults : 1 ,
1020+ } ) ;
1021+ console . log ( 'rows start index 1 and max results 1' , JSON . stringify ( rows ) ) ;
1022+
1023+ [ rows ] = await table . getRows ( {
1024+ selectedFields : undefined ,
1025+ startIndex : '2' ,
1026+ maxResults : 2 ,
1027+ } ) ;
1028+ console . log ( 'rows start index 2 and max results 2' , JSON . stringify ( rows ) ) ;
10091029 } ) ;
10101030
10111031 it ( 'should get the rows in a table via stream' , done => {
0 commit comments