Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(PGlite): improve type support #130

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sandros94
Copy link

Proposed in sandros94/nuxt-pglite#7, these changes improve typing for newly created PGlite instance that do have extensions added.

This also make sure that the PGlite instance is ready before executing any query (.create internally also awaits for .waitReady).

I've also changed the following default because in rare occasions PGlite forcefully tries to find params in an empty array, hanging without notice:

-async function query(sql: string, params: unknown[] = []) {
+async function query(sql: string, params: unknown[] = undefined) {

@sandros94
Copy link
Author

The mention in the nuxt/ui issue was just my copy/paste not working correctly.

Got a new keyboard now 😬

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (main@db54a4c). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #130   +/-   ##
=======================================
  Coverage        ?   45.73%           
=======================================
  Files           ?       19           
  Lines           ?      669           
  Branches        ?       66           
=======================================
  Hits            ?      306           
  Misses          ?      358           
  Partials        ?        5           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant