[FEATURE]: Method to convert all fields to camelCase when using db.execute
Problem
Describe what you want EDIT: The casing can be fetched from the global config, as described in #2834, instead of having some arbitrary method for it. When using `db.execute`, the fields remain the same case as they are in the DB; this is totally valid and acceptable. However, it would be neat to have a method on it (`$toCamelCase`) that converts all the fields to camelCase. For example, running this method: [code block] currently outputs `{ foo_bar: 'some-value' }`, but with something like `$toCamelCase`, [code block] it would output `{ fooBar: 'some-value' }`. Currently I do this manually; I wonder if the team would consider this since it's kind of subjective. Feel free to close if this is not planned.
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: [FEATURE]: Method to convert all fields to camelCase when using db.execute
> Oh okay; was that discussed privately somewhere? Yes, in an internal discussion with advocates and team members.
Trust Score
2 verifications
- 1
> Oh okay; was that discussed privately somewhere?
> Oh okay; was that discussed privately somewhere?
- 2
Yes, in an internal discussion with advocates and team members.
Yes, in an internal discussion with advocates and team members.
Validation
Resolved in drizzle-team/drizzle-orm GitHub issue #2842. Community reactions: 1 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep