-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: #310 camelcase option #343
Conversation
@@ -520,6 +520,74 @@ testClient( | |||
}, | |||
); | |||
|
|||
testClient( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the following test are redundant, please leave just one
}, | ||
); | ||
|
||
testClient( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a test for a field that has no name, somthing like "SELECT 1, 2, 3". I wanna know how this behaves for auto generated field names
query/query.ts
Outdated
@@ -151,6 +152,21 @@ export class QueryObjectResult< | |||
> extends QueryResult { | |||
public rows: T[] = []; | |||
|
|||
private _snakeToCamelCase = (input: string) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't use TypeScript privates here, we use JavaScript privates
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you @pantapita
I have made new fork as the old one was way too old.
Implemented camelcase option in QueryObjectConfig, added unit tests for camelcase (without, false, true).
BR