File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 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');
33
44emitExperimentalWarning ( 'SQLite' ) ;
55module . 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) {
539539 v8::External::New (isolate, captureContext)
540540 );
541541
542- iterableIteratorTemplate->Set (String::NewFromUtf8Literal (isolate, " next" ), nextFuncTemplate);
542+ iterableIteratorTemplate->Set (
543+ String::NewFromUtf8Literal (isolate, " next" ),
544+ nextFuncTemplate
545+ );
543546
544547 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-
548548 args.GetReturnValue ().Set (iterableIterator);
549549}
550550
You can’t perform that action at this time.
0 commit comments