Commit Graph

1654 Commits

Author SHA1 Message Date
Ariel Mashraki
feac4d8536 doc/indexes: add annotations supported by atlasgo.io 2022-02-22 16:55:07 +02:00
Ariel Mashraki
36a1063c7e entc/integration/migrate: add FULLTEXT usage example 2022-02-22 16:24:30 +02:00
Ariel Mashraki
fe2511fc8d dialect/entsql: add support for index-type annotation 2022-02-22 16:24:30 +02:00
MasseElch
d80f7cc41a entc/gen: singularize feature flag name for versioned migrations (#2350) 2022-02-21 20:06:32 +01:00
MasseElch
d53b271917 doc/md: fix typos in versioned migrations (#2349) 2022-02-21 19:30:44 +01:00
Pedro Henrique
4949991ca6 doc/website: change footer title color (#2348) 2022-02-21 19:13:02 +02:00
MasseElch
59c6702e12 doc/md: versioned migrations (#2345)
* doc/md: versioned migrations

* doc/md: move to own page

* doc/md: add example for migrations from graph

* doc/md: add image

* Apply suggestions from code review

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

* doc/md: format examples

* doc/md: mention versioned migrations in offline migration

* doc/md: add instructions how to run a main.go file

* doc/md: add instructions how to move from auto migrate to versioned migration

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2022-02-21 17:56:02 +01:00
MasseElch
0239daca7b dialect/sql/schema: versioned migrations (#2337)
* dialect/sql/schema: fix go doc

* all: update atlas

* dialect/sql/schema: diff connected DB and defined schema and write changes to migration file

* dialect/sql/schema: use migration directory and formatter directly instead of a planner

* all: update atlas

* cmd: add command to create a new migration file

* entc/gen: generate main.go with migrate diff example

* all: regenerate

* cmd/internal/base: make linter happy

* all: support Go 1.16 in versioned migrations main.go

* entc/gen: put versioned migrations behind feature flag

* all: regenerate

* cmd/ent: driver-prefixed dsn in migrate diff command

* cmd/internal/base: remove prefix from migrate import

* cmd/internal/base: use cobra.CheckErr

* cmd: remove diff command

* entc/gen/template/dialect/sql/feature: remove generated main.go

* all: rebase on master and go mod tidy

* all: regenerate
2022-02-21 12:15:17 +02:00
allcontributors[bot]
f5a5a6ef0e docs: add tprebs as a contributor for code (#2343)
* docs: update doc/md/contributors.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-02-18 17:09:10 +02:00
Thomas Prebble
ce9641e1ae dialect/sql/schema: support postgres geometric types (#2340) 2022-02-18 17:08:25 +02:00
Ariel Mashraki
1c79730d12 doc: update aggregate example 2022-02-18 17:04:40 +02:00
Rotem Tamir
5bad22e6b4 doc/website/blog: change share image for ogent post (#2342) 2022-02-18 09:48:06 +02:00
Pedro Henrique
24a7e78d49 entc/gen: skip assertion on edges with type Other (#2335) 2022-02-18 00:37:16 +02:00
dependabot[bot]
3acff2a4b8 build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.0 (#2336)
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.2 to 1.5.0.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.4.2...v1.5.0)

---
updated-dependencies:
- dependency-name: github.com/gorilla/websocket
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-16 15:44:22 +02:00
allcontributors[bot]
3d05d2e960 docs: add MrParano1d as a contributor for code (#2334)
* docs: update doc/md/contributors.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-02-15 22:32:10 +02:00
MrParano1d
a75e9c5a8f entc/gen: fix missing unique field in query builder template (#2332)
* fix(query): fix missing unique field in query builder template

when a query gets cloned the unique field doesn't get cloned

#2331

* fix(query): added missing go generate ./...

#2331

* fix(query): added missing go generate ./...

#2331
2022-02-15 22:31:05 +02:00
MasseElch
818ce29c78 doc/website/blog: ogent announcement (#2327)
* doc/website/blog:

* doc/website/blog: first draft

* dich/website/blog: add initial draft of post

* doc/website/blog: change title

* doc/website/blog: add diagram

* doc/website/blog: final filename

* doc/website/blog: link to ogen docs

* doc/website/blog: images

* 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>
2022-02-15 12:15:27 +01:00
Shivam Sandbhor
554b9d0850 doc/website: add docs for HAVING + GROUP BY clause (#2326)
* Add docs for HAVING + GROUP BY clause

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>

* Make review changes for docs

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-02-15 10:21:16 +02:00
allcontributors[bot]
a7beb5c834 docs: add crossworth as a contributor for code (#2320)
* docs: update doc/md/contributors.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-02-10 16:17:57 +02:00
Pedro Henrique
f45d29ba4b entc/gen: allow if field to use field.Other with custom types (#2309)
* fix ID with field.Other comparing with zero

* fix lint

* Update entc/integration/customid/ent/schema/other.go

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

* re-generate code

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2022-02-10 16:17:16 +02:00
Ariel Mashraki
e84c3d33fe go: update atlas to latest (#2317) 2022-02-09 14:14:39 +02:00
Sasha Melentyev
52d4c6986f doc: change install command (#2314) 2022-02-09 14:09:11 +02:00
Giau. Tran Minh
74e988616a doc/tutorial: document the new Bind/Unbind behavior (#2315)
* Update tutorial-todo-gql-field-collection.md

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

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2022-02-06 17:48:02 +02:00
유용환
8e9e6343f4 schema/edge: fix grammar in godoc (#2313) 2022-02-06 12:37:02 +02:00
Ariel Mashraki
770e4d24e9 entc/gen: add Type.IsInt64 helper function for fields 2022-02-04 22:46:17 +02:00
Ariel Mashraki
1d3f1819ae entc/gen: replace Type.Alias with Type.PackageAlias 2022-02-04 22:46:17 +02:00
Andy Day
2e906bffa2 cmd/ent: Add check that model file doesn't already exist on ent init (#2307)
Previously if you run  it would overwrite an existing file  if that already existed. Now  checks if that file already exists, and returns an error if so.
2022-02-03 01:44:04 +02:00
Ariel Mashraki
0e49dd1d9f entc/gen: support local package names for generated packages
The new Alias option adds package aliases (local names) for all type-packages that
their import identifier conflicts with user-defined packages (i.e. GoType).
2022-02-02 15:50:00 +02:00
Ariel Mashraki
51663407cf dialect/sql/schema: support DESC indexes using atlasgo.io 2022-01-31 15:18:09 +02:00
Ariel Mashraki
94499bd141 dialect/entsql: add support for DESC indexes annotation 2022-01-31 15:18:09 +02:00
allcontributors[bot]
25f6af1e11 docs: add hezhizhen as a contributor for code (#2302)
* docs: update doc/md/contributors.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-29 10:32:56 +02:00
Zhizhen He
9da36e461f all: fix typos (#2301) 2022-01-29 10:30:31 +02:00
Sasha Melentyev
c7e544c959 ci: bump golangci-lint version (#2294) 2022-01-27 13:19:36 +02:00
MasseElch
1049e874ac doc/md: Adding entoas to popular extensions. (#2293) 2022-01-25 11:12:15 +02:00
Ariel Mashraki
f8c0f02803 schema/field: add support for type-aware Default and UpdateDefault in time fields (#2289) 2022-01-24 14:27:57 +02:00
Ariel Mashraki
898991ac79 entc/gen: set foreign-key columns non-nullable for required edges (#1703)
Note, this only applies to edges without circular references.
Fixed #1688 and #1374
2022-01-23 22:23:37 +02:00
allcontributors[bot]
1901cba436 docs: add iamnande as a contributor for code (#2285)
* docs: update doc/md/contributors.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-23 19:08:08 +02:00
Nicholas Anderson
896f2b202d entc/gen: update NotSingularError godoc (#2274)
* fix: update only/onlyID comments

this patch updates the Only/OnlyID methods in the builder template from:

> // Returns a *NotSingularError when exactly one {{ $.Name }} entity is not found.
to
> // Returns a *NotSingularError when more than exactly one {{ $.Name }} ID is found.

in an effort to be more explicit in the explanation of the behavior of the methods.

* fix: update wording to be more concise from suggestion

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

* fix: update Only wording to be more concicse

* fix: generate new files

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>
2022-01-23 19:07:10 +02:00
Ariel Mashraki
84aac96a1c go: update atlas to latest (#2281) v0.10.0 2022-01-21 01:01:20 +02:00
Ariel Mashraki
339e3600a5 website/blog: ent v0.10 (#2280) 2022-01-20 23:03:01 +02:00
Ariel Mashraki
60e03285d0 dialect/sql/schema: hello ariga.io/atlas (#2279) 2022-01-20 17:20:50 +02:00
dependabot[bot]
05590433a7 build(deps): bump aws-actions/configure-aws-credentials (#2275)
Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/aws-actions/configure-aws-credentials/releases)
- [Changelog](https://github.com/aws-actions/configure-aws-credentials/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws-actions/configure-aws-credentials/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: aws-actions/configure-aws-credentials
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-19 09:15:05 +02:00
Ariel Mashraki
b70754d12f dialect/sql/sqlgraph: avoid creating tx blocks for single statement batch-create operation (#2272)
For example, in PostgreSQL, every statement is executed within a transaction. Therefore, we can avoid creating transaction
blocks manually (group of statements surrounded by BEGIN and COMMIT) for CreateNode operation with single SQL statement.

Benchmark was improved from:

	(4000 BatchInserts)    17.16s      4289178 ns/op  412893 B/op   4913 allocs/op

To:

	(4000 BatchInserts)   9.16s      2288807 ns/op  412142 B/op   4899 allocs/op
2022-01-15 23:04:37 +02:00
allcontributors[bot]
3a426390de docs: add cjraa as a contributor for code (#2267)
* docs: update doc/md/contributors.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-13 13:39:42 +02:00
Clarence
eca70b8490 schema/field: array types are nillable (#2266)
* all: type fixes

* schema/field: remove array check from goType
2022-01-13 13:39:11 +02:00
allcontributors[bot]
565e4ffdfc docs: add genevieve as a contributor for code (#2265)
* docs: update doc/md/contributors.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-13 12:52:45 +02:00
Genevieve
16e57a92c5 entc/gen: spelling fix in error message (#2262) 2022-01-13 12:51:37 +02:00
Ariel Mashraki
08ba217a28 entc/integration: rename uuid to optional_uuid to allow nillable setters for array types (#2264) 2022-01-13 12:41:35 +02:00
s-takehana
0fd6143979 dialect/sql/schema: support time with time zone and time without time zone (#2257)
* dialect/sql/schema: support `time with time zone` and `time without time zone`

* fix test

* fix test
2022-01-12 14:33:26 +02:00
allcontributors[bot]
3f6121b013 docs: add Laconty as a contributor for code (#2261)
* docs: update doc/md/contributors.md [skip ci]

* docs: update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2022-01-12 14:32:36 +02:00