expo-sqlite 58.0.15 → 58.0.16

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/android/build.gradle +2 -2
  3. package/build/hooks.js +22 -7
  4. package/build/hooks.js.map +1 -1
  5. package/dev-plugin-dist/+not-found.html +2 -2
  6. package/dev-plugin-dist/_expo/static/js/web/{__common-6733f4ee4e23ce5a7ba5e6796ae5614d.js → __common-a91396a33c562b43d2b77a6ffc575fb7.js} +49 -49
  7. package/dev-plugin-dist/_expo/static/js/web/{_layout-5200f4e84fc03b29bbb20d34ba8d7af2.js → _layout-acb144d1f99a64d1785af7527d659b2a.js} +24 -24
  8. package/dev-plugin-dist/_expo/static/js/web/{entry-18a29c742435a2074dd9b61e19740e04.js → entry-e3975197f566bcbd43c64e4d22104a7f.js} +772 -769
  9. package/dev-plugin-dist/_expo/static/js/web/{index-5e02eb7e4ad474fb18a1e55732957463.js → index-aa7dfdd0fcc30054b3c079a77a18453e.js} +1740 -1740
  10. package/dev-plugin-dist/_expo/static/js/web/{worker-5cb95aace694a129b742d45a71b9c588.js → worker-7964ea010c5e0bbcae7a3c69aa585a51.js} +17 -17
  11. package/dev-plugin-dist/_sitemap.html +2 -2
  12. package/dev-plugin-dist/index.html +2 -2
  13. package/ios/Benchmarks/Benchmarks.swift +5 -5
  14. package/ios/Benchmarks/JavaScriptBenchmarks.swift +59 -64
  15. package/ios/Benchmarks/StatementBenchmarks.swift +14 -21
  16. package/ios/ExpoSQLite.podspec +1 -0
  17. package/ios/Tests/OpenDatabaseOptionsTests.swift +22 -13
  18. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/{58.0.15/expo.modules.sqlite-58.0.15.aar → 58.0.16/expo.modules.sqlite-58.0.16.aar} +0 -0
  19. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.aar.md5 +1 -0
  20. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.aar.sha1 +1 -0
  21. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.aar.sha256 +1 -0
  22. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.aar.sha512 +1 -0
  23. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/{58.0.15/expo.modules.sqlite-58.0.15.module → 58.0.16/expo.modules.sqlite-58.0.16.module} +17 -17
  24. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.module.md5 +1 -0
  25. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.module.sha1 +1 -0
  26. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.module.sha256 +1 -0
  27. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.module.sha512 +1 -0
  28. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/{58.0.15/expo.modules.sqlite-58.0.15.pom → 58.0.16/expo.modules.sqlite-58.0.16.pom} +1 -1
  29. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.pom.md5 +1 -0
  30. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.pom.sha1 +1 -0
  31. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.pom.sha256 +1 -0
  32. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.16/expo.modules.sqlite-58.0.16.pom.sha512 +1 -0
  33. package/package.json +5 -4
  34. package/src/hooks.tsx +31 -7
  35. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.15/expo.modules.sqlite-58.0.15.aar.md5 +0 -1
  36. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.15/expo.modules.sqlite-58.0.15.aar.sha1 +0 -1
  37. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.15/expo.modules.sqlite-58.0.15.aar.sha256 +0 -1
  38. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.15/expo.modules.sqlite-58.0.15.aar.sha512 +0 -1
  39. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.15/expo.modules.sqlite-58.0.15.module.md5 +0 -1
  40. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.15/expo.modules.sqlite-58.0.15.module.sha1 +0 -1
  41. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.15/expo.modules.sqlite-58.0.15.module.sha256 +0 -1
  42. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.15/expo.modules.sqlite-58.0.15.module.sha512 +0 -1
  43. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.15/expo.modules.sqlite-58.0.15.pom.md5 +0 -1
  44. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.15/expo.modules.sqlite-58.0.15.pom.sha1 +0 -1
  45. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.15/expo.modules.sqlite-58.0.15.pom.sha256 +0 -1
  46. package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/58.0.15/expo.modules.sqlite-58.0.15.pom.sha512 +0 -1
  47. /package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/{58.0.15/expo.modules.sqlite-58.0.15-sources.jar → 58.0.16/expo.modules.sqlite-58.0.16-sources.jar} +0 -0
  48. /package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/{58.0.15/expo.modules.sqlite-58.0.15-sources.jar.md5 → 58.0.16/expo.modules.sqlite-58.0.16-sources.jar.md5} +0 -0
  49. /package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/{58.0.15/expo.modules.sqlite-58.0.15-sources.jar.sha1 → 58.0.16/expo.modules.sqlite-58.0.16-sources.jar.sha1} +0 -0
  50. /package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/{58.0.15/expo.modules.sqlite-58.0.15-sources.jar.sha256 → 58.0.16/expo.modules.sqlite-58.0.16-sources.jar.sha256} +0 -0
  51. /package/local-maven-repo/host/exp/exponent/expo.modules.sqlite/{58.0.15/expo.modules.sqlite-58.0.15-sources.jar.sha512 → 58.0.16/expo.modules.sqlite-58.0.16-sources.jar.sha512} +0 -0
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/css/global-b1bdf830cdbd0ec4238cc5f230f99460.css" as="style"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/__expo-metro-runtime-8c088df87a31e4e6accd81c554ec290d.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/_layout-5200f4e84fc03b29bbb20d34ba8d7af2.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/__common-6733f4ee4e23ce5a7ba5e6796ae5614d.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/entry-18a29c742435a2074dd9b61e19740e04.js" as="script"/><style id="expo-reset">#root,body,html{height:100%}body{overflow:hidden}#root{display:flex}</style><style id="react-native-stylesheet">[stylesheet-group="0"]{}
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/css/global-b1bdf830cdbd0ec4238cc5f230f99460.css" as="style"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/__expo-metro-runtime-8c088df87a31e4e6accd81c554ec290d.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/_layout-acb144d1f99a64d1785af7527d659b2a.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/__common-a91396a33c562b43d2b77a6ffc575fb7.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/entry-e3975197f566bcbd43c64e4d22104a7f.js" as="script"/><style id="expo-reset">#root,body,html{height:100%}body{overflow:hidden}#root{display:flex}</style><style id="react-native-stylesheet">[stylesheet-group="0"]{}
2
2
  body{margin:0;}
3
3
  button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
4
4
  html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}
@@ -313,4 +313,4 @@ input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-web
313
313
  @keyframes r-1pzkwqh{0%{transform:translateY(100%);}100%{transform:translateY(0%);}}
314
314
  @keyframes r-imtty0{0%{opacity:0;}100%{opacity:1;}}
315
315
  @keyframes r-q67da2{0%{transform:translateX(-100%);}100%{transform:translateX(400%);}}
316
- @keyframes r-t2lo5v{0%{opacity:1;}100%{opacity:0;}}</style><link rel="stylesheet" href="/_expo/plugins/expo-sqlite/_expo/static/css/global-b1bdf830cdbd0ec4238cc5f230f99460.css"/></head><body><div id="root"><!--$--><div class="css-g5y9jx r-13awgt0"></div><!--/$--></div><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/__expo-metro-runtime-8c088df87a31e4e6accd81c554ec290d.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/_layout-5200f4e84fc03b29bbb20d34ba8d7af2.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/__common-6733f4ee4e23ce5a7ba5e6796ae5614d.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/entry-18a29c742435a2074dd9b61e19740e04.js"></script><script id="_R_">globalThis.__EXPO_ROUTER_HYDRATE__=true;</script></body></html>
316
+ @keyframes r-t2lo5v{0%{opacity:1;}100%{opacity:0;}}</style><link rel="stylesheet" href="/_expo/plugins/expo-sqlite/_expo/static/css/global-b1bdf830cdbd0ec4238cc5f230f99460.css"/></head><body><div id="root"><!--$--><div class="css-g5y9jx r-13awgt0"></div><!--/$--></div><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/__expo-metro-runtime-8c088df87a31e4e6accd81c554ec290d.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/_layout-acb144d1f99a64d1785af7527d659b2a.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/__common-a91396a33c562b43d2b77a6ffc575fb7.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/entry-e3975197f566bcbd43c64e4d22104a7f.js"></script><script id="_R_">globalThis.__EXPO_ROUTER_HYDRATE__=true;</script></body></html>
@@ -1,4 +1,4 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/css/global-b1bdf830cdbd0ec4238cc5f230f99460.css" as="style"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/__expo-metro-runtime-8c088df87a31e4e6accd81c554ec290d.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/_layout-5200f4e84fc03b29bbb20d34ba8d7af2.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/index-5e02eb7e4ad474fb18a1e55732957463.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/__common-6733f4ee4e23ce5a7ba5e6796ae5614d.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/entry-18a29c742435a2074dd9b61e19740e04.js" as="script"/><style id="expo-reset">#root,body,html{height:100%}body{overflow:hidden}#root{display:flex}</style><style id="react-native-stylesheet">[stylesheet-group="0"]{}
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/css/global-b1bdf830cdbd0ec4238cc5f230f99460.css" as="style"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/__expo-metro-runtime-8c088df87a31e4e6accd81c554ec290d.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/_layout-acb144d1f99a64d1785af7527d659b2a.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/index-aa7dfdd0fcc30054b3c079a77a18453e.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/__common-a91396a33c562b43d2b77a6ffc575fb7.js" as="script"/><link rel="preload" href="/_expo/plugins/expo-sqlite/_expo/static/js/web/entry-e3975197f566bcbd43c64e4d22104a7f.js" as="script"/><style id="expo-reset">#root,body,html{height:100%}body{overflow:hidden}#root{display:flex}</style><style id="react-native-stylesheet">[stylesheet-group="0"]{}
2
2
  body{margin:0;}
3
3
  button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}
4
4
  html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(0,0,0,0);}
@@ -313,4 +313,4 @@ input::-webkit-search-cancel-button,input::-webkit-search-decoration,input::-web
313
313
  @keyframes r-1pzkwqh{0%{transform:translateY(100%);}100%{transform:translateY(0%);}}
314
314
  @keyframes r-imtty0{0%{opacity:0;}100%{opacity:1;}}
315
315
  @keyframes r-q67da2{0%{transform:translateX(-100%);}100%{transform:translateX(400%);}}
316
- @keyframes r-t2lo5v{0%{opacity:1;}100%{opacity:0;}}</style><link rel="stylesheet" href="/_expo/plugins/expo-sqlite/_expo/static/css/global-b1bdf830cdbd0ec4238cc5f230f99460.css"/></head><body><div id="root"><!--$--><div class="css-g5y9jx r-13awgt0"><!--$--><!--$--><div class="flex min-h-screen items-center justify-center bg-linear-to-br from-slate-50 to-slate-100 p-4"><div class="rounded-xl border bg-card text-card-foreground shadow w-full max-w-2xl"><div class="flex flex-col space-y-1.5 p-6 text-center"><div class="font-semibold tracking-tight text-3xl">SQLite Database Inspector</div><div class="text-muted-foreground text-base">Upload a database file or connect to your app</div></div><div class="p-6 pt-0"><div dir="ltr" data-orientation="horizontal" class="w-full"><div role="tablist" aria-orientation="horizontal" class="h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground grid w-full grid-cols-2" tabindex="-1" data-orientation="horizontal" style="outline:none"><button type="button" role="tab" aria-selected="true" aria-controls="radix-_R_jepm_-content-devtools" data-state="active" data-disabled="" disabled="" id="radix-_R_jepm_-trigger-devtools" class="inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow" tabindex="-1" data-orientation="horizontal" data-radix-collection-item="">From App </button><button type="button" role="tab" aria-selected="false" aria-controls="radix-_R_jepm_-content-upload" data-state="inactive" id="radix-_R_jepm_-trigger-upload" class="inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow" tabindex="-1" data-orientation="horizontal" data-radix-collection-item="">Upload File</button></div><div data-state="inactive" data-orientation="horizontal" role="tabpanel" aria-labelledby="radix-_R_jepm_-trigger-upload" hidden="" id="radix-_R_jepm_-content-upload" tabindex="0" class="mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"></div><div data-state="active" data-orientation="horizontal" role="tabpanel" aria-labelledby="radix-_R_jepm_-trigger-devtools" id="radix-_R_jepm_-content-devtools" tabindex="0" class="mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" style="animation-duration:0s"><div class="space-y-4"><div class="flex items-center justify-between"><h3 class="text-sm font-medium">Available Databases</h3><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-8 rounded-md px-3 text-xs"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw h-4 w-4 mr-2" aria-hidden="true"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></svg>Refresh</button></div><div class="text-center p-12 rounded-lg border-2 border-dashed border-muted-foreground/25"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-database h-12 w-12 text-muted-foreground mx-auto mb-4" aria-hidden="true"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M3 5V19A9 3 0 0 0 21 19V5"></path><path d="M3 12A9 3 0 0 0 21 12"></path></svg><p class="text-sm text-muted-foreground">No databases found. Make sure your app is using useSQLiteDevTool.</p></div></div></div></div></div></div></div><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><!--/$--><!--/$--></div><!--/$--></div><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/__expo-metro-runtime-8c088df87a31e4e6accd81c554ec290d.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/_layout-5200f4e84fc03b29bbb20d34ba8d7af2.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/index-5e02eb7e4ad474fb18a1e55732957463.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/__common-6733f4ee4e23ce5a7ba5e6796ae5614d.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/entry-18a29c742435a2074dd9b61e19740e04.js"></script><script id="_R_">globalThis.__EXPO_ROUTER_HYDRATE__=true;</script></body></html>
316
+ @keyframes r-t2lo5v{0%{opacity:1;}100%{opacity:0;}}</style><link rel="stylesheet" href="/_expo/plugins/expo-sqlite/_expo/static/css/global-b1bdf830cdbd0ec4238cc5f230f99460.css"/></head><body><div id="root"><!--$--><div class="css-g5y9jx r-13awgt0"><!--$--><!--$--><div class="flex min-h-screen items-center justify-center bg-linear-to-br from-slate-50 to-slate-100 p-4"><div class="rounded-xl border bg-card text-card-foreground shadow w-full max-w-2xl"><div class="flex flex-col space-y-1.5 p-6 text-center"><div class="font-semibold tracking-tight text-3xl">SQLite Database Inspector</div><div class="text-muted-foreground text-base">Upload a database file or connect to your app</div></div><div class="p-6 pt-0"><div dir="ltr" data-orientation="horizontal" class="w-full"><div role="tablist" aria-orientation="horizontal" class="h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground grid w-full grid-cols-2" tabindex="-1" data-orientation="horizontal" style="outline:none"><button type="button" role="tab" aria-selected="true" aria-controls="radix-_R_jepm_-content-devtools" data-state="active" data-disabled="" disabled="" id="radix-_R_jepm_-trigger-devtools" class="inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow" tabindex="-1" data-orientation="horizontal" data-radix-collection-item="">From App </button><button type="button" role="tab" aria-selected="false" aria-controls="radix-_R_jepm_-content-upload" data-state="inactive" id="radix-_R_jepm_-trigger-upload" class="inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow" tabindex="-1" data-orientation="horizontal" data-radix-collection-item="">Upload File</button></div><div data-state="inactive" data-orientation="horizontal" role="tabpanel" aria-labelledby="radix-_R_jepm_-trigger-upload" hidden="" id="radix-_R_jepm_-content-upload" tabindex="0" class="mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"></div><div data-state="active" data-orientation="horizontal" role="tabpanel" aria-labelledby="radix-_R_jepm_-trigger-devtools" id="radix-_R_jepm_-content-devtools" tabindex="0" class="mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" style="animation-duration:0s"><div class="space-y-4"><div class="flex items-center justify-between"><h3 class="text-sm font-medium">Available Databases</h3><button class="inline-flex items-center justify-center gap-2 whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&amp;_svg]:pointer-events-none [&amp;_svg]:size-4 [&amp;_svg]:shrink-0 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-8 rounded-md px-3 text-xs"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw h-4 w-4 mr-2" aria-hidden="true"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path><path d="M21 3v5h-5"></path><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path><path d="M8 16H3v5"></path></svg>Refresh</button></div><div class="text-center p-12 rounded-lg border-2 border-dashed border-muted-foreground/25"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-database h-12 w-12 text-muted-foreground mx-auto mb-4" aria-hidden="true"><ellipse cx="12" cy="5" rx="9" ry="3"></ellipse><path d="M3 5V19A9 3 0 0 0 21 19V5"></path><path d="M3 12A9 3 0 0 0 21 12"></path></svg><p class="text-sm text-muted-foreground">No databases found. Make sure your app is using useSQLiteDevTool.</p></div></div></div></div></div></div></div><section aria-label="Notifications alt+T" tabindex="-1" aria-live="polite" aria-relevant="additions text" aria-atomic="false"></section><!--/$--><!--/$--></div><!--/$--></div><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/__expo-metro-runtime-8c088df87a31e4e6accd81c554ec290d.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/_layout-acb144d1f99a64d1785af7527d659b2a.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/index-aa7dfdd0fcc30054b3c079a77a18453e.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/__common-a91396a33c562b43d2b77a6ffc575fb7.js"></script><script defer="" src="/_expo/plugins/expo-sqlite/_expo/static/js/web/entry-e3975197f566bcbd43c64e4d22104a7f.js"></script><script id="_R_">globalThis.__EXPO_ROUTER_HYDRATE__=true;</script></body></html>
@@ -21,11 +21,11 @@ struct Benchmarks {}
21
21
 
22
22
  /// Runs one case with a fresh app context whose runtime has the `ExpoSQLite` module installed, so
23
23
  /// JavaScript drivers reach it as `expo.modules.ExpoSQLite`.
24
- func sqliteBenchmarkCase(_ body: @escaping @JavaScriptActor (AppContext) throws -> Void) async throws {
25
- try await benchmarkCase {
26
- let appContext = AppContext.create()
27
- appContext.moduleRegistry.register(module: SQLiteModule(appContext: appContext), name: nil)
28
- try body(appContext)
24
+ func sqliteBenchmarkCase(_ body: @escaping @JavaScriptActor (JavaScriptRuntime) throws -> Void) async throws {
25
+ try await moduleBenchmarkCase { appContext in
26
+ return SQLiteModule(appContext: appContext)
27
+ } _: { _, runtime in
28
+ try body(runtime)
29
29
  }
30
30
  }
31
31
 
@@ -15,10 +15,9 @@ import Testing
15
15
  /// for an app. Read every result against `JS: empty driver loop`.
16
16
  extension Benchmarks {
17
17
  /// Evaluates the setup script: opens a seeded in-memory database as the global `db` and exposes the
18
- /// statement class as `NativeStatement`, then returns the runtime for the drivers.
18
+ /// statement class as `NativeStatement`.
19
19
  @JavaScriptActor
20
- private func prepareRuntime(_ appContext: AppContext) throws -> JavaScriptRuntime {
21
- let runtime = try appContext.runtime
20
+ private func prepareDatabase(_ runtime: JavaScriptRuntime) throws {
22
21
  _ = try runtime.eval(
23
22
  """
24
23
  var NativeStatement = expo.modules.ExpoSQLite.NativeStatement;
@@ -30,36 +29,29 @@ extension Benchmarks {
30
29
  _ = try runtime.eval("(function (schema) { db.execSync(schema); })")
31
30
  .asFunction()
32
31
  .call(arguments: BenchmarkSchema.setup())
33
- return runtime
34
- }
35
-
36
- /// A driver that runs `body` `n` times; `body` sees `db`, `NativeStatement` and the loop index `i`.
37
- @JavaScriptActor
38
- private func driver(_ runtime: JavaScriptRuntime, _ body: String) throws -> JavaScriptFunction {
39
- return try runtime.eval("(function(n) { for (var i = 0; i < n; i++) { \(body) } })").getFunction()
40
32
  }
41
33
 
42
34
  /// The native calls behind `SQLiteDatabase.getAllSync(source)`.
43
35
  @JavaScriptActor
44
36
  private func getAllDriver(_ runtime: JavaScriptRuntime, source: String) throws -> JavaScriptFunction {
45
- return try driver(
37
+ return try javaScriptDriver(
46
38
  runtime,
47
- """
48
- var stmt = new NativeStatement();
49
- db.prepareSync(stmt, '\(source)');
50
- stmt.runSync(db, {}, {}, true);
51
- stmt.getColumnNamesSync();
52
- stmt.getAllSync(db);
53
- stmt.finalizeSync(db);
54
- """
39
+ body: """
40
+ var stmt = new NativeStatement();
41
+ db.prepareSync(stmt, '\(source)');
42
+ stmt.runSync(db, {}, {}, true);
43
+ stmt.getColumnNamesSync();
44
+ stmt.getAllSync(db);
45
+ stmt.finalizeSync(db);
46
+ """
55
47
  )
56
48
  }
57
49
 
58
50
  @Test
59
51
  func `JS: empty driver loop`() async throws {
60
- try await sqliteBenchmarkCase { appContext in
61
- let runtime = try prepareRuntime(appContext)
62
- let run = try driver(runtime, "")
52
+ try await sqliteBenchmarkCase { runtime in
53
+ try prepareDatabase(runtime)
54
+ let run = try javaScriptDriver(runtime, body: "")
63
55
  try benchmark("JS: empty driver loop", runtime: runtime) { iterations in
64
56
  _ = try run.call(arguments: iterations)
65
57
  }
@@ -68,9 +60,9 @@ extension Benchmarks {
68
60
 
69
61
  @Test
70
62
  func `JS: exec a trivial statement`() async throws {
71
- try await sqliteBenchmarkCase { appContext in
72
- let runtime = try prepareRuntime(appContext)
73
- let run = try driver(runtime, "db.execSync('SELECT 1');")
63
+ try await sqliteBenchmarkCase { runtime in
64
+ try prepareDatabase(runtime)
65
+ let run = try javaScriptDriver(runtime, body: "db.execSync('SELECT 1');")
74
66
  try benchmark("JS: execSync('SELECT 1')", runtime: runtime) { iterations in
75
67
  _ = try run.call(arguments: iterations)
76
68
  }
@@ -79,9 +71,9 @@ extension Benchmarks {
79
71
 
80
72
  @Test
81
73
  func `JS: construct a statement`() async throws {
82
- try await sqliteBenchmarkCase { appContext in
83
- let runtime = try prepareRuntime(appContext)
84
- let run = try driver(runtime, "new NativeStatement();")
74
+ try await sqliteBenchmarkCase { runtime in
75
+ try prepareDatabase(runtime)
76
+ let run = try javaScriptDriver(runtime, body: "new NativeStatement();")
85
77
  try benchmark("JS: new NativeStatement()", runtime: runtime) { iterations in
86
78
  _ = try run.call(arguments: iterations)
87
79
  }
@@ -90,8 +82,8 @@ extension Benchmarks {
90
82
 
91
83
  @Test
92
84
  func `JS: getAll one row`() async throws {
93
- try await sqliteBenchmarkCase { appContext in
94
- let runtime = try prepareRuntime(appContext)
85
+ try await sqliteBenchmarkCase { runtime in
86
+ try prepareDatabase(runtime)
95
87
  let run = try getAllDriver(runtime, source: "SELECT \(BenchmarkSchema.selectColumns) FROM t WHERE id = 1")
96
88
  try benchmark("JS: getAllSync 1 row (prepare, run, columns, getAll, finalize)", runtime: runtime) {
97
89
  iterations in
@@ -102,8 +94,8 @@ extension Benchmarks {
102
94
 
103
95
  @Test
104
96
  func `JS: getAll 100 rows`() async throws {
105
- try await sqliteBenchmarkCase { appContext in
106
- let runtime = try prepareRuntime(appContext)
97
+ try await sqliteBenchmarkCase { runtime in
98
+ try prepareDatabase(runtime)
107
99
  let run = try getAllDriver(runtime, source: "SELECT \(BenchmarkSchema.selectColumns) FROM t WHERE id <= 100")
108
100
  try benchmark("JS: getAllSync 100 rows", runtime: runtime) { iterations in
109
101
  _ = try run.call(arguments: iterations)
@@ -113,8 +105,8 @@ extension Benchmarks {
113
105
 
114
106
  @Test
115
107
  func `JS: getAll 10k rows`() async throws {
116
- try await sqliteBenchmarkCase { appContext in
117
- let runtime = try prepareRuntime(appContext)
108
+ try await sqliteBenchmarkCase { runtime in
109
+ try prepareDatabase(runtime)
118
110
  let run = try getAllDriver(runtime, source: "SELECT \(BenchmarkSchema.selectColumns) FROM t")
119
111
  try benchmark("JS: getAllSync 10k rows", runtime: runtime, samples: 5) { iterations in
120
112
  _ = try run.call(arguments: iterations)
@@ -124,8 +116,8 @@ extension Benchmarks {
124
116
 
125
117
  @Test
126
118
  func `JS: getAll 100 rows with a 1 KiB blob column`() async throws {
127
- try await sqliteBenchmarkCase { appContext in
128
- let runtime = try prepareRuntime(appContext)
119
+ try await sqliteBenchmarkCase { runtime in
120
+ try prepareDatabase(runtime)
129
121
  let run = try getAllDriver(runtime, source: "SELECT id, data FROM blobs")
130
122
  try benchmark("JS: getAllSync 100 rows with 1 KiB blob", runtime: runtime) { iterations in
131
123
  _ = try run.call(arguments: iterations)
@@ -136,21 +128,21 @@ extension Benchmarks {
136
128
  /// `SQLiteStatement.executeSync(...).getAllSync()` on a statement prepared once.
137
129
  @Test
138
130
  func `JS: reuse a prepared statement`() async throws {
139
- try await sqliteBenchmarkCase { appContext in
140
- let runtime = try prepareRuntime(appContext)
131
+ try await sqliteBenchmarkCase { runtime in
132
+ try prepareDatabase(runtime)
141
133
  _ = try runtime.eval(
142
134
  """
143
135
  var prepared = new NativeStatement();
144
136
  db.prepareSync(prepared, 'SELECT \(BenchmarkSchema.selectColumns) FROM t WHERE id > ? LIMIT 100');
145
137
  """
146
138
  )
147
- let run = try driver(
139
+ let run = try javaScriptDriver(
148
140
  runtime,
149
- """
150
- prepared.runSync(db, { 0: i % 9000 }, {}, true);
151
- prepared.getColumnNamesSync();
152
- prepared.getAllSync(db);
153
- """
141
+ body: """
142
+ prepared.runSync(db, { 0: i % 9000 }, {}, true);
143
+ prepared.getColumnNamesSync();
144
+ prepared.getAllSync(db);
145
+ """
154
146
  )
155
147
  try benchmark("JS: prepared statement reuse, 100 rows", runtime: runtime) { iterations in
156
148
  _ = try run.call(arguments: iterations)
@@ -162,15 +154,18 @@ extension Benchmarks {
162
154
  /// number isolates parameter binding and the run result.
163
155
  @Test
164
156
  func `JS: insert with array parameters`() async throws {
165
- try await sqliteBenchmarkCase { appContext in
166
- let runtime = try prepareRuntime(appContext)
157
+ try await sqliteBenchmarkCase { runtime in
158
+ try prepareDatabase(runtime)
167
159
  _ = try runtime.eval(
168
160
  """
169
161
  var insert = new NativeStatement();
170
162
  db.prepareSync(insert, 'INSERT INTO t (int_value, real_value, text_value, null_value) VALUES (?, ?, ?, ?)');
171
163
  """
172
164
  )
173
- let run = try driver(runtime, "insert.runSync(db, { 0: i, 1: 1.5, 2: 'row', 3: null }, {}, true);")
165
+ let run = try javaScriptDriver(
166
+ runtime,
167
+ body: "insert.runSync(db, { 0: i, 1: 1.5, 2: 'row', 3: null }, {}, true);"
168
+ )
174
169
  try benchmark("JS: runSync insert with 4 array parameters", runtime: runtime) { iterations in
175
170
  _ = try run.call(arguments: iterations)
176
171
  }
@@ -181,17 +176,17 @@ extension Benchmarks {
181
176
  /// `sqlite3_bind_parameter_index` instead of the array position.
182
177
  @Test
183
178
  func `JS: insert with named parameters`() async throws {
184
- try await sqliteBenchmarkCase { appContext in
185
- let runtime = try prepareRuntime(appContext)
179
+ try await sqliteBenchmarkCase { runtime in
180
+ try prepareDatabase(runtime)
186
181
  _ = try runtime.eval(
187
182
  """
188
183
  var insert = new NativeStatement();
189
184
  db.prepareSync(insert, 'INSERT INTO t (int_value, real_value, text_value, null_value) VALUES ($i, $r, $t, $n)');
190
185
  """
191
186
  )
192
- let run = try driver(
187
+ let run = try javaScriptDriver(
193
188
  runtime,
194
- "insert.runSync(db, { $i: i, $r: 1.5, $t: 'row', $n: null }, {}, false);"
189
+ body: "insert.runSync(db, { $i: i, $r: 1.5, $t: 'row', $n: null }, {}, false);"
195
190
  )
196
191
  try benchmark("JS: runSync insert with 4 named parameters", runtime: runtime) { iterations in
197
192
  _ = try run.call(arguments: iterations)
@@ -202,8 +197,8 @@ extension Benchmarks {
202
197
  /// `SQLiteDatabase.runSync(source, [blob])`: the blob goes through the separate blob parameters.
203
198
  @Test
204
199
  func `JS: insert with a blob parameter`() async throws {
205
- try await sqliteBenchmarkCase { appContext in
206
- let runtime = try prepareRuntime(appContext)
200
+ try await sqliteBenchmarkCase { runtime in
201
+ try prepareDatabase(runtime)
207
202
  _ = try runtime.eval(
208
203
  """
209
204
  var insert = new NativeStatement();
@@ -211,7 +206,7 @@ extension Benchmarks {
211
206
  var blob = new Uint8Array(1024);
212
207
  """
213
208
  )
214
- let run = try driver(runtime, "insert.runSync(db, {}, { 0: blob }, true);")
209
+ let run = try javaScriptDriver(runtime, body: "insert.runSync(db, {}, { 0: blob }, true);")
215
210
  try benchmark("JS: runSync insert with a 1 KiB blob parameter", runtime: runtime) { iterations in
216
211
  _ = try run.call(arguments: iterations)
217
212
  }
@@ -221,20 +216,20 @@ extension Benchmarks {
221
216
  /// `SQLiteStatement.executeSync(...)` iterated row by row: one native call per row.
222
217
  @Test
223
218
  func `JS: step through 100 rows`() async throws {
224
- try await sqliteBenchmarkCase { appContext in
225
- let runtime = try prepareRuntime(appContext)
219
+ try await sqliteBenchmarkCase { runtime in
220
+ try prepareDatabase(runtime)
226
221
  _ = try runtime.eval(
227
222
  """
228
223
  var cursor = new NativeStatement();
229
224
  db.prepareSync(cursor, 'SELECT \(BenchmarkSchema.selectColumns) FROM t WHERE id <= 100');
230
225
  """
231
226
  )
232
- let run = try driver(
227
+ let run = try javaScriptDriver(
233
228
  runtime,
234
- """
235
- cursor.resetSync(db);
236
- while (cursor.stepSync(db) != null) {}
237
- """
229
+ body: """
230
+ cursor.resetSync(db);
231
+ while (cursor.stepSync(db) != null) {}
232
+ """
238
233
  )
239
234
  try benchmark("JS: stepSync through 100 rows", runtime: runtime) { iterations in
240
235
  _ = try run.call(arguments: iterations)
@@ -244,15 +239,15 @@ extension Benchmarks {
244
239
 
245
240
  @Test
246
241
  func `JS: column names of a prepared statement`() async throws {
247
- try await sqliteBenchmarkCase { appContext in
248
- let runtime = try prepareRuntime(appContext)
242
+ try await sqliteBenchmarkCase { runtime in
243
+ try prepareDatabase(runtime)
249
244
  _ = try runtime.eval(
250
245
  """
251
246
  var columns = new NativeStatement();
252
247
  db.prepareSync(columns, 'SELECT \(BenchmarkSchema.selectColumns) FROM t');
253
248
  """
254
249
  )
255
- let run = try driver(runtime, "columns.getColumnNamesSync();")
250
+ let run = try javaScriptDriver(runtime, body: "columns.getColumnNamesSync();")
256
251
  try benchmark("JS: getColumnNamesSync (5 columns)", runtime: runtime) { iterations in
257
252
  _ = try run.call(arguments: iterations)
258
253
  }
@@ -49,11 +49,10 @@ extension Benchmarks {
49
49
 
50
50
  @Test
51
51
  func `raw C: select one row by id`() async throws {
52
- try await sqliteBenchmarkCase { appContext in
52
+ try await benchmarkCase {
53
53
  let database = try openDatabase()
54
- let runtime = try appContext.runtime
55
54
  let statement = try prepare("SELECT \(BenchmarkSchema.selectColumns) FROM t WHERE id = ?", in: database)
56
- benchmark("raw C: select 1 row by id", runtime: runtime) { iterations in
55
+ benchmark("raw C: select 1 row by id", runtime: nil) { iterations in
57
56
  for i in 0..<iterations {
58
57
  exsqlite3_bind_int64(statement, 1, Int64(i % BenchmarkSchema.rowCount) + 1)
59
58
  _ = exsqlite3_step(statement)
@@ -68,11 +67,10 @@ extension Benchmarks {
68
67
 
69
68
  @Test
70
69
  func `raw C: select 100 rows`() async throws {
71
- try await sqliteBenchmarkCase { appContext in
70
+ try await benchmarkCase {
72
71
  let database = try openDatabase()
73
- let runtime = try appContext.runtime
74
72
  let statement = try prepare("SELECT \(BenchmarkSchema.selectColumns) FROM t WHERE id <= 100", in: database)
75
- benchmark("raw C: select 100 rows, read every cell", runtime: runtime) { iterations in
73
+ benchmark("raw C: select 100 rows, read every cell", runtime: nil) { iterations in
76
74
  for _ in 0..<iterations {
77
75
  while exsqlite3_step(statement) == SQLITE_ROW {
78
76
  readRow(statement)
@@ -87,14 +85,13 @@ extension Benchmarks {
87
85
 
88
86
  @Test
89
87
  func `raw C: insert with bound parameters`() async throws {
90
- try await sqliteBenchmarkCase { appContext in
88
+ try await benchmarkCase {
91
89
  let database = try openDatabase()
92
- let runtime = try appContext.runtime
93
90
  let statement = try prepare(
94
91
  "INSERT INTO t (int_value, real_value, text_value, null_value) VALUES (?, ?, ?, ?)",
95
92
  in: database
96
93
  )
97
- benchmark("raw C: insert with 4 bound parameters", runtime: runtime) { iterations in
94
+ benchmark("raw C: insert with 4 bound parameters", runtime: nil) { iterations in
98
95
  for i in 0..<iterations {
99
96
  exsqlite3_bind_int64(statement, 1, Int64(i))
100
97
  exsqlite3_bind_double(statement, 2, 1.5)
@@ -112,11 +109,10 @@ extension Benchmarks {
112
109
 
113
110
  @Test
114
111
  func `raw C: prepare and finalize`() async throws {
115
- try await sqliteBenchmarkCase { appContext in
112
+ try await benchmarkCase {
116
113
  let database = try openDatabase()
117
- let runtime = try appContext.runtime
118
114
  let source = "SELECT \(BenchmarkSchema.selectColumns) FROM t WHERE id = 1"
119
- benchmark("raw C: prepare + finalize", runtime: runtime) { iterations in
115
+ benchmark("raw C: prepare + finalize", runtime: nil) { iterations in
120
116
  for _ in 0..<iterations {
121
117
  var statement: OpaquePointer?
122
118
  exsqlite3_prepare_v2(database.pointer, source, -1, &statement, nil)
@@ -131,11 +127,10 @@ extension Benchmarks {
131
127
 
132
128
  @Test
133
129
  func `Swift: prepare and finalize through the shared objects`() async throws {
134
- try await sqliteBenchmarkCase { appContext in
130
+ try await benchmarkCase {
135
131
  let database = try openDatabase()
136
- let runtime = try appContext.runtime
137
132
  let source = "SELECT \(BenchmarkSchema.selectColumns) FROM t WHERE id = 1"
138
- try benchmark("Swift: prepareSync + finalizeSync", runtime: runtime) { iterations in
133
+ try benchmark("Swift: prepareSync + finalizeSync", runtime: nil) { iterations in
139
134
  for _ in 0..<iterations {
140
135
  let statement = NativeStatement()
141
136
  try database.prepareSync(statement: statement, source: source)
@@ -148,12 +143,11 @@ extension Benchmarks {
148
143
 
149
144
  @Test
150
145
  func `Swift: column names of a prepared statement`() async throws {
151
- try await sqliteBenchmarkCase { appContext in
146
+ try await benchmarkCase {
152
147
  let database = try openDatabase()
153
- let runtime = try appContext.runtime
154
148
  let statement = NativeStatement()
155
149
  try database.prepareSync(statement: statement, source: "SELECT \(BenchmarkSchema.selectColumns) FROM t")
156
- try benchmark("Swift: getColumnNamesSync (5 columns)", runtime: runtime) { iterations in
150
+ try benchmark("Swift: getColumnNamesSync (5 columns)", runtime: nil) { iterations in
157
151
  for _ in 0..<iterations {
158
152
  _ = try statement.getColumnNamesSync()
159
153
  }
@@ -165,10 +159,9 @@ extension Benchmarks {
165
159
 
166
160
  @Test
167
161
  func `Swift: exec a trivial statement`() async throws {
168
- try await sqliteBenchmarkCase { appContext in
162
+ try await benchmarkCase {
169
163
  let database = try openDatabase()
170
- let runtime = try appContext.runtime
171
- try benchmark("Swift: execSync('SELECT 1')", runtime: runtime) { iterations in
164
+ try benchmark("Swift: execSync('SELECT 1')", runtime: nil) { iterations in
172
165
  for _ in 0..<iterations {
173
166
  try database.execSync(source: "SELECT 1")
174
167
  }
@@ -74,6 +74,7 @@ Pod::Spec.new do |s|
74
74
  s.exclude_files = ['Tests', 'Benchmarks']
75
75
 
76
76
  s.test_spec 'Tests' do |test_spec|
77
+ test_spec.dependency 'ExpoModulesTestCore'
77
78
  test_spec.source_files = 'Tests'
78
79
  test_spec.pod_target_xcconfig = {
79
80
  # The test bundle links the static ExpoModulesCore dependency chain, which contains C++.
@@ -1,17 +1,25 @@
1
1
  // Copyright 2015-present 650 Industries. All rights reserved.
2
2
 
3
- import ExpoModulesCore
3
+ import ExpoModulesTestCore
4
4
  import Testing
5
5
 
6
+ @testable import ExpoModulesCore
6
7
  @testable import ExpoSQLite
7
8
 
8
9
  @Suite("OpenDatabaseOptions")
10
+ @JavaScriptActor
9
11
  struct OpenDatabaseOptionsTests {
10
- private let appContext = AppContext()
12
+ let appContext: AppContext
13
+ let runtime: ExpoRuntime
14
+
15
+ init() throws {
16
+ appContext = TestAppContext()
17
+ runtime = try appContext.runtime
18
+ }
11
19
 
12
20
  @Test
13
- func `decodes every option to its default from an empty dictionary`() throws {
14
- let options = try OpenDatabaseOptions.from(dictionary: [:], appContext: appContext)
21
+ func `decodes every option to its default from an empty object`() throws {
22
+ let options = try OpenDatabaseOptions.decode(runtime.eval("({})"), in: runtime)
15
23
  #expect(options.enableChangeListener == false)
16
24
  #expect(options.useNewConnection == false)
17
25
  #expect(options.finalizeUnusedStatementsBeforeClosing == true)
@@ -19,9 +27,9 @@ struct OpenDatabaseOptionsTests {
19
27
 
20
28
  @Test
21
29
  func `decodes the provided options and keeps the rest at their defaults`() throws {
22
- let options = try OpenDatabaseOptions.from(
23
- dictionary: ["useNewConnection": true, "finalizeUnusedStatementsBeforeClosing": false],
24
- appContext: appContext
30
+ let options = try OpenDatabaseOptions.decode(
31
+ runtime.eval("({ useNewConnection: true, finalizeUnusedStatementsBeforeClosing: false })"),
32
+ in: runtime
25
33
  )
26
34
  #expect(options.enableChangeListener == false)
27
35
  #expect(options.useNewConnection == true)
@@ -31,12 +39,13 @@ struct OpenDatabaseOptionsTests {
31
39
  /// The module reuses a cached database only when its options equal the requested ones, so equality
32
40
  /// has to look at every option.
33
41
  @Test
34
- func `compares equal only when every option matches`() throws {
35
- let defaults = try OpenDatabaseOptions.from(dictionary: [:], appContext: appContext)
36
- let sameDefaults = try OpenDatabaseOptions.from(dictionary: [:], appContext: appContext)
37
- let newConnection = try OpenDatabaseOptions.from(
38
- dictionary: ["useNewConnection": true],
39
- appContext: appContext
42
+ func `compares equal only when every option matches`() {
43
+ let defaults = OpenDatabaseOptions()
44
+ let sameDefaults = OpenDatabaseOptions()
45
+ let newConnection = OpenDatabaseOptions(
46
+ enableChangeListener: false,
47
+ useNewConnection: true,
48
+ finalizeUnusedStatementsBeforeClosing: true
40
49
  )
41
50
  #expect(defaults == sameDefaults)
42
51
  #expect(defaults != newConnection)
@@ -0,0 +1 @@
1
+ 651f98f8175acf20e12acf3877e569b4b332ac39729775350b6d7c234ec437e7
@@ -0,0 +1 @@
1
+ c9696816fce90eef109e7a77ceb47ceb231d3b2e2229da3d2b876f0b6e12b542fbe45e784d6d9c20f680433850822c00a147de1c63a8010b850579fc3c5f8d5c
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.sqlite",
6
- "version": "58.0.15",
6
+ "version": "58.0.16",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.sqlite-58.0.15.aar",
28
- "url": "expo.modules.sqlite-58.0.15.aar",
29
- "size": 3678100,
30
- "sha512": "20ee4d163c789971f459002545f1dffd0b0c61b0b7b417f310dba61d18274736ce4ddc719fcef41d4be830a3a45ed1dbf01c6006ea061882f0be9ebbb3025620",
31
- "sha256": "07fd702db446c37af350500fbb2bba0c344b9c219c407cd4676417b5c04269b0",
32
- "sha1": "1fea9b46021910145ad444cfaebbd870f192c4f3",
33
- "md5": "1400edef6c9cb97b71a23472e7ebde56"
27
+ "name": "expo.modules.sqlite-58.0.16.aar",
28
+ "url": "expo.modules.sqlite-58.0.16.aar",
29
+ "size": 3678101,
30
+ "sha512": "c9696816fce90eef109e7a77ceb47ceb231d3b2e2229da3d2b876f0b6e12b542fbe45e784d6d9c20f680433850822c00a147de1c63a8010b850579fc3c5f8d5c",
31
+ "sha256": "651f98f8175acf20e12acf3877e569b4b332ac39729775350b6d7c234ec437e7",
32
+ "sha1": "54f27b332331d7c7fb788b2adfa5aacc4509a368",
33
+ "md5": "4c36866f6a7b985375c19088f86730df"
34
34
  }
35
35
  ]
36
36
  },
@@ -67,13 +67,13 @@
67
67
  ],
68
68
  "files": [
69
69
  {
70
- "name": "expo.modules.sqlite-58.0.15.aar",
71
- "url": "expo.modules.sqlite-58.0.15.aar",
72
- "size": 3678100,
73
- "sha512": "20ee4d163c789971f459002545f1dffd0b0c61b0b7b417f310dba61d18274736ce4ddc719fcef41d4be830a3a45ed1dbf01c6006ea061882f0be9ebbb3025620",
74
- "sha256": "07fd702db446c37af350500fbb2bba0c344b9c219c407cd4676417b5c04269b0",
75
- "sha1": "1fea9b46021910145ad444cfaebbd870f192c4f3",
76
- "md5": "1400edef6c9cb97b71a23472e7ebde56"
70
+ "name": "expo.modules.sqlite-58.0.16.aar",
71
+ "url": "expo.modules.sqlite-58.0.16.aar",
72
+ "size": 3678101,
73
+ "sha512": "c9696816fce90eef109e7a77ceb47ceb231d3b2e2229da3d2b876f0b6e12b542fbe45e784d6d9c20f680433850822c00a147de1c63a8010b850579fc3c5f8d5c",
74
+ "sha256": "651f98f8175acf20e12acf3877e569b4b332ac39729775350b6d7c234ec437e7",
75
+ "sha1": "54f27b332331d7c7fb788b2adfa5aacc4509a368",
76
+ "md5": "4c36866f6a7b985375c19088f86730df"
77
77
  }
78
78
  ]
79
79
  },
@@ -87,8 +87,8 @@
87
87
  },
88
88
  "files": [
89
89
  {
90
- "name": "expo.modules.sqlite-58.0.15-sources.jar",
91
- "url": "expo.modules.sqlite-58.0.15-sources.jar",
90
+ "name": "expo.modules.sqlite-58.0.16-sources.jar",
91
+ "url": "expo.modules.sqlite-58.0.16-sources.jar",
92
92
  "size": 14875,
93
93
  "sha512": "93ce18d06cc3125618ca50503fd5b7f6d7407b05e931ddf6381fa7e70d8b41c6719c65a433fafa28626a12335b6e9f9a5e4cd05036f715e7a5b01c94047fddf7",
94
94
  "sha256": "e4feeb357b13c3da0d6690deff9aab2186a7874185369a06c55fa6da992fdc9c",
@@ -0,0 +1 @@
1
+ 126ea11b738fb44481a765e1f57fd05f0d5f5a88bf6ad0ccd808d77193f4bfc2
@@ -0,0 +1 @@
1
+ 00d9b2d190cc0c69f0b4f45175944ea41a830b79fef4337155b2f50762532cdef62fd74139a9563dcc3ee240c605f63ed92ffc0d4cfc8d755f5617ac2927549e
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>host.exp.exponent</groupId>
11
11
  <artifactId>expo.modules.sqlite</artifactId>
12
- <version>58.0.15</version>
12
+ <version>58.0.16</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.sqlite</name>
15
15
  <url>https://github.com/expo/expo</url>