Commit Graph

1626 Commits

Author SHA1 Message Date
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
Roman Maklakov
84070a0f07 entc/gen: add ctx in client.BeginTx (#2260)
* doc: fix docker-compose up command(#2253)

* entc/gen: add ctx in TxBegin & run go generate (#2253)

* entc/integration: add tests for TxBegin Commit and Rollback (#2253)

* entc/integration: uncomment accidentally commented code(#2253)

* entc/integration: fixes after code-review (#2253)

* entc/integration: remove blank lines, code-review (#2253)

* examples: run code gen  (#2253)
2022-01-12 14:28:55 +02:00
Ariel Mashraki
6848f3fc7b dialect/sql/schema: do not sort primary-key columns before diff (#2254)
PKs are indexes and therefore, the order does matter.
Thanks to ariga.io/atlas we found this issue.
2022-01-09 15:37:21 +02:00
Sasha Melentyev
f5fed28782 all: fix typos (#2243)
* refactor(all): Fix typo and small refactor

* refactor(all): Fix typo
2022-01-05 16:10:28 +02:00
MasseElch
84ca961938 entc/gen: there was a typo in Ty interfaces (#2251) 2022-01-05 16:09:48 +02:00
Bodo Kaiser
6dc452f23d website/blog: add article for using ent in serverless GraphQL using AWS (#2206)
* added aws-appsync.md to doc/website/blog

* completed introduction for serverless graphql using aws blog article

* Update doc/website/blog/serverless-graphql-using-aws.md

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

* Update doc/website/blog/serverless-graphql-using-aws.md

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

* Update doc/website/blog/serverless-graphql-using-aws.md

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

* Update doc/website/blog/serverless-graphql-using-aws.md

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

* added graphql schema

* made title in AddTodoInput required

* added setup of entgo project

* added screenshots for setting up AWS AppSync

* added go, graphql, resolver template code

* added description for setting up AWS AppSync API

* completed AWS Lambda set up section

* added description to configuring ent Lambda as AppSync data source

* completed first draft of blog article

* added missing screenshots

* proof read of the tutorial

* Update doc/website/blog/serverless-graphql-using-aws.md

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

* incorporated some feedback from code review

* added comments to Go code, line highlighting for Todo schema, incorporated feedback from Ariel

* prefixed serverless blog article with publication date, simplified go
project setup commands

* Update doc/website/blog/2022-01-04-serverless-graphql-using-aws.md

Co-authored-by: MasseElch <12862103+masseelch@users.noreply.github.com>
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2022-01-04 14:07:40 +02:00
vecpeng
938ce8c16b doc: modify some Chinese translation 2021-12-30 17:59:53 +02:00
dependabot[bot]
ffd9d9f885 build(deps): bump actions/setup-node from 2.5.0 to 2.5.1
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.5.0...v2.5.1)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-30 12:15:56 +02:00
dependabot[bot]
fe7bbd6e5e build(deps): bump github.com/mattn/go-sqlite3 from 1.14.9 to 1.14.10
Bumps [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) from 1.14.9 to 1.14.10.
- [Release notes](https://github.com/mattn/go-sqlite3/releases)
- [Commits](https://github.com/mattn/go-sqlite3/compare/v1.14.9...v1.14.10)

---
updated-dependencies:
- dependency-name: github.com/mattn/go-sqlite3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-30 12:15:47 +02:00
Ariel Mashraki
deb63d0292 dialect/sql: support passing selectors to basic predicates
Closed https://github.com/ent/ent/issues/2236
2021-12-25 15:02:49 +02:00
Ariel Mashraki
d9cdec1094 go: update golang.org/x/tools to latest 2021-12-21 15:25:45 +02:00
Mehmet Yılmaz
4d01a56b8d dialect/sql/schema: allow adding DEFAULT to columns on migration #1758 (#2199)
* add feature to SET DEFAULT value when add new default value to a existing column

* refactoring unit tests

* correct misspells

* code review refactors

* refactors

* Update dialect/sql/schema/postgres.go

* Update dialect/sql/schema/postgres.go

* Update dialect/sql/schema/postgres.go

* Update dialect/sql/schema/postgres.go

* Update dialect/sql/schema/postgres.go

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-12-20 11:29:07 +02:00
allcontributors[bot]
71af8263d7 docs: add m3hm3t as a contributor for code (#2225)
* 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>
2021-12-20 11:23:18 +02:00
Mehmet Yılmaz
8a6ff230c8 dialect/sql/schema: convert column type string to lower case (#2222)
Fixed #2209

* convert column type string to lower case

* Update dialect/sql/schema/sqlite.go

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-12-19 21:02:06 +02:00
Ariel Mashraki
1c263c7abd dialect/sql: add support for SelectExpr (#2220) 2021-12-16 13:50:03 +02:00
Sungyun Hur
f0ca97d309 doc/indexes: add storage key section (#2218) 2021-12-14 19:14:04 +02:00
MasseElch
76770e8a52 entc/gen: don't rely on descriptor when retrieving enum values or names to ease extension testibility (#2211)
Trying to add tests to some extensions and this is complicating things a lot because `Field.def` is unexported. Not taking the length of `def.Enums` but `Enums` directly fixes this. It technically is also more correct, because `f.Enums` could be greater than `f.def.Enums`.
2021-12-11 14:25:02 +02:00
Jeremy Maxey-Vesperman
5dddeef736 doc/website/blog: add list blogpost (#2207) 2021-12-09 16:33:08 +02:00
Yoni Davidson
b8149f2768 dialect/schema: support float for mysql on inspection (#2191)
* dialect/schema: support float for mysql

* add tests
2021-12-07 12:45:46 +02:00
dependabot[bot]
a4e718146c build(deps): bump golang.org/x/tools from 0.1.7 to 0.1.8 (#2203)
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.7 to 0.1.8.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.1.7...v0.1.8)

---
updated-dependencies:
- dependency-name: golang.org/x/tools
  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>
2021-12-06 23:49:18 +02:00
allcontributors[bot]
2e11544cd1 docs: add peanut-cc as a contributor for doc (#2202)
* 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>
2021-12-06 08:46:48 +02:00
peanut-pg
2fa80c83c9 doc/faq: fix error format bug (#2200) 2021-12-06 08:44:12 +02:00
Rotem Tamir
7dba6969fa doc/website: generate atom/rss feeds from the blog (#2197) 2021-12-02 17:25:57 +02:00
dependabot[bot]
37df618927 build(deps): bump github.com/mitchellh/mapstructure from 1.4.2 to 1.4.3 (#2193)
Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.4.2 to 1.4.3.
- [Release notes](https://github.com/mitchellh/mapstructure/releases)
- [Changelog](https://github.com/mitchellh/mapstructure/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitchellh/mapstructure/compare/v1.4.2...v1.4.3)

---
updated-dependencies:
- dependency-name: github.com/mitchellh/mapstructure
  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>
2021-12-02 10:27:06 +02:00
Ariel Mashraki
fd3b29f785 entc/gen: import gen.Config documentation (#2189) 2021-12-01 14:41:55 +02:00
Ariel Mashraki
475e237937 dialect/sql/schema: fix bug when using multiple table CHECK constraints (#2188)
Fixed https://github.com/ent/ent/issues/2185
2021-12-01 12:00:06 +02:00
Ariel Mashraki
d432d880c7 entc/load: add go module info to schema spec (#2175) 2021-12-01 11:30:38 +02:00
dependabot[bot]
6e6e690c4b build(deps): bump actions/setup-node from 2.4.1 to 2.5.0 (#2180)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.4.1 to 2.5.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.4.1...v2.5.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  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>
2021-12-01 11:30:19 +02:00
allcontributors[bot]
f742a1db67 docs: add HurSungYun as a contributor for doc (#2187)
* 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>
2021-12-01 11:28:29 +02:00