Open rockmagma02 opened 3 days ago
Incidentally, I believe I have identified the source of the issue.
It is evident that the prepareQuery
method does not accept a customResultMapper, which is essential for converting column names.
I am passionate to open a new Pull Request to fix this issue.
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.36.4
What version of
drizzle-kit
are you using?0.28.1
Other packages
No response
Describe the Bug
Column name conversion not working when using
sql.js
Description
Here is a simple example can show this bug:
As you can observe, the table contains a column named
test_snake_name
. We utilize thetestSnakeName
to refer to this column in the Drizzle schema. However, there is an issue:The query was successfully executed, and the result was retrieved. However, the retrieved data was not converted to the appropriate object type suitable for use in TypeScript or JavaScript code. Instead, it retains the name stored in the database.
Other info
I discovered similar (or identical) issues in #2189, which was opened on April 22, 2024. However, due to the high volume of issues, it appears that your team may have overlooked this matter. Therefore, I am re-reporting it here for your attention.