Commit Graph

19 Commits

Author SHA1 Message Date
Ariel Mashraki
ee606f4e86 schema/field: add codegen header for template 2021-08-26 21:33:56 +03:00
Mohammed Salman
51ddb405fb schema/field: fix annotations doc example (#1878)
* schema/field: Fix annotation doc example

* Update numeric.tpl
2021-08-26 20:31:11 +03:00
Ariel Mashraki
8973af9b40 schema/field: add support for setting update default funcs to numeric fields (#1770)
* schema/field:add UpdateDefault to numeric (#1718)

* schema/field:fix comment

* schema/field: change interface to self type with DefaultFunc/UpdateDefault

* schema/field: change interface to self type with DefaultFunc/UpdateDefault

* schema/field: change interface to self type with DefaultFunc/UpdateDefault

* schema/field: add support for setting update default funcs to numeric fields

Co-authored-by: godcong <jumbycc@163.com>
2021-07-26 13:17:16 +03:00
Ariel Mashraki
c40ae45aee entc/gen: add support for summing custom Go numeric types 2021-06-25 17:30:17 +03:00
Ariel Mashraki
dd4792f5b3 go: rename module from github.com/facebook/ent => entgo.io/ent (#1226) 2021-02-02 23:03:04 +02:00
Pavel Kerbel
6d94d9e17c schema/field: add Comment field to Descriptor (#1173)
* schema/field: add Comment value to Descriptor

* schema/field: add Comment implementation
2021-01-18 09:36:28 +02:00
Ariel Mashraki
f2aa1854e4 schema/field: generate numeric builder with new godoc 2021-01-10 14:28:12 +02:00
Morgan
e4cc63c411 schema/field: add DefaultFunc for numeric types and add support for it in entc (#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
2021-01-10 14:05:45 +02:00
Ariel Mashraki
1b5f51b827 schema: shared annotation interface for schema objects (#813) 2020-10-03 16:51:00 +03:00
Ariel Mashraki
54f0a6769b schema/field: add annotation option to schema field (#622) 2020-07-19 18:01:04 +03:00
Ariel Mashraki
9e0d5755ef schema/field: add GoType option for float fields (#534) 2020-06-09 08:20:54 +03:00
Ariel Mashraki
59b880a6ba schema/field: add GoType option for int fields (#528) 2020-06-07 15:58:56 +03:00
Ariel Mashraki
cfee55e514 schema/field: add an option to configure the database type (#484) 2020-05-11 15:07:33 +03:00
Alex Snast
b34c955739 ent/entc: adding NonNegative predicate to signed int types
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/179

Reviewed By: a8m

Differential Revision: D18617566

fbshipit-source-id: ab5ced97836d05ee5936b39f571063cf618b3481
2019-11-20 10:11:58 -08:00
Ariel Mashraki
c3955a08f1 schema/field: json type support (#38)
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/38

Only `IsNil` and `NotNil` predicates are supported this moment

Reviewed By: alexsn

Differential Revision: D17444976

fbshipit-source-id: 37336fa0bc7749af995933baee2e23bb7366dd78
2019-09-19 05:00:11 -07:00
Ariel Mashraki
624ecd2cc7 schema/field: add storage-key option
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/35

Reviewed By: alexsn

Differential Revision: D17394930

fbshipit-source-id: bc9d8cc6569ad457b93d47d26d143f2442f98df9
2019-09-16 04:39:17 -07:00
Ariel Mashraki
bd07c86b60 all: add license header to all go files
Summary:
Used addlicense to generate this:
 addlicense -c "Facebook Inc" -f license_header .

example was taken from: https://github.com/facebook/litho/blob/master/lib/soloader/BUCK

Reviewed By: alexsn

Differential Revision: D17070152

fbshipit-source-id: e7b91398d7f6181727be3400c1872ad5f28e38ed
2019-08-27 04:48:28 -07:00
Ariel Mashraki
3e7270e835 ent/schema: change ent interafces for descriptor only
Summary: wip

Reviewed By: alexsn

Differential Revision: D17052576

fbshipit-source-id: 165faca2ff02c22bb76f164d81d406ce46ab04c4
2019-08-27 03:58:25 -07:00
Ariel Mashraki
f519a5465e schema/field: add builder per numeric type
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/21

Reviewed By: alexsn

Differential Revision: D16936906

fbshipit-source-id: 06f5721ed0088107cf42382731f8b7282f22eef7
2019-08-21 08:00:01 -07:00