File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,4 +49,5 @@ export declare class Statement {
4949}
5050export declare class RowsIterator {
5151 next ( ) : object
52+ [ Symbol . iterator ] ( ) : this
5253}
Original file line number Diff line number Diff line change @@ -263,7 +263,9 @@ class Statement {
263263 */
264264 iterate ( ...bindParameters ) {
265265 try {
266- return this . stmt . iterate ( ...bindParameters ) ;
266+ const it = this . stmt . iterate ( ...bindParameters ) ;
267+ it [ Symbol . iterator ] = function ( ) { return this ; } ;
268+ return it ;
267269 } catch ( err ) {
268270 throw convertError ( err ) ;
269271 }
Original file line number Diff line number Diff line change @@ -811,7 +811,7 @@ impl RowsIterator {
811811 }
812812 Ok ( result)
813813 } )
814- }
814+ }
815815}
816816
817817fn runtime ( ) -> Result < & ' static Runtime > {
Original file line number Diff line number Diff line change @@ -263,7 +263,9 @@ class Statement {
263263 */
264264 iterate ( ...bindParameters ) {
265265 try {
266- return this . stmt . iterateSync ( ...bindParameters ) ;
266+ const it = this . stmt . iterateSync ( ...bindParameters ) ;
267+ it [ Symbol . iterator ] = function ( ) { return this ; } ;
268+ return it ;
267269 } catch ( err ) {
268270 throw convertError ( err ) ;
269271 }
You can’t perform that action at this time.
0 commit comments