-
Notifications
You must be signed in to change notification settings - Fork 52
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
🐛 Enhance tests for long SQL statements and fix errorOffset handling #957
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 6253721 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
Updates to Preview Branch (fix-874-error) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
- Update test description for long "create table" statement to clarify that it exceeds 500 lines, surpassing CHUNK_SIZE. - Add new test case for long "create function" statement (over 500 lines) to ensure it parses without errors.
f596d1d
to
6c24cff
Compare
6c24cff
to
6253721
Compare
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
The main commit of this PR is 28fe282.
Issue
Why is this change needed?
What would you like reviewers to focus on?
Testing Verification
manually tested on
What was done
🤖 Generated by PR Agent at 6253721
Detailed Changes
index.test.ts
Add and enhance tests for long SQL statements
frontend/packages/db-structure/src/parser/sql/postgresql/index.test.ts
CHUNK_SIZE.
processSQLInChunks.test.ts
Update tests for processSQLInChunks with retryOffset
frontend/packages/db-structure/src/parser/sql/postgresql/processSQLInChunks.test.ts
retryOffset
instead oferrorOffset
.index.ts
Refactor error handling and improve SQL parser logic
frontend/packages/db-structure/src/parser/sql/postgresql/index.ts
errorOffset
withretryOffset
for better error handling.readOffset
andretryOffset
usage.processSQLInChunks.ts
Refactor chunk processing logic with retryOffset
frontend/packages/db-structure/src/parser/sql/postgresql/processSQLInChunks.ts
errorOffset
withretryOffset
in chunk processing logic.large-ligers-warn.md
Add changeset for SQL parsing bug fix
.changeset/large-ligers-warn.md
Additional Notes