File tree 2 files changed +9
-4
lines changed
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -3,3 +3,8 @@ const { emitExperimentalWarning } = require('internal/util');
3
3
4
4
emitExperimentalWarning ( 'SQLite' ) ;
5
5
module . exports = internalBinding ( 'sqlite' ) ;
6
+
7
+ const statementIterate = module . exports . StatementSync . prototype . iterate ;
8
+ module . exports . StatementSync . prototype . iterate = function iterate ( ) {
9
+ return Iterator . from ( statementIterate . apply ( this , arguments ) ) ;
10
+ }
Original file line number Diff line number Diff line change @@ -539,12 +539,12 @@ void StatementSync::Iterate(const FunctionCallbackInfo<Value>& args) {
539
539
v8::External::New (isolate, captureContext)
540
540
);
541
541
542
- iterableIteratorTemplate->Set (String::NewFromUtf8Literal (isolate, " next" ), nextFuncTemplate);
542
+ iterableIteratorTemplate->Set (
543
+ String::NewFromUtf8Literal (isolate, " next" ),
544
+ nextFuncTemplate
545
+ );
543
546
544
547
auto iterableIterator = iterableIteratorTemplate->NewInstance (context).ToLocalChecked ();
545
- auto JSIteratorPrototype = context->Global ()->Get (context, String::NewFromUtf8Literal (isolate, " Iterator.prototype" )).ToLocalChecked ();
546
- iterableIterator->SetPrototype (context, JSIteratorPrototype).Check ();
547
-
548
548
args.GetReturnValue ().Set (iterableIterator);
549
549
}
550
550
You can’t perform that action at this time.
0 commit comments