Skip to content

Commit 8c2e5d5

Browse files
committed
fix: preserve camelCase
apply name conversion only when underscores are present in field name
1 parent 395a0ba commit 8c2e5d5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/drivers/utlis.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ export function fieldName(
1010
if (column) {
1111
name = column.name;
1212
}
13-
return name
14-
.toLowerCase()
15-
.replace(/([_][a-z])/g, (group) => group.toUpperCase().replace("_", ""));
13+
if (name.includes('_')) {
14+
return name
15+
.toLowerCase()
16+
.replace(/([_][a-z])/g, (group) => group.toUpperCase().replace("_", ""));
17+
} else {
18+
return name;
19+
}
1620
}
1721

1822
export function argName(index: number, column?: Column): string {

0 commit comments

Comments
 (0)