Commit Graph

2286 Commits

Author SHA1 Message Date
Ariel Mashraki
71e31bc0d7 doc: add entgql.MultiOrder annotation (#3342) 2023-02-22 19:50:21 +02:00
Travis Cline
4abb259989 cmd/ent: Attach Funcs for ent new templates (#3336) 2023-02-21 06:57:31 +02:00
Rotem Tamir
eeccc754d3 doc/md: updating versioned migrations tutorial (#3334)
* doc/md: updating versioned migrations tutorial

* Apply suggestions from code review

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

---------

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>
2023-02-20 17:10:10 +02:00
Rotem Tamir
102f60ac12 cmd/internal/base: fix type on print sub-command (#3335) 2023-02-20 13:52:09 +02:00
Ariel Mashraki
4432754144 doc: add migrate diff command to in-depth section (#3330) 2023-02-19 16:39:02 +02:00
Ariel Mashraki
639e1093a0 doc: upadte migrate diff command (#3329)
* doc: upadte migrate diff command

* Update doc/md/components/_installation_instructions.mdx

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

* Update doc/md/getting-started.mdx

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

* Update doc/md/getting-started.mdx

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

* Update doc/md/getting-started.mdx

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

* Update doc/md/getting-started.mdx

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

* Update doc/md/getting-started.mdx

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

* Update doc/md/getting-started.mdx

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

* Update doc/md/getting-started.mdx

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

* Update doc/md/getting-started.mdx

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

* Update doc/md/getting-started.mdx

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>

* Update doc/md/versioned-migrations.mdx

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

* Update doc/md/versioned-migrations.mdx

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

---------

Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>
Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>
2023-02-19 16:20:59 +02:00
Rotem Tamir
e671138bb8 doc/md/tutorial: ext grpc service example (#3323) 2023-02-16 23:57:15 +02:00
Ariel Mashraki
bd6f26aa7c dialect/sql/schema: allow configuring Atlas to return ErrNoPlan (#3322) 2023-02-16 21:56:51 +02:00
Ariel Mashraki
8a31204259 entc/gen: reduce codegen lines (#3321) 2023-02-16 14:19:54 +02:00
Ariel Mashraki
770bb0f1a2 entc/gen: merge generate config.go file with client.go (#3319) 2023-02-16 12:08:41 +02:00
Ariel Mashraki
4e05f76717 dialect/sql: minor changes to allow using Migrate externally (#3316) 2023-02-14 15:06:36 +02:00
Ariel Mashraki
4c87e262a6 dialect/sql/schema: use the Atlas as state reader (#3314) 2023-02-14 10:20:34 +02:00
Zhizhen He
7aea5a82bc golangci: remove deprecated linters (#3315) 2023-02-14 08:18:03 +02:00
blukai
fc28e223f8 go: update ariga.io/atlas (#3313)
For https://github.com/ent/ent/pull/3310
2023-02-13 16:47:29 +02:00
Giau. Tran Minh
f4bdc36e85 cmd/ent: rename init to new (#3311)
* cmd: rename init to new

Signed-off-by: Giau. Tran Minh <hello@giautm.dev>

* doc: update guide to use new command

Signed-off-by: Giau. Tran Minh <hello@giautm.dev>

---------

Signed-off-by: Giau. Tran Minh <hello@giautm.dev>
v0.11.8
2023-02-12 13:56:18 +02:00
blukai
349b950978 dialect/sql/schema: ensure consistency of NotCleanError (#3310)
* dialect/sql/schema: ensure consistency of NotCleanError

For https://github.com/ariga/atlas/pull/1454

* get rid of cerr var

https://github.com/ariga/atlas/pull/1454#discussion_r1102391750
2023-02-10 13:25:53 +01:00
Noam Cattan
cf2428d49a doc: add an instruction to create a migrations directory (#3308)
* Update versioned-migrations.mdx

* Update versioned-migrations.mdx
2023-02-07 16:25:06 +02:00
Ariel Mashraki
baec350ed4 entc/gen: support type-based matching for edge-schema columns (#3306)
In case of no match by foreign-keys, we search by edge-type. This can happen if the type (edge owner)
is named T, but the edge-schema E names its edge field as u_id. We consider it as a match if
there is only one usage of T in E.
2023-02-07 10:58:20 +02:00
Ariel Mashraki
939c7cff1a entc/gen: reduce the usage of DISTINCT in queries (#3305)
Most queries are not graph traversals but rather regular table scans,
in which case the DISTINCT clause is not needed as duplicates cannot be
returned (unless query was modified by the user).
2023-02-06 22:40:50 +02:00
Ariel Mashraki
138bd2bc1d entc/gen: <T>Query.IDs should not return duplicates (#3304) 2023-02-06 21:19:05 +02:00
Ariel Mashraki
8022271f12 entc/integration: add example for composite unique index (#3302) 2023-02-06 11:17:33 +02:00
KaiserBh
9881f575ce doc/graphql: fix typo (#3299) 2023-02-06 11:17:18 +02:00
Ariel Mashraki
0e6ef32505 dialect/sql/sqlgraph: add update spec builder (#3301) 2023-02-06 07:13:06 +02:00
dependabot[bot]
ca7408e81c build(deps): bump http-cache-semantics in /doc/website (#3297)
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](https://github.com/kornelski/http-cache-semantics/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-04 11:31:33 +02:00
Omar Kohl
331ec4e3ce doc/md: fix broken privacy.md links (#3296)
privacy.md was renamed to privacy.mdx in commit f226627d67.

When trying to click on one of the 'privacy' links on the features page
you get the following error:

    <Error>
    <Code>AccessDenied</Code>
    <Message>Access Denied</Message>
    <RequestId>15DQ15S3VAEQA8PW</RequestId>
    <HostId>
    HxNShnveIK1dyPbqjFK/v7/x/VqKyysl4XWBPiEr75PgLkjl0CZjWN0PRzQcFMI0uZWPOpHS49Q=
    </HostId>
    </Error>
2023-02-03 14:11:45 +02:00
Ariel Mashraki
92cc7438f7 dialect/sql/sqlgraph: add deletion spec builder (#3291) 2023-02-01 11:55:00 +02:00
Ariel Mashraki
cb2f75932f entc/gen: change typo from Use to Intercept (#3290) 2023-02-01 11:43:17 +02:00
Giau. Tran Minh
e49d88379a ent/entc: add HCL as initialism (#3289) 2023-01-31 17:36:38 +07:00
Ariel Mashraki
037b5a4bc3 dialect/sql/sqlgraph: add builders to create spec (#3288) 2023-01-31 09:37:51 +02:00
Ariel Mashraki
a0fad09539 entc/gen: remove unnecessary function from codegen (#3287) 2023-01-30 18:32:25 +02:00
Ariel Mashraki
d11122592a entc/gen: add support for UpdateOne with predicates (#3286) 2023-01-29 13:09:16 +02:00
Aman Bansal
ec7af8774c doc/md: updated comment in crud api update many section (#3285) 2023-01-29 09:30:19 +02:00
dependabot[bot]
624f64324a build(deps): bump ua-parser-js from 0.7.31 to 0.7.33 in /doc/website (#3282)
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.31 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.31...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-27 11:13:22 +02:00
Pedro Henrique
56c16b25ef entc/gen: allow setting UpdateDefault without Default (#3276)
* entc/gen: ensure UpdateDefault is generated

* apply suggestions from PR

* Apply suggestions from code review

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

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2023-01-26 18:09:09 +02:00
Rotem Tamir
c14905c769 doc/website/blog: visualizing schemas with entviz (#3279) 2023-01-26 16:52:55 +02:00
Ariel Mashraki
433609444c dialect/sql/sqljson: support for order by value and length (#3278) 2023-01-26 12:20:31 +02:00
Pedro Henrique
604c4942a4 dialect/sql: improve support for subqueries (#3274) 2023-01-26 09:43:07 +02:00
dependabot[bot]
5e852a16f7 build(deps): bump golangci/golangci-lint-action from 3.3.1 to 3.4.0 (#3269)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.3.1...v3.4.0)

---
updated-dependencies:
- dependency-name: golangci/golangci-lint-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
v0.11.7
2023-01-24 15:10:37 +02:00
Ariel Mashraki
d66350ae40 entc/gen: add support for DeleteOne with predicates (#3271)
Also, fixed a bug in DeleteOne.Exec where it was skipping NotFoundError
2023-01-24 15:10:20 +02:00
Ariel Mashraki
b95c3c5251 examples: go generate (#3270) 2023-01-24 10:09:02 +02:00
Ariel Mashraki
307eb5e30b doc/edges: add erds to examples (#3268) 2023-01-23 15:53:33 +02:00
sisterdong
c9445d2794 entc/gen: make interceptor works for eager loading m2m edges (#3257)
* entc/gen: make interceptor works for eager loading m2m edges

* entc/gen: make interceptor works for eager loading m2m edges

* entc/gen: fix indent

* entc/gen: go generate example
2023-01-23 15:42:08 +02:00
Ariel Mashraki
6db3e0a59b entc/load: better error reporting for import cycles (#3266) 2023-01-22 18:36:22 +02:00
Ariel Mashraki
8ca8f682a4 go: update ariga.io/atlas (#3260) v0.11.6 2023-01-19 17:12:15 +02:00
Ariel Mashraki
7ed84a86a8 dialect/sql/schema: skip destructive table changes (#3253)
This will be fixed also in Atlas, but having this extra safety here feels safer
2023-01-19 15:33:17 +02:00
Ariel Mashraki
a85377846f doc/versioned: more examples on how to install and execute migrate lint (#3249) 2023-01-17 16:30:27 +02:00
Ariel Mashraki
990bf269ff examples/encryptfield: add an example using go.cloud (#3246) 2023-01-16 11:48:09 +02:00
Travis Cline
cb320767c4 entc/load: return errors from all loaded packages (#3243) 2023-01-16 10:59:49 +02:00
Ariel Mashraki
c5e08f20c1 doc/interceptors: document ent.QueryContext usage 2023-01-14 22:47:54 +02:00
Ariel Mashraki
ef0427550f ent: add additional fields to QueryContext 2023-01-14 22:47:54 +02:00