@rocicorp/zero-sqlite3 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rocicorp/zero-sqlite3",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "better-sqlite3 on bedrock",
5
5
  "homepage": "https://github.com/rocicorp/zero-sqlite3",
6
6
  "author": "Rocicorp",
@@ -416,12 +416,22 @@ NODE_METHOD(Statement::JS_scanStatusV2) {
416
416
  }
417
417
  return;
418
418
  }
419
+ case SQLITE_SCANSTAT_SELECTID:
420
+ case SQLITE_SCANSTAT_PARENTID: {
421
+ // Integer opcodes (int)
422
+ int pOut;
423
+ rc = sqlite3_stmt_scanstatus_v2(stmt->handle, idx, opcode, flags, (void*)&pOut);
424
+ if (rc == SQLITE_OK) {
425
+ info.GetReturnValue().Set(v8::Number::New(isolate, (double)pOut));
426
+ } else {
427
+ info.GetReturnValue().Set(v8::Undefined(isolate));
428
+ }
429
+ return;
430
+ }
419
431
  case SQLITE_SCANSTAT_NLOOP:
420
432
  case SQLITE_SCANSTAT_NVISIT:
421
- case SQLITE_SCANSTAT_SELECTID:
422
- case SQLITE_SCANSTAT_PARENTID:
423
433
  case SQLITE_SCANSTAT_NCYCLE: {
424
- // Integer opcodes
434
+ // Integer opcodes (int64)
425
435
  sqlite3_int64 pOut;
426
436
  rc = sqlite3_stmt_scanstatus_v2(stmt->handle, idx, opcode, flags, (void*)&pOut);
427
437
  if (rc == SQLITE_OK) {