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

schema: add DefaultFunc for numeric types and add support for it in entc #1153

Merged
merged 6 commits into from
Jan 10, 2021
Merged

schema: add DefaultFunc for numeric types and add support for it in entc #1153

merged 6 commits into from
Jan 10, 2021

Conversation

thehowl
Copy link
Contributor

@thehowl thehowl commented Jan 8, 2021

Closes #1146.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 8, 2021
@a8m a8m self-requested a review January 8, 2021 12:11
doc/md/schema-fields.md Outdated Show resolved Hide resolved
entc/load/schema_test.go Outdated Show resolved Hide resolved
schema/field/numeric.go Show resolved Hide resolved
Copy link
Member

@a8m a8m left a comment

Choose a reason for hiding this comment

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

Minor comments. Please fix them and I'll merge it.

schema/field/field_test.go Outdated Show resolved Hide resolved
doc/md/schema-fields.md Outdated Show resolved Hide resolved
Copy link
Member

@a8m a8m left a comment

Choose a reason for hiding this comment

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

Wonderful! Thanks a lot for your contribution @thehowl 😃

@a8m a8m merged commit e4cc63c into ent:master Jan 10, 2021
cliedeman pushed a commit to cliedeman/ent that referenced this pull request Feb 6, 2021
…t in entc (ent#1153)

* entc/load: allow defaultfuncs on numeric types

* schema/field: add DefaultFunc on numeric types

* docs: document DefaultFunc better

* chore: update generated files

* pr: address issues

* docs: updates on faq, address requested changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

proposal: enable setting a DefaultFunc on a numeric type
3 participants