Commit Graph

2023 Commits

Author SHA1 Message Date
Journey K
c07eff2260 doc: fix typo in versioned migrations instructions(#3200) 2023-01-01 08:53:52 +02:00
Shani
1a0ffe6441 doc: change newsletter link to Substack (#3195)
Co-authored-by: Shani Cohen <shanicohen@Shanis-MacBook-Air.local>
2022-12-28 10:58:55 +02:00
Pedro Henrique
8307c2eaba entc/gen: copies interceptors on Clone (#3194) 2022-12-28 06:29:48 +02:00
Ariel Mashraki
c868f4a174 doc: add entsql.WithComments annotation (#3192) 2022-12-26 16:56:49 +02:00
Ariel Mashraki
136807549d dialect/entsql: supports setting SQL column comments (#3191)
* feat: Add column comment in SQL DDL, using EntSQL annotations to achieve it.

* Update annotation.go

* fix lint

* Add table primary key column comment

* entsql.Comment(string)  is unnecessary

* entc/gen: minor changes to entsql.WithComments + add tests

Co-authored-by: chenghonour <wantto@outlook.com>
2022-12-26 14:48:37 +02:00
Dany Henriquez
038cc0cace Fix documentation (Remove deprecated call) (#3181) 2022-12-22 12:21:26 +02:00
Ariel Mashraki
33478c5fca examples/jsonencode: skip nodes without edges in template (#3187) 2022-12-21 15:43:51 +02:00
Ariel Mashraki
92bacc10e4 entc/gen: add typed traversers and interceptors (#3182) 2022-12-20 11:12:19 +02:00
Ariel Mashraki
34bd0b7b6f entc/gen: move mutation hooks logic to a shared generic function (#3180) 2022-12-19 17:36:29 +02:00
Yoni Davidson
4e662b9e51 doc/md: update join community page (#3178) 2022-12-19 15:18:53 +02:00
Giau. Tran Minh
2d01111f48 doc/md: create edges with mutation (#3170)
* doc/md: create edges with mutation

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

* fix: move new content to the end

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

* chore: apply suggestions from code review

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

Signed-off-by: Giau. Tran Minh <hello@giautm.dev>
Co-authored-by: Hila Kashai <73284641+hilakashai@users.noreply.github.com>
2022-12-19 15:12:28 +02:00
Ariel Mashraki
68a4533574 entc/gen: use new sql predicates to reduce codegen size (#3179) 2022-12-19 11:40:39 +02:00
Ariel Mashraki
f226627d67 ent: export query interceptors (#3157) 2022-12-19 10:17:10 +02:00
Ariel Mashraki
3328201ba8 go: update ariga.io/atlas version (#3169) 2022-12-12 22:08:03 +02:00
Andy Day
63c123f36c schema: add Comment annotation (#3164)
* Add schema.CommentAnnotation (resolves #3155)

Adds new mechanism for customizing a model's godoc comment in code (via an Annotation).

* feedback
2022-12-10 23:30:45 +02:00
dependabot[bot]
dcc16c5763 build(deps): bump github.com/go-sql-driver/mysql from 1.6.0 to 1.7.0 (#3148)
Bumps [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/go-sql-driver/mysql/releases)
- [Changelog](https://github.com/go-sql-driver/mysql/blob/master/CHANGELOG.md)
- [Commits](https://github.com/go-sql-driver/mysql/compare/v1.6.0...v1.7.0)

---
updated-dependencies:
- dependency-name: github.com/go-sql-driver/mysql
  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>
2022-12-09 21:19:13 +02:00
Ariel Mashraki
d0c5afa705 entc/gen: make generated client to implement the ent.Mutator interface (#3161) 2022-12-09 21:18:25 +02:00
Pedro Henrique
3f4916ff8b dialect/sql/schema: fix issue with WriteDriver when using Postgres with Query (#3162) 2022-12-09 21:08:55 +02:00
Christopher Schmitt
d7f2f3a098 entc/gen: add driver as a reserved field word (#3158) 2022-12-09 08:08:30 +02:00
Bumsik Kim
d5aa8d20f8 doc: tutorial typo fix (#3153)
* doc/md: Fix import path in example

* doc/md: Fix old contrib package doc path
2022-12-08 08:47:20 +02:00
Pedro Henrique
0f20a3d007 entc/integration: test with Postgres 15 (#3152) 2022-12-07 11:55:06 +02:00
mori yuta
b3ef46d768 doc: fix typo on versioned migration tutorial (#3139)
* fix typo

codegn -> code-gen

* Update doc/md/versioned/07-verifying-safety.md

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2022-12-07 11:52:35 +02:00
Ariel Mashraki
381483e45c entc/gen: remove unnecessary sqlgraph.To step on HasE predicates (#3144)
Predicate that checks existence-only do not need the 'other' table
2022-12-04 13:15:16 +02:00
Ariel Mashraki
3f1d7c960e example: add jsonencode using extension (#3142) 2022-12-04 10:38:23 +02:00
mori yuta
f40fff0f5c doc/md: corrected design deviations in the text. (#3138) 2022-12-03 08:35:08 +07:00
Ariel Mashraki
f1205ce95f entc/gen: remove driver specific implementation for Exist (#3136) 2022-12-01 17:39:52 +02:00
Rotem Tamir
fe5727df4a doc/website/blog: rename zero downtime blog (#3135) 2022-12-01 16:05:16 +02:00
Ronen Lubin
d2ecb487d2 doc/website/blog: add new blog post (#3132) 2022-12-01 15:25:06 +02:00
Ariel Mashraki
122574376b dialect/sql: add except and intersect to builder (#3127)
* dialect/sql: add except and intersect for builder

* dialect/sql: report an error in case INTERSECT/EXCEPT ALL were set in SQLite

Co-authored-by: Liooo <ryoyamada3@gmail.com>
2022-11-28 14:54:59 +02:00
Pedro Henrique
397afc3d85 dialect/sql/schema: avoid setting the primary key when no primary key is present (#3114)
* dialect/sql: avoid setting the primary key when no primary key is present

* fix tests

* adds comment
2022-11-28 06:48:00 +02:00
VTRyo
bc931edddf doc/md: change example file path (#3124) 2022-11-27 14:36:38 +02:00
Ariel Mashraki
f7109f0274 dialect/sql/schema: make WriteDriver friendlier (#3119)
Also, add a guide for writing and executing data migrations files.
2022-11-27 13:27:15 +02:00
cheny-alf
2840921231 dialect/sql: fix escape issue occurred in fuzzy testing (#3115)
* fix(builder):fix escape method

* fix(builder):fix escape method

Co-authored-by: chenfuqing <chenfuqing@laiye.com>
2022-11-26 13:26:14 +02:00
Karsten Köhler
05de3fb096 doc/md: fix typo in Atlas link (#3116) 2022-11-26 11:14:05 +02:00
Ariel Mashraki
b6a475f066 entc/gen: skip generating edge-schema unique indexes if defined 2022-11-23 18:56:02 +02:00
Ariel Mashraki
2d980550db doc/edges: document the new edges behavior 2022-11-20 17:37:08 +02:00
Ariel Mashraki
f46dd7ace8 dialect/sql/sqlgraph: add support for edge-schema in create-bulk 2022-11-20 17:37:08 +02:00
Ariel Mashraki
aa3d21f01a dialect/sql/sqlgraph: changing the M2M creation semantic from Add to Connect
Thus, calling AddE with the same edge values, ignore and not throw an error.
For edge-schemas with extra fields, we maintain the same logic because we cannot
determine if the extra fields have different values that what exist in the database
2022-11-20 17:37:08 +02:00
dependabot[bot]
4c9d61cf16 build(deps): bump go.opencensus.io from 0.23.0 to 0.24.0 (#3074)
Bumps [go.opencensus.io](https://github.com/census-instrumentation/opencensus-go) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/census-instrumentation/opencensus-go/releases)
- [Commits](https://github.com/census-instrumentation/opencensus-go/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: go.opencensus.io
  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>
2022-11-19 22:24:05 +02:00
dependabot[bot]
fe1ebc55ab build(deps): bump golangci/golangci-lint-action from 3.3.0 to 3.3.1 (#3091)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from 3.3.0 to 3.3.1.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v3.3.0...v3.3.1)

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

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>
2022-11-19 22:23:44 +02:00
dependabot[bot]
dfb675bf32 build(deps): bump loader-utils from 2.0.0 to 2.0.4 in /doc/website (#3097)
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 2.0.0 to 2.0.4.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v2.0.4/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v2.0.0...v2.0.4)

---
updated-dependencies:
- dependency-name: loader-utils
  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>
2022-11-19 22:23:27 +02:00
Ariel Mashraki
4dd6b5bb74 entc/gen: minor imporvements to make goimports work easier (#3106) 2022-11-18 22:54:17 +02:00
Ariel Mashraki
da9322fd2e entc/gen: remove unnecessary import from templates (#3105) 2022-11-18 21:45:48 +02:00
Ariel Mashraki
209d446859 Delete .bencher directory (#3103) 2022-11-18 21:45:34 +02:00
Rotem Tamir
a5aadd7737 doc/md/versioned: fixes to tutorial (#3102) 2022-11-17 11:04:53 +02:00
Ariel Mashraki
5954fa8b15 dialect/sql/schema: normalize ent/schema (desired state) on replay mode (#3100) 2022-11-16 20:01:36 +02:00
Rotem Tamir
cd60f84853 doc/md/versioned: upgrading to versioned migrations (#3095) 2022-11-16 10:59:06 +02:00
Ariel Mashraki
8a8c72f377 example/migration: improve atlas migration example (#3092) 2022-11-14 13:58:35 +02:00
Ariel Mashraki
891fc8fecf dialect/sql/schema: support setting default value expressions on id fields (#3089) 2022-11-13 18:55:04 +02:00
Ariel Mashraki
53bdc325c0 entc/gen/schemaconfig: set alternate edge-schema names from config (#3087)
Fixed https://github.com/ent/ent/issues/3082
2022-11-12 21:42:57 +02:00