Commit Graph

60 Commits

Author SHA1 Message Date
Ariel Mashraki
25021635a0 doc/fields: document default values using annotations 2022-11-12 14:38:33 +02:00
Cyril Brulebois
9ff209d1f3 doc: remove executable flag for md, mdx, png, js, and .gitignore files (#3015)
Spotted by lintian running against a Debian package: the executable flag
is strange for all those files in the doc directory.
2022-10-16 16:47:56 +03:00
Ariel Mashraki
b18ca9ca6f schema/edge: allow setting immutable edges (#2876) 2022-08-20 19:10:16 +03:00
Ariel Mashraki
2c63d1d70e all: gofmt -w -r 'interface{} -> any' (#2874) 2022-08-19 18:23:04 +03:00
Ariel Mashraki
757fc94985 doc/md: trigger master build 2022-08-13 20:17:44 +03:00
Ariel Mashraki
8fc8d65a16 doc/fields: add section for nillable-required fields 2022-08-13 20:12:28 +03:00
Will Bicks
cd1afb235c entc: improve generated comments for edges and fields (#2632)
* replace default field comment with user comment if defined
* use comments defined on edges in generated entities
* add docs for comment method on edges and fields
* update integration to reflect above changes
2022-06-13 15:52:47 +03:00
Ariel Mashraki
4919889eb4 doc/fields: add example for json default values 2021-10-22 16:09:25 +03:00
Giau. Tran Minh
2a40f27b2b doc/md: update MaxRuneCount example (#1915)
* doc/md: update MaxRuneCount example

Update MaxRuneCount example with entsql.Annotation. 

https://github.com/ent/ent/issues/1856
https://github.com/ent/ent/issues/1914

* update custom validator description

* Update doc/md/schema-fields.md

Co-authored-by: MasseElch <12862103+masseelch@users.noreply.github.com>

* Update doc/md/schema-fields.md

Co-authored-by: MasseElch <12862103+masseelch@users.noreply.github.com>

* Update doc/md/schema-fields.md

Co-authored-by: MasseElch <12862103+masseelch@users.noreply.github.com>

Co-authored-by: MasseElch <12862103+masseelch@users.noreply.github.com>
2021-09-05 15:19:39 +03:00
Yoni Davidson
53d7c330e6 md/fields: fix code typo in Enum example (#1887) 2021-08-30 11:12:17 +03:00
Yoni Davidson
5adcb6b376 md/fields: clarify enum fields usage (#1886)
* basic run

* show example on mysql

* clean

* small fixes

* fix comments

* Apply suggestions from code review

PR review suggestions.

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
Co-authored-by: Giau. Tran Minh <giau.tmg@gmail.com>

* Update doc/md/schema-fields.md

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
Co-authored-by: Giau. Tran Minh <giau.tmg@gmail.com>
2021-08-30 10:07:22 +03:00
Amit Shani
60e726812b schema/field: add NotEmpty built-in validator to bytes fields (#1869)
* added MaxLen built-in validator to `[]byte`

* typo

* move test to type_test.go

* Update doc/md/schema-fields.md

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>

* added min len validator to bytes

* fix tests
go generate

* CR

* add not empty validator

* CR

* doc/md:  add doc on `NotEmpty` bytes validator

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-08-24 14:47:15 +03:00
Amit Shani
ac0bd65145 schema/field: add MinLen built-in validator to bytes fields (#1867)
* added MaxLen built-in validator to `[]byte`

* typo

* move test to type_test.go

* Update doc/md/schema-fields.md

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>

* added min len validator to bytes

* fix tests
go generate

* CR

* CR

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-08-24 14:07:29 +03:00
Amit Shani
ad792fe79e schema/field: add MaxLen built-in validator to bytes fields (#1863)
* added MaxLen built-in validator to `[]byte`

* typo

* move test to type_test.go

* Update doc/md/schema-fields.md

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-08-24 10:23:43 +03:00
Zeev Manilovich
5aaa7736ee doc/schema-fields: make enum example clearer (#1842) 2021-08-15 16:03:00 +03:00
Ariel Mashraki
560560a7a0 doc/schema-fields: fix incorrect support for UUID type 2021-07-09 15:40:29 +03:00
Ariel Mashraki
fe5d98aae1 doc/schema-fields: add example for id with custom storage-key 2021-07-09 09:54:12 +03:00
Ariel Mashraki
dbce277b68 doc/schema-fields: fix grammar errors (#1686) 2021-07-04 13:18:30 +03:00
Ariel Mashraki
01e27a88bf doc/md: add example for decimal type using gotype 2021-06-10 17:55:25 +03:00
Ariel Mashraki
745afde770 dialect/entsql: add support for column default using annotation
Fixed #1033
2021-04-03 21:53:56 +03:00
Ariel Mashraki
d9faf21e05 doc/website: migration to docosaurus v2 (#1384)
* WIP - migrating entgo.io to docosaurus v2

* organizing pages a bit to be better suited for v2 site structure

* doc/website: finish migration to docusaurus v2

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>
2021-03-24 21:48:30 +02:00
Ariel Mashraki
712d0e1b53 doc/tutorial: add skeleton and initial posts (#1317) 2021-03-09 21:44:03 +02:00
Ariel Mashraki
b2f6834f67 doc: change assets path from s3 to entgo.io 2021-02-17 10:25:10 +02:00
Ariel Mashraki
dd4792f5b3 go: rename module from github.com/facebook/ent => entgo.io/ent (#1226) 2021-02-02 23:03:04 +02:00
Ariel Mashraki
027d72e5e0 doc/website: use s3 uri before migrating website (#1224)
This is a temporary change and will be reverted after the website will be migrated to its new place
2021-02-01 10:48:15 +02:00
Ariel Mashraki
3930d3c835 schema/field: implement field.Other (#1218)
* Implement Other Field

* Implement Other Field

* Changed dialect types

* run generate

* doc typo

* docs added

* schema/field: additional validation and tests for Other type

Co-authored-by: Ciaran Liedeman <ciaran@stackworx.io>
2021-01-31 17:43:28 +02:00
Ariel Mashraki
e62e5c26be doc/faq: minor changes for default-func 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
Andy Day
8eda87dbc3 doc: update documentation to include naming convention (#1144)
* Update documentation to include naming convention

This change relates to my question in #1107 around naming convention for fields / edges. As a bonus, I added documentation around the StructTag method for edges, as seemed to be omitted.

* s/camel/Pascal/g
2021-01-07 23:58:38 +02:00
Ariel Mashraki
ad3efa7477 doc/schema: add default-func example for schema fields (#1127) 2021-01-04 22:54:16 +02:00
Ariel Mashraki
6355f5dac3 doc/fields: fix typo in storage-key example (#1087) 2020-12-27 13:43:22 +02:00
Ariel Mashraki
5f44fdf78b doc: add enum to go-type example (#1059) 2020-12-18 14:47:11 +02:00
Ariel Mashraki
d0b41ab0f6 doc: rename cmd entc to ent (#997) 2020-11-29 10:43:16 +02:00
Ariel Mashraki
8fbd96cf38 doc: add example for uuid default value (#996) 2020-11-29 10:38:23 +02:00
Roger Ng
69a9122162 doc: add rune length validator example (#814)
* doc: add rune length validator example

* doc: update reusable validator

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>

* doc: fix missing code section end

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2020-10-04 21:10:17 +03:00
Ariel Mashraki
f9be692353 doc: add NotEmpty to string validators (#802) 2020-09-28 21:02:23 +03:00
Ariel Mashraki
2b78d1d9af doc: add more info to getting-started summary (#787) 2020-09-21 15:59:23 +03:00
Ariel Mashraki
a7bb5346a4 doc: add uuid to schema fields (#786) 2020-09-21 13:08:33 +03:00
Justin Page
e9ae2072ea doc: use pkg.go.dev for documentation links (#681)
pkg.go.dev serves Go documentation. However, it also understands modules
and has information about past versions of a package. Later this year
godoc.org will be redirected to pkg.go.dev.

Let's use this subdomain going forward when linking Go documentation.

Reference: https://blog.golang.org/pkg.go.dev-2020
2020-08-22 13:11:36 +03:00
Ariel Mashraki
fd0a7f9f02 all: facebookincubator/ent => facebook/ent (#660)
ent repository is going to be migrated to facebook organization
2020-08-18 11:05:08 +03:00
Ariel Mashraki
2a0c219f9d doc: add schema and template annotations (#657)
And add gotemplate to highlight.js as a custom language
2020-08-04 22:14:00 +03:00
Ariel Mashraki
9a47fea02c doc: add documentation for go-type option (#536) 2020-06-09 11:39:32 +03:00
Ariel Mashraki
daf658e265 doc: add documentation for schema-type option (#487) 2020-05-11 19:55:10 +03:00
Ariel Mashraki
310f5c7fb4 doc: add documentation and examples for id field (#349) 2020-02-16 17:27:08 +02:00
zjl233
7f8c2249d3 doc: fix a doc error (#339) 2020-02-11 14:01:55 +02: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
17cd619c2a doc: add missing import to fields example
Reviewed By: alexsn

Differential Revision: D18058307

fbshipit-source-id: 752b8dc1c5f97947ce59d79c1ed27e57b2a216f7
2019-10-22 01:31:29 -07:00
Ariel Mashraki
c5b790043c entc: change the way we inject additional fields (#1560)
Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1560

Pull Request resolved: https://github.com/facebookincubator/ent/pull/96

Reviewed By: alexsn

Differential Revision: D17931147

fbshipit-source-id: 24e1d72be482cb787c557f46feeb2ed4a31dfe60
2019-10-15 12:00:46 -07:00
Ido Shveki
3d0d8724b0 ent/schema: adding sensitive fields support (#75)
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/75

Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1539

Supporting "Sensitive" mode for string fields.

Reviewed By: a8m

Differential Revision: D17786543

fbshipit-source-id: a4d022c1436472cb525cdd50663dd0ce23d13699
2019-10-07 07:46:28 -07:00
Ariel Mashraki
8b9e5cd7d0 ent/doc: add enum field type to docs
Reviewed By: alexsn

Differential Revision: D17737409

fbshipit-source-id: b12c2a3b5da7b4ca06818785d55dfeda0a2e85f1
2019-10-03 06:25:10 -07:00