Skip to content

fix: postgres array_depth i16 to i32.#21

Open
Blankeos wants to merge 1 commit intojayy-lmao:mainfrom
Blankeos:fix/i16-arraydepth-issue
Open

fix: postgres array_depth i16 to i32.#21
Blankeos wants to merge 1 commit intojayy-lmao:mainfrom
Blankeos:fix/i16-arraydepth-issue

Conversation

@Blankeos
Copy link

fixes #20

Needs review, this is also more of a demonstration than a PR to confirm my assumptions related to the issue.
I haven't tested on INT2. But for INT4 it works...

I also don't know the impact of this PR on mysql yet, it does change some files related to mysql. But have tested on postgres on my setup (in that issue's repro) and it works (it generated files under src/models):
image

@Blankeos
Copy link
Author

Great tests btw, I just checked this again: https://github.com/jayy-lmao/sql-gen/actions/runs/16371103470/job/46350984033?pr=19#step:6:442

It seems like:

  • i32 is INT4; and
  • i16 is INT2 (because it fails when i32 wrongfully casts INT2.

Probably need to find a way to have explicitly store them on their own variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant