Commit Graph

1108 Commits

Author SHA1 Message Date
Ruben de Vries
68a6bd7fcd dialect/sql: add helpers for basic predicates for comparing 2 columns. (#1358) 2021-03-22 11:42:12 +02:00
Ariel Mashraki
6e3c3b6960 schema/field: add issue number to latest change (#1368) 2021-03-21 21:27:05 +02:00
Matthew Clemens
c1d7e8e480 schema/field: relax the Comparable result for TypeOther (#1304) 2021-03-21 14:44:20 +02:00
Rotem Tamir
ed14f1983c doc/website: fix formatting on gRPC blog (#1367) 2021-03-21 13:47:52 +02:00
Ariel Mashraki
0ed36ba188 doc/website: add social links to website (#1366) 2021-03-21 13:37:08 +02:00
Ariel Mashraki
970887b4d0 entc/gen/template: add extend-templates for all builders (#1364) 2021-03-20 21:46:15 +02:00
Ariel Mashraki
c84350a43a doc/website: few style changes for website logo (#1363) 2021-03-20 20:14:18 +02:00
Ariel Mashraki
693e8db207 entc/integration: set custom uuid identifier unique on database (#1362) 2021-03-20 18:33:04 +02:00
Ariel Mashraki
aee6785cba examples/entcpkg: add codegen-hook example (#1356) 2021-03-19 12:29:51 +02:00
Ariel Mashraki
4e60827cc0 doc/website/blog: move grpc image to s3 (#1353) 2021-03-19 11:24:56 +02:00
Rotem Tamir
fedce7b3c2 doc/website/blog: gRPC blog post (#1352) 2021-03-19 10:32:51 +02:00
Ariel Mashraki
b4ad29f7f3 dialect/sql/schema: fix postgres index migration (#1351)
Fix PostgreSQL index migration when table_name = type_name.
Closed #1344
2021-03-18 22:29:39 +02:00
Ariel Mashraki
14ed353ca9 dialect/sql: minor improvements to sql builder (#1343)
benchmark                                     old ns/op     new ns/op     delta
BenchmarkInsertBuilder_Default/default-16     6210          922           -85.15%

benchmark                                     old allocs     new allocs     delta
BenchmarkInsertBuilder_Default/default-16     86             16             -81.40%

benchmark                                     old bytes     new bytes     delta
BenchmarkInsertBuilder_Default/default-16     4098          1088          -73.45%
2021-03-17 14:36:09 +02:00
Ariel Mashraki
fc1a2a025c doc/annotation: add cascade deletion doc and example (#1340) 2021-03-16 15:55:36 +02:00
Ariel Mashraki
9685066b83 entc/gen: support on-delete annotation in migrate/schema 2021-03-16 15:29:21 +02:00
Ariel Mashraki
75c4ac189b dialect/entsql: add on-delete annotation 2021-03-16 15:29:21 +02:00
Ariel Mashraki
e92dfee33f entc/gen: filter duplicate ids when loading m2m edges 2021-03-16 08:44:27 +02:00
Ariel Mashraki
6ab0d01ea4 entc/gen: filter duplicate ids when loading o2m/m2o edges 2021-03-16 08:44:27 +02:00
Ariel Mashraki
0f7739d83b tutorial: finish the first graphql tutorial (#1332)
* tutorial: basic crud and node api for graphql tutorial

* Update doc/md/tutorial-todo-gql.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql-field-collection.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql-field-collection.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql-node.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql-field-collection.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql-node.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql-node.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* Update doc/md/tutorial-todo-gql-paginate.md

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>

* doc/tutorial: code review comments

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>
2021-03-15 11:30:09 +02:00
Ariel Mashraki
6c4d34e91b doc/crud: field selection for update 2021-03-14 23:17:30 +02:00
Ariel Mashraki
5d70144f44 entc/gen: allow selecting partial fields on update-one 2021-03-14 23:17:30 +02:00
Ariel Mashraki
0cd637ceb2 doc/faq: add examples how to extend the generated builders (#1335) 2021-03-14 14:13:02 +02:00
dilipkk-foyernet
c80af29605 Add "how to define custom types in external templates" doc to FAQ (#1308)
* Add custom types doc to faq

Added documentation on How to define custom types in external templates?

* Update faq.md

Update link for how-to-define-custom-types-in-external-templates
2021-03-14 13:44:50 +02:00
Ariel Mashraki
76ffcc4adc entc/gen: allow extending config options from global templates (#1334) 2021-03-14 12:21:42 +02:00
Ariel Mashraki
5a3e6e7e79 examples/entcpkg: fix package name shadowing (#1327) 2021-03-12 17:07:25 +02:00
Ariel Mashraki
c33512bb94 examples/entcpkg: add graph function to example (#1326) 2021-03-12 16:41:12 +02:00
Rotem Tamir
5645e39a23 doc/website/blog - announcing edge field support in v0.7.0 (#1324)
* doc/website/blog - announcing edge field support in v0.7.0

* Update doc/website/blog/2021-03-12-announcing-edge-field-support.md

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

* Update doc/website/blog/2021-03-12-announcing-edge-field-support.md

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

* Update doc/website/blog/2021-03-12-announcing-edge-field-support.md

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

* Update doc/website/blog/2021-03-12-announcing-edge-field-support.md

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

* Update doc/website/blog/2021-03-12-announcing-edge-field-support.md

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

* more fixes

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-03-12 13:07:19 +02:00
Rotem Tamir
36e3492718 dialect/sql/sqlgraph: adding unit tests for IsConstraintError (#1318)
* dialect/sql/sqlgraph: adding unit tests for IsConstraintError group of checks in second phase of #1310

* renaming test for loop variable names

* use backtick strings to improve readability
v0.7.0
2021-03-10 18:23:24 +02:00
Giau. Tran Minh
17608fffd4 doc/features: fix incorrect type in example (#1321) 2021-03-10 14:12:48 +02:00
Rotem Tamir
bc04816c38 entc/gen/template/dialect/sql: cleaning up isSQLConstraintError (#1319)
* entc/gen/template/dialect/sql: cleaning up isSQLConstraintError in generated ent.go to use new sqlgraph IsConstraintError checks.

Adding IsFK and IsUniqueness methods to the generated ent.ConstraintError (on SQL dialects) struct to allow users to glean more information about the specific constraint violation.

Fixes #1310

* fix indentation in tmpl file
regen files
rm new methods from generated code

* regen
2021-03-10 14:07:00 +02:00
森 優太
e52439c5be cmd/ent: fix //go:generate code generation to match go1.16 (#1300)
* doc: fix github link

* doc: fix Link entgo.io -> github.com/ent

* 🎉 first commit

* update go generate style

* doc: update go get to go install

* doc: update versioning with go install

* restore all

* change generate.go content

* add -mod=mod option

* add -mod=mod option
2021-03-09 22:00:33 +02:00
Ariel Mashraki
8e42041d4a doc/tutorial: update crud page 2021-03-09 21:51:53 +02:00
Ariel Mashraki
712d0e1b53 doc/tutorial: add skeleton and initial posts (#1317) 2021-03-09 21:44:03 +02:00
Rotem Tamir
2a17dba983 dialect/sql/sqlgraph: add constraint error checks (#1316)
Initial work on #1310
2021-03-09 15:56:47 +02:00
Ariel Mashraki
e48f2724f5 entc/gen: edge-tag annotation extends json tags (#1315)
Fixed #1302
2021-03-08 16:07:53 +02:00
Ariel Mashraki
a999d6c1b9 doc/edges: add link to github example (#1314) 2021-03-08 15:01:09 +02:00
Ariel Mashraki
00bb44f4b9 doc/edges: add section for edge-field and migration to it (#1313) 2021-03-08 14:46:31 +02:00
dependabot[bot]
753fbe118a build(deps): bump github.com/lib/pq from 1.9.0 to 1.10.0 (#1312)
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.9.0...v1.10.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-08 14:46:10 +02:00
Ariel Mashraki
c0fd7c1305 entc/gen: add edge-field api for schema and codegen (#1213) 2021-03-07 22:51:17 +02:00
Rotem Tamir
eeb5bc7141 adding follow twitter button and a link from the community section on the README.md (#1309) 2021-03-07 11:53:54 +02:00
Matthew Gabeler-Lee
c53b45ddb0 all: use %w instead of %v to wrap errors (#1275)
* all: use %w instead of %v for nested errors with fmt.Errorf

* all: update generated code to use %w instead of %v for error wrapping
2021-03-03 20:05:33 +02:00
Justin Page
51d19b8e5b doc: remove whitespaces from markdown files (#1267) 2021-03-03 13:02:50 +02:00
dependabot[bot]
86b77fe487 build(deps): bump github.com/olekukonko/tablewriter from 0.0.4 to 0.0.5 (#1299)
Bumps [github.com/olekukonko/tablewriter](https://github.com/olekukonko/tablewriter) from 0.0.4 to 0.0.5.
- [Release notes](https://github.com/olekukonko/tablewriter/releases)
- [Commits](https://github.com/olekukonko/tablewriter/compare/v0.0.4...v0.0.5)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-03 12:54:19 +02:00
dependabot[bot]
e7b5191b55 build(deps): bump github.com/spf13/cobra from 1.1.1 to 1.1.3 (#1298)
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.1.1 to 1.1.3.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.1.1...v1.1.3)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-03 12:54:06 +02:00
dependabot[bot]
fee01a26a9 build(deps): bump go.opencensus.io from 0.22.6 to 0.23.0 (#1297)
Bumps [go.opencensus.io](https://github.com/census-instrumentation/opencensus-go) from 0.22.6 to 0.23.0.
- [Release notes](https://github.com/census-instrumentation/opencensus-go/releases)
- [Commits](https://github.com/census-instrumentation/opencensus-go/compare/v0.22.6...v0.23.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-03 12:53:50 +02:00
dependabot[bot]
4c66c3185f build(deps): bump actions/setup-node from v2.1.4 to v2.1.5 (#1296)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from v2.1.4 to v2.1.5.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.1.4...46071b5c7a2e0c34e49c3cb8a0e792e86e18d5ea)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-03 12:53:38 +02:00
dependabot[bot]
735d6ddd40 build(deps): bump golangci/golangci-lint-action from v2.3.0 to v2.5.1 (#1295)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from v2.3.0 to v2.5.1.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v2.3.0...d9f0e73c0497685d68af8c58280f49fcaf0545ff)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-03-03 10:38:45 +02:00
Ariel Mashraki
3a64e2d20d entc/gen: use edge.owner for checking fk field (#1293)
See issue 1288
2021-03-02 17:42:52 +02:00
Ariel Mashraki
8a8bfe7de6 dialect/sql/sqlgraph: skip setting last-insert-id if was provided (#1291)
Fixed #1290. Issue in BulkCreate(<T>) for m2m edges
2021-03-02 11:59:20 +02:00
Ariel Mashraki
73df26b92b entc/gen: allow setting default-func for id fields (#1290) 2021-03-02 11:41:23 +02:00