loopbackio / loopbackio/loopback-next
Add option to allow rule for column name
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1.1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 27
Description
Background
Current by default the property is "lowercased".
If we want to custom it, we must use:
postgresql: {
columnName: 'custom_name',
},
This is huge headache if system have hundred of tables hence possibly thousand of column names to customize.
Suggestion
We should provide an option in the connector level to allow users to compute column name as keep, lowercase, UPPERCASE, snake_case, camelCase, PascalCase, or custom function columnNameFn(propertyName: string) => string
E.g:
const dataSourceConfig = {
name: 'db',
connector: 'postgresql',
columnNameComputation: 'snake_case',
...
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the connector-level configuration handling and the PostgreSQL column-name mapping; the issue provides no file or test entry point. Review how per-property columnName settings are currently applied. Done means the connector-level option supports the requested naming modes and a custom columnNameFn across the relevant mappings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, typescript
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100