-
-
Notifications
You must be signed in to change notification settings - Fork 5
feat: MySQL support via the pymysql and asyncmy drivers #248
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
Open
rayakame
wants to merge
11
commits into
main
Choose a base branch
from
feat/mysql-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
6f3afd9
feat: MySQL support via the pymysql and asyncmy drivers
rayakame 2e1431f
feat: MySQL fixture matrix, runtime suites, and CI wiring
rayakame 05a76ce
chore: regenerate fixtures with the v0.8.0 plugin stamp
rayakame e955c38
docs: MySQL driver pages
rayakame b86ca93
fix: merge reused MySQL parameters and close the review gaps
rayakame 5291637
chore: add the changelog fragments
rayakame 4a56a52
test: cover the repeated-parameter skips and the unterminated hash co…
rayakame 7bfead4
test: cover every generated miss branch of the MySQL fixtures
rayakame bdd8b9b
fix: address the PR review comments
rayakame fe1d7c2
test: scope the execresult cursor asserts to the suite's own row
rayakame da056f6
fix: gate the MySQL parameter merge on named arguments
rayakame File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| kind: Added | ||
| body: 'MySQL support: the new `sql_driver` values `asyncmy` and `pymysql` generate code for [asyncmy](https://pypi.org/project/asyncmy/) (asyncio) and [PyMySQL](https://pypi.org/project/PyMySQL/) (synchronous), using `engine: "mysql"` and the same `?` placeholders as the SQLite drivers - the plugin rewrites them to the drivers'' pyformat `%s` at generation time. Inline `ENUM` (and `SET`) columns generate `enums.py` classes, `tinyint(1)` maps to `bool`, `time` to `datetime.timedelta`, and returned `json` columns stay `str` like on every other driver. `:execlastid` returns `cursor.lastrowid` (`None` when nothing was inserted); `:copyfrom` stays PostgreSQL-only. Reused parameters (`sqlc.arg` or `sqlc.slice` used at several sites) merge into one function argument even though MySQL binds every occurrence separately.' | ||
| time: 2026-08-13T12:00:00.0000000Z | ||
| custom: | ||
| Author: Rayakame | ||
| PR: "248" |
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,6 @@ | ||
| kind: Fixed | ||
| body: 'With `omit_unused_models: true`, an enum referenced only through an overridden column no longer breaks generation in either direction: an overridden enum parameter kept its `enums.X(...)` conversion while the class was filtered away (a `NameError` at import), and an enum used only by overridden return columns was retained as a dead `enums.py` nothing imports.' | ||
| time: 2026-08-13T12:00:00.0000000Z | ||
| custom: | ||
| Author: Rayakame | ||
| PR: "248" |
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,6 @@ | ||
| kind: Fixed | ||
| body: 'Query modules whose only queries return whole model rows (no `:many`) no longer import the row''s column-type modules (`datetime`, `decimal`, ...) into their `TYPE_CHECKING` block: nothing in such a module spells those types, and ruff flagged the imports as unused on generated output.' | ||
| time: 2026-08-13T12:00:01.0000000Z | ||
| custom: | ||
| Author: Rayakame | ||
| PR: "248" |
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
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.