Repository navigation
feat: default generate to in-memory PGlite (#2) - #121
Open
theaiodotco-cloud wants to merge 1 commit into
Open
theaiodotco-cloud wants to merge 1 commit into
theaiodotco-cloud wants to merge 1 commit into
Conversation
- Default pglite option to true in CLI and generate() function so type generation works without a running Postgres daemon - Support --no-pglite to opt out and use external Postgres via DATABASE_URL - Ensure server, PGlite instance, and DATABASE_URL are cleaned up in finally block - Add regression test for default PGlite generation and update documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2
@algora-pbc /claim #2
Summary
pgstrap generateandgenerate()to in-memory PGlite (pglite: true) so runningbun run db:generateworks out of the box without requiring a background PostgreSQL server running.--no-pgliteto allow generating from an external PostgreSQL database viaDATABASE_URL.process.env.DATABASE_URLin afinallyblock to prevent resource and socket leaks.generate()insidesrc/cli.ts.README.mdto document the default PGlite behavior and--no-pgliteopt-out.tests/generate.pglite.test.tsverifying thatgenerate()works without passingpglite: trueand without an external PostgreSQL instance.Verification
bun test: All 4 tests across 3 files pass 100% green.bun run format:check: passes cleanly.bun run build: compiles successfully without errors.