Skip to content

fix(sqlite): resolve CodeRabbit PR#189 review issues#191

Merged
husamql3 merged 2 commits into
stagefrom
claude/resolve-coderabbit-pr189-KY3Tu
May 10, 2026
Merged

fix(sqlite): resolve CodeRabbit PR#189 review issues#191
husamql3 merged 2 commits into
stagefrom
claude/resolve-coderabbit-pr189-KY3Tu

Conversation

@husamql3
Copy link
Copy Markdown
Owner

@husamql3 husamql3 commented May 9, 2026

$(cat <<'EOF'

Summary

Addresses all actionable CodeRabbit suggestions from PR #189 (SQLite support), excluding the SQL injection finding per request.

  • Stable pagination: Append PK tie-breaker columns to ORDER BY in getTableData so cursor-based pagination doesn't skip/duplicate rows when the sort column has non-unique values
  • Error mapping (503): Wrap getDatabasesList, getCurrentDatabase, getDatabaseConnectionInfo, getTablesList, getTableSchema, and getTableColumns in try/catch { throw this.wrapError(e) } so better-sqlite3 / filesystem errors map to 503 instead of surfacing as generic errors
  • Consistent JSON serialization: Serialize object/array values in addRecord and bulkInsertRecords with JSON.stringify, matching the existing behavior in updateRecords
  • Preserve schema objects on alterColumn: Read CREATE INDEX and CREATE TRIGGER statements from sqlite_master before the table rebuild and re-execute them after the rename, so indexes and triggers are not silently dropped
  • SQLite handle cleanup: Call closeSqliteDb() inside closePool() and closePoolByDatabase() so selective-close paths don't leave the file handle open
  • Parameterized type labels: Fix standardizeSqliteDataTypeLabel to match bigint(20), smallint(6), tinyint(1), mediumint(8), float(8), double(10) before the generic includes("int") fallback

Test plan

  • All 923 existing server tests pass (bun run test in packages/server)
  • Biome format passes with no errors
  • Paginating a table sorted by a non-unique column does not skip/duplicate rows across pages
  • Altering a column on a table that has extra indexes or triggers preserves them
  • Inserting a record with a JSON/array column stores the value as serialized JSON (consistent with updates)
  • Connection errors from SQLite file operations surface as HTTP 503

https://claude.ai/code/session_01WzT1NRL9DK1uEjkew7H24q
EOF
)


Generated by Claude Code

- Add PK tie-breaker columns to ORDER BY in getTableData for stable
  cursor pagination when sort column has non-unique values
- Wrap getDatabasesList, getCurrentDatabase, getDatabaseConnectionInfo,
  getTablesList, getTableSchema, and getTableColumns in try/catch with
  wrapError so connection failures surface as 503 instead of generic errors
- Serialize object/array values in addRecord and bulkInsertRecords to
  match the JSON.stringify behavior already applied in updateRecords
- Preserve existing indexes and triggers when rebuilding table in
  alterColumn by re-executing their CREATE statements after rename
- Close SQLite handle in closePool/closePoolByDatabase so selective-close
  paths don't leave the file handle open
- Fix parameterized numeric type mislabeling in standardizeSqliteDataTypeLabel:
  bigint(20), smallint(6), float(8), double(10) etc. now match correctly
  before the generic includes("int") fallback

https://claude.ai/code/session_01WzT1NRL9DK1uEjkew7H24q
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 9, 2026

Warning

Rate limit exceeded

@husamql3 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 52 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2d62380f-d0e7-4011-b1c1-dbc3fa999f96

📥 Commits

Reviewing files that changed from the base of the PR and between 533885f and 0d600ba.

📒 Files selected for processing (3)
  • packages/server/src/adapters/sqlite/sqlite.adapter.ts
  • packages/server/src/db-manager.ts
  • packages/shared/src/types/column.type.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/resolve-coderabbit-pr189-KY3Tu

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 and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

Bundle Size

packages/server/dist696K

File breakdown
152K	packages/server/dist/index.js
540K	packages/server/dist/index.js.map

packages/web/dist63M

File breakdown
4.0K	packages/web/dist/assets/_pathlessLayout-DHHRyJCJ.js
4.0K	packages/web/dist/assets/_pathlessLayout-DHHRyJCJ.js.map
56K	packages/web/dist/assets/_pathlessLayout-O-6Zm5ag.js
1.2M	packages/web/dist/assets/_pathlessLayout-O-6Zm5ag.js.map
4.0K	packages/web/dist/assets/_queryId-DumlFwkI.js
4.0K	packages/web/dist/assets/_queryId-DumlFwkI.js.map
4.0K	packages/web/dist/assets/_table-ARSRlQwq.js
4.0K	packages/web/dist/assets/_table-ARSRlQwq.js.map
4.0K	packages/web/dist/assets/_table-FzfMkhVl.js
4.0K	packages/web/dist/assets/_table-FzfMkhVl.js.map
28K	packages/web/dist/assets/bundle-mjs-D-wvtgbx.js
136K	packages/web/dist/assets/bundle-mjs-D-wvtgbx.js.map
444K	packages/web/dist/assets/chunk-BO2N2NFS-BidANqFh.js
1.6M	packages/web/dist/assets/chunk-BO2N2NFS-BidANqFh.js.map
8.0K	packages/web/dist/assets/code-editor-osDtF62r.js
20K	packages/web/dist/assets/code-editor-osDtF62r.js.map
120K	packages/web/dist/assets/codicon-ngg6Pgfi.ttf
1.3M	packages/web/dist/assets/css.worker-CCg9Iwze.js
3.2M	packages/web/dist/assets/css.worker-CCg9Iwze.js.map
4.0K	packages/web/dist/assets/highlighted-body-OFNGDK62-B19jQtTB.js
4.0K	packages/web/dist/assets/highlighted-body-OFNGDK62-B19jQtTB.js.map
860K	packages/web/dist/assets/html.worker-BBXyX7jd.js
2.2M	packages/web/dist/assets/html.worker-BBXyX7jd.js.map
20K	packages/web/dist/assets/icons-CWGGEoI2.js
88K	packages/web/dist/assets/icons-CWGGEoI2.js.map
548K	packages/web/dist/assets/index-DG_VD2H5.js
2.2M	packages/web/dist/assets/index-DG_VD2H5.js.map
124K	packages/web/dist/assets/index-rzbA8gTj.css
4.0K	packages/web/dist/assets/indexes-DVCe935A.js
4.0K	packages/web/dist/assets/indexes-DVCe935A.js.map
12K	packages/web/dist/assets/jetbrains-mono-cyrillic-wght-normal-D73BlboJ.woff2
12K	packages/web/dist/assets/jetbrains-mono-greek-wght-normal-Bw9x6K1M.woff2
16K	packages/web/dist/assets/jetbrains-mono-latin-ext-wght-normal-DBQx-q_a.woff2
40K	packages/web/dist/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2
8.0K	packages/web/dist/assets/jetbrains-mono-vietnamese-wght-normal-Bt-aOZkq.woff2
516K	packages/web/dist/assets/json.worker-D3YLuqJL.js
1.7M	packages/web/dist/assets/json.worker-D3YLuqJL.js.map
4.0K	packages/web/dist/assets/logs-Bw5IyRZ-.js
4.0K	packages/web/dist/assets/logs-Bw5IyRZ-.js.map
4.0K	packages/web/dist/assets/mermaid-GHXKKRXX-D408ONXh.js
140K	packages/web/dist/assets/monaco-editor-DVSAlpqy.css
4.1M	packages/web/dist/assets/monaco-editor-DdPbwC_K.js
15M	packages/web/dist/assets/monaco-editor-DdPbwC_K.js.map
200K	packages/web/dist/assets/monitoring-CaePi9q2.js
504K	packages/web/dist/assets/monitoring-CaePi9q2.js.map
4.0K	packages/web/dist/assets/queries.store-BTSH1Oi0.js
8.0K	packages/web/dist/assets/queries.store-BTSH1Oi0.js.map
12K	packages/web/dist/assets/query-runner-PBtCR5yP.js
32K	packages/web/dist/assets/query-runner-PBtCR5yP.js.map
148K	packages/web/dist/assets/radix-ui-DdxcFOeB.js
660K	packages/web/dist/assets/radix-ui-DdxcFOeB.js.map
176K	packages/web/dist/assets/react-dom-B7tPHdJv.js
772K	packages/web/dist/assets/react-dom-B7tPHdJv.js.map
4.0K	packages/web/dist/assets/rolldown-runtime-Bnw7wDfq.js
4.0K	packages/web/dist/assets/runner-uG55aLAA.js
4.0K	packages/web/dist/assets/runner-uG55aLAA.js.map
4.0K	packages/web/dist/assets/schema-Bvd5jMLE.js
4.0K	packages/web/dist/assets/schema-Bvd5jMLE.js.map
4.0K	packages/web/dist/assets/table-Dor_PFk-.js
4.0K	packages/web/dist/assets/table-Dor_PFk-.js.map
232K	packages/web/dist/assets/tanstack-edM6nHGa.js
932K	packages/web/dist/assets/tanstack-edM6nHGa.js.map
7.8M	packages/web/dist/assets/ts.worker-EBDMY3hW.js
17M	packages/web/dist/assets/ts.worker-EBDMY3hW.js.map
4.0K	packages/web/dist/assets/visualizer-Lthlu6R8.js
4.0K	packages/web/dist/assets/visualizer-Lthlu6R8.js.map
104K	packages/web/dist/image.png
4.0K	packages/web/dist/index.html

@husamql3 husamql3 merged commit 3e4886b into stage May 10, 2026
5 checks passed
@husamql3 husamql3 deleted the claude/resolve-coderabbit-pr189-KY3Tu branch May 10, 2026 09:23
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.

2 participants