Norm should Generate Params as Non Nullable for Non Nullable DB Fields
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 19
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
Hi Team,
There is a small Issue with NORM Generated Files for UPDATE, INSERT and DELETE Queries. For the Params, it does not consider the Non-Nullability of Database Column rather it always Generate it as Nullable.
For Example -
If a query is INSERT INTO users (first_name, last_name) VALUES (:firstName, :lastName);
Generated Data Class would be like this
data class CreateUserParams(
val firstName: String?,
val lastName: String?,
)
But, Ideally it should be like this because in Database first_name and last_name are Non Nullable.
data class CreateUserParams(
val firstName: String,
val lastName: String,
)
Contributor guide
No contributing guide indexed for this repository
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 NORM generator that creates parameter data classes for INSERT, UPDATE, and DELETE queries, then trace how database column nullability is read. Reproduce the example with non-nullable first_name and last_name fields. Done means generated parameters use non-nullable Kotlin types for non-nullable database columns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100