Skip to content
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

Ignore Columns #47

Closed
flycash opened this issue Oct 28, 2021 · 2 comments
Closed

Ignore Columns #47

flycash opened this issue Oct 28, 2021 · 2 comments
Assignees
Labels
Milestone

Comments

@flycash
Copy link
Contributor

flycash commented Oct 28, 2021

English Only

Please check existing issues first to avoid duplication and answer the questions below before submitting your issue.

Use case(s)

(Please state use cases, what problem will this feature solve?)

Sometimes users define a complicate structure but some of its fields should not be inserted into databases. It indicates one thing: some fields can not be mapped to columns.

In some small applications, users do not use entity or PO. They only have one layer named model, and they use models in their business code as well as DAO.

So we need to allow users to declare that they want EQL to ignore some field.

Proposed Solution

(Please describe your proposed design/solution, if any)

We already have a MetaRegistry named tagMetaRegistry, so we can use the syntax: eql:"-" to ignore the columns. Besides, we need to provide an option to ignore some fields when users register models.

Alternatives Considered

(Other possible options for solving the problem?)

Additional Context

(Paste any relevant logs - please use code blocks (```) to format console output,
logs, and code as it's very hard to read otherwise.)

(If you can, link to the line of code that might be helpful to explain the context)

@flycash flycash added this to the 0.0.1 - CURD milestone Oct 28, 2021
@Codexiaoyi
Copy link
Collaborator

In the option that ignore some fields, we can compare field name of user input and field name of 'TableMeta' to ignore some fields.
I think i can do it.

@Codexiaoyi Codexiaoyi self-assigned this Dec 8, 2021
@Codexiaoyi
Copy link
Collaborator

Add ignore column examples.

@flycash flycash closed this as completed Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants