Skip to content

add mapper that applies to sql columns#25

Merged
mrj0 merged 1 commit intoVinovest:mainfrom
Minnowo:main
Mar 2, 2026
Merged

add mapper that applies to sql columns#25
mrj0 merged 1 commit intoVinovest:mainfrom
Minnowo:main

Conversation

@Minnowo
Copy link
Contributor

@Minnowo Minnowo commented Feb 22, 2026

I was adding Sqlite as an additional database on one of my apps which is already using Postgres. It seems Postgres always returns column names in lowercase, but not Sqlite.

I ended up hitting a case where I had something like this:

SELECT *, xyz as some_lowercase_name
FROM table

And the column names from * would be uppercase, but not the some_lowercase_name column. Which caused a mapping error:

missing destination name VERSION in *database.TblConfig

This PR adds a new option to the mapper struct, that lets you map the sql column names too.

Copy link
Contributor

@mrj0 mrj0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@Minnowo
Copy link
Contributor Author

Minnowo commented Mar 1, 2026

Looks good, thank you!

Thanks!
Did you forget to merge or is there another reason this is still open?

@mrj0
Copy link
Contributor

mrj0 commented Mar 2, 2026

I did forget, sorry :)

@mrj0 mrj0 merged commit 48e25ac into Vinovest:main Mar 2, 2026
10 checks passed
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