Skip to content

Conversation

@anzin
Copy link
Contributor

@anzin anzin commented Jan 20, 2021

Description (*)
I've adjusted data model generation process:

  1. Interface creation was made optional.
  2. If data model has not interface, the fields constants appears in the data model.
  3. Adjusted getters and setters annotations for new behaviour.
  4. For setters made return type void.
  5. Added set and get null.
  6. Added type for method parameters.
  7. Added better description for annotations.

Screenshot 2021-01-20 at 13 32 34

Screenshot 2021-01-20 at 13 35 16

Screenshot 2021-01-20 at 13 33 05

Screenshot 2021-01-20 at 13 35 49

Screenshot 2021-01-20 at 13 31 25

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with integration/functional tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@DmitryFurs
Copy link
Contributor

@coderimus @anzin it would be convenient to add an additional column named Is Nullable, and draw a checkbox in the cell, so that the code generator adds a nullable sign (?int, ?string and etc.) only to the explicitly specified fields, if the field is not nullable, then the typing must be strict (int, string and etc.).

@VitaliyBoyko
Copy link
Contributor

Hi @DmitryFurs

What is the use case for such data models?
I believe it requires modifying the constructor to forbidе instantiating a class with empty fields.
This seems to be quite a specific request, not needed for most developers.

Maybe I miss something in terms of recent best practices 🤔
Let me know if so. Thank you!

@VitaliyBoyko
Copy link
Contributor

By the way @anzin

We don't need to convert strings. AbstractDB returns them either way.
image

@VitaliyBoyko VitaliyBoyko self-assigned this Jan 20, 2021
Copy link
Contributor

@VitaliyBoyko VitaliyBoyko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment regarding strings.

@VitaliyBoyko VitaliyBoyko removed their assignment Jan 22, 2021
Copy link
Contributor

@coderimus coderimus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anzin thank you for the provided update. QA passed. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants