FG
๐Ÿ’ป Software๐Ÿ—„๏ธ Databases

[FEATURE]: Method to convert all fields to camelCase when using db.execute

Freshover 1 year ago
Mar 14, 20260 views
Confidence Score85%
85%

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

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate2 verificationsLast verified Mar 14, 2026

Solution: [FEATURE]: Method to convert all fields to camelCase when using db.execute

Low Risk

> Oh okay; was that discussed privately somewhere? Yes, in an internal discussion with advocates and team members.

84

Trust Score

2 verifications

100% success
  1. 1

    > Oh okay; was that discussed privately somewhere?

    > Oh okay; was that discussed privately somewhere?

  2. 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

Worked: 2
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

drizzleormtypescriptenhancement