Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix(sqlite): Removed ToLower in typecast#3860

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
giuliano-macedo wants to merge3 commits intosqlc-dev:main
base:main
Choose a base branch
Loading
fromgiuliano-macedo:fix-3688

Conversation

giuliano-macedo
Copy link

Fixes#3688 by not callingNewIdentifier(name) inconvertCastExpr because this function was ending up callingstrings.ToLower on the type name resulting in type overrides not matching because the cast type name was always lowerCase and the override was always uppercase ingo_type.go@goInnerType.

Alternatively this issue could by changing this line ingoInnerType:

iforide.DbType!=""&&oride.DbType==columnType&&oride.Nullable!=notNull&&oride.Unsigned== col.Unsigned {

to

iforide.DbType!=""&&strings.EqualFold(oride.DbType,columnType)&&oride.Nullable!=notNull&&oride.Unsigned== col.Unsigned {

But I don't know if this would be a good idea...

Since we're already here, I've added tests for this specific case of type casts + overrides in sqlite, and refacted a variable inconvertCastExpr becausename could be confused with the column name instead of type name.

@dosubotdosubotbot added size:LThis PR changes 100-499 lines, ignoring generated files. 🔧 golang labelsFeb 25, 2025
@giuliano-macedogiuliano-macedo changed the titlesqlite: Removed ToLower in typecastfix(sqlite): Removed ToLower in typecastApr 9, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
size:LThis PR changes 100-499 lines, ignoring generated files.🔧 golang
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

CAST in SQLite yields incorrect type
1 participant
@giuliano-macedo

[8]ページ先頭

©2009-2025 Movatter.jp