Skip to content

Official support for PostgreSQL, MySQL, SQLite, and SQL Server#2

Merged
tiagolauer merged 1 commit into
masterfrom
multi-db-support
Jul 17, 2026
Merged

Official support for PostgreSQL, MySQL, SQLite, and SQL Server#2
tiagolauer merged 1 commit into
masterfrom
multi-db-support

Conversation

@tiagolauer

Copy link
Copy Markdown
Owner

Summary

Closes real per-dialect parsing gaps so all four major engines are officially covered — no dialect flag added to the API, the parser stays permissive and recognizes each syntax by shape:

  • SQL Server named parameters (@id, @p1) typed alongside $n and ?.
  • MySQL backtick identifiers (`col`) — a previous limitation note claiming this was impossible was wrong; TypeScript allows escaping a backtick inside a template literal type, so it's fully supported now.
  • SQL Server TOP N [PERCENT] clause, including TOP (n).
  • SQL Server OUTPUT clause (the RETURNING equivalent) for INSERT/UPDATE/DELETE, with inserted./deleted. pseudo-table columns resolved correctly against the statement's table.
  • README: driver recipe for mssql, a database-support feature matrix, and updated limitations.
  • Bumped package version to 0.1.3.

Test plan

  • npm run test:types (full type-test suite)
  • npm run test:runtime (vitest, 8 tests)
  • New per-dialect regression suites: tests/dialect-postgres.test-d.ts, tests/dialect-mysql.test-d.ts, tests/dialect-sqlite.test-d.ts, tests/dialect-mssql.test-d.ts
  • Verified existing RETURNING/params/join suites still pass unchanged

Closes real per-dialect parsing gaps so the four major engines are covered
without introducing a dialect concept in the public API — the parser stays
permissive and recognizes each syntax by shape:

- SQL Server named parameters (@id, @p1) typed alongside $n and ?.
- MySQL backtick-quoted identifiers (`` `col` ``) — a prior limitation note
  claiming this was impossible was wrong; TS allows escaping a backtick
  inside a template literal type.
- SQL Server TOP N [PERCENT] clause, including TOP (n).
- SQL Server OUTPUT clause (the RETURNING equivalent) for INSERT/UPDATE/
  DELETE, with inserted./deleted. pseudo-table columns resolved correctly.
- README: driver recipe for mssql, a database-support feature matrix, and
  updated limitations. New per-dialect regression suites under tests/.

Also bumps the package version to 0.1.3.
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@tiagolauer, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 44 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1c61858f-0bcf-4f37-86e6-4b664c8c1f67

📥 Commits

Reviewing files that changed from the base of the PR and between 1635835 and 73a0d72.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (9)
  • README.md
  • package.json
  • src/params.ts
  • src/parse.ts
  • src/string.ts
  • tests/dialect-mssql.test-d.ts
  • tests/dialect-mysql.test-d.ts
  • tests/dialect-postgres.test-d.ts
  • tests/dialect-sqlite.test-d.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch multi-db-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tiagolauer
tiagolauer merged commit 44f4767 into master Jul 17, 2026
6 checks passed
@tiagolauer
tiagolauer deleted the multi-db-support branch July 17, 2026 23:48
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