-
Notifications
You must be signed in to change notification settings - Fork 1
feat: enhance migration handling and update documentation for bridge architecture #75
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
2f5412b
docs: add documentation for bridge architecture
Yashh56 6c54cd6
feat: increase max tokens to 4096 for AI provider models
Yashh56 ffdbaa2
feat: export resolvePkgNativeBindingPath function and update AIHistor…
Yashh56 1321b75
docs: update CONTRIBUTING.md with build instructions for bridge packa…
Yashh56 f2daab7
feat(migration): enhance migration handling with sync and lock features
Yashh56 9f47b98
feat(migrations): refactor migration directory handling and enhance m…
Yashh56 4510686
feat: update uuid package to version 14.0.0 and add types for uuid; e…
Yashh56 ae7c51e
feat: implement migration analysis and sync features; add SQL preview…
Yashh56 6140afd
feat: enhance migration handling and UI integration; add migration sy…
Yashh56 7157d41
fix: migration status card and sheet
Yashh56 2902694
feat: added format time functions
Yashh56 e0b1e9a
fix: removed the @types/uuid for test cases
Yashh56 b5f0459
refactor: fixed test case and added docker command in md and cleaned …
Yashh56 87d7224
fix: syncSchemaFile expects a filesystem path
Yashh56 bdfbd0b
fix: Migrations management and creation
Yashh56 30f3f2c
fix: migration-lock.json sync commit issue
Yashh56 97f6861
feat: impl handleGenerateSQL
Yashh56 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Database Connectors (Bridge) | ||
|
|
||
| This folder contains database-specific connector implementations used by the bridge to execute metadata, query, migration and CRUD operations. | ||
|
|
||
| Layout | ||
| - `postgres.ts` - PostgreSQL connector, cache manager, metadata helpers, streaming query support and PostgreSQL-specific DDL/DML behavior. | ||
| - `mysql.ts` - MySQL connector for schema/table metadata, stats, migrations and query execution. | ||
| - `mariadb.ts` - MariaDB connector. Keep MariaDB behavior separate when it diverges from MySQL. | ||
| - `sqlite.ts` - SQLite connector using `better-sqlite3`, local file handling and SQLite-specific migration/query behavior. | ||
|
|
||
| How it fits | ||
| - `src/services/queryExecutor.ts` routes bridge operations to the correct connector based on `DBType`. | ||
| - SQL strings should come from `src/queries/*` where practical, not be duplicated inline. | ||
| - Shared result shapes come from `src/types/common.ts`; database-specific config and metadata types live in `src/types/postgres.ts`, `src/types/mysql.ts` and `src/types/sqlite.ts`. | ||
| - Connection config objects are built by `src/services/connectionBuilder.ts`; connectors generally create their own driver client from that config for each operation. | ||
|
|
||
| How to add connector behavior | ||
| 1. Add database-specific SQL to `src/queries/<db>/` when the operation needs raw SQL. | ||
| 2. Add or update typed method support in the relevant connector file. | ||
| 3. Route the operation from `QueryExecutor` or the owning service. | ||
| 4. Register any new public RPC method through a handler in `src/handlers`. | ||
|
|
||
| Notes | ||
| - Keep connector methods focused on database interaction. Do not read UI payloads directly or handle RPC responses here. | ||
| - Invalidate or bypass connector caches when an operation mutates schema, table data or migration state. | ||
| - Prefer shared common types unless a database really needs extra metadata fields. |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.