Commit Graph

1423 Commits

Author SHA1 Message Date
allcontributors[bot]
fc2b2f2823 docs: add isoppp as a contributor for doc (#1929)
* 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-09-08 19:44:00 +03:00
Hiroki Isogai
125bb0c00f docs/md: fix unresolved reference (#1928) 2021-09-08 19:38:47 +03:00
Ariel Mashraki
c1fae17b6c entc/gen: add schema type to generated validation errors 2021-09-07 18:33:32 +03:00
allcontributors[bot]
0d91f6396c docs: add odeke-em as a contributor for code (#1923)
* 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-09-07 17:04:56 +03:00
Emmanuel T Odeke
9904bcb8c8 all: add (*testing.B).ReportAllocs() to all benchmarks (#1919)
This allows a full picture when continuous benchmarking
is added to this repository and when any changes are made
to the code in here.

Fixes #1918
2021-09-07 17:04:07 +03:00
Ariel Mashraki
b96dfa6d9b doc/md: fix LIKE predicate example (#1922) 2021-09-07 15:03:59 +03:00
Sadman Sakib
0a9c4c4232 doc/md: custom predicate example for LIKE operator (#1911)
* fix typo on doc/md/crud.md

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* add example for LIKE operator

Signed-off-by: sadmansakib <ssadman8@gmail.com>

* Update doc/md/predicates.md

* Update doc/md/predicates.md

* Update doc/md/predicates.md

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-09-07 09:04:40 +03:00
Yoni Davidson
9c7383f43b doc/website: docs-security upgrade axios resolved version (#1916) 2021-09-05 17:48:01 +03:00
Giau. Tran Minh
2a40f27b2b doc/md: update MaxRuneCount example (#1915)
* doc/md: update MaxRuneCount example

Update MaxRuneCount example with entsql.Annotation. 

https://github.com/ent/ent/issues/1856
https://github.com/ent/ent/issues/1914

* update custom validator description

* Update doc/md/schema-fields.md

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

* Update doc/md/schema-fields.md

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

* Update doc/md/schema-fields.md

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

Co-authored-by: MasseElch <12862103+masseelch@users.noreply.github.com>
2021-09-05 15:19:39 +03:00
dependabot[bot]
c511be69b6 build(deps): bump github.com/lib/pq from 1.10.2 to 1.10.3 (#1910)
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.10.2 to 1.10.3.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.10.2...v1.10.3)

---
updated-dependencies:
- dependency-name: github.com/lib/pq
  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-09-03 17:21:40 +03:00
Ariel Mashraki
3c8cef3da1 doc/extensions: minor fixes to code blocks (#1909) 2021-09-03 17:21:16 +03:00
Rotem Tamir
ac33c03069 doc/website/blog: extending ent with the new Extension API (#1908)
* doc/website/blog: post about extending ent with the new Extension API

* missing part

* fix URL

* Update doc/website/blog/2021-09-02-ent-extension-api.md

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

* Update doc/website/blog/2021-09-02-ent-extension-api.md

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

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-09-02 18:00:29 +03:00
Rotem Tamir
2e24ce1361 doc/md: initial documentation for the extension API (#1906) 2021-09-02 15:57:28 +03:00
Rotem Tamir
5fc8e708c2 doc/md: update templates.md (#1905) 2021-09-02 09:42:41 +03:00
allcontributors[bot]
bbc4a4c14b docs: add seiichi1101 as a contributor for code (#1904)
* 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-09-02 09:08:36 +03:00
seiichi
5277780598 entc/integration: change gremlin server version to v3.4.11 #1807 (#1808) 2021-09-02 09:07:14 +03:00
Ariel Mashraki
f0d985f542 all: replace save with exec when the model is not needed 2021-09-01 22:36:44 +03:00
Ariel Mashraki
7015647528 website/blog: ent joins the linux foundation 2021-09-01 13:08:00 +03:00
Risky Feryansyah
65938ccdd3 entc/integration: change Save to Exec in create operation when model is not needed (#1896)
* refactor(entc/integration): change Save to Exec in create operation

* fix: should not change to exec if we need return of the data
2021-09-01 10:05:30 +03:00
Risky Feryansyah
9fb76ef5c5 entc/integration: change Save to Exec in create operation (#1891) 2021-08-31 13:09:08 +03:00
Ariel Mashraki
e545d0db7a entc/integ: test adding filters to UpdateOne from mutation 2021-08-30 15:21:16 +03:00
Yoni Davidson
53d7c330e6 md/fields: fix code typo in Enum example (#1887) 2021-08-30 11:12:17 +03:00
Yoni Davidson
5adcb6b376 md/fields: clarify enum fields usage (#1886)
* basic run

* show example on mysql

* clean

* small fixes

* fix comments

* Apply suggestions from code review

PR review suggestions.

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
Co-authored-by: Giau. Tran Minh <giau.tmg@gmail.com>

* Update doc/md/schema-fields.md

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
Co-authored-by: Giau. Tran Minh <giau.tmg@gmail.com>
2021-08-30 10:07:22 +03:00
allcontributors[bot]
982ec097ad doc: add RiskyFeryansyahP as a contributor for code (#1884)
* 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-08-28 10:11:52 +03:00
Risky Feryansyah
a11cc87366 doc/website: upgrade several transitive dependency that have security concern (#1883) 2021-08-28 10:09:53 +03:00
Ariel Mashraki
b23a0e8554 dialect/sql/sqlgraph: avoid creating tx blocks for single DELETE statements
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 DeleteNodes operation as it's implemented with a single statement.

Benchmark for 4000 operations was improved from:

	14.54s      7270455 ns/op    3702 B/op     81 allocs/op

To:

	5.36s      2679935 ns/op    2864 B/op     59 allocs/op

---

MySQL and SQLite share the same behavior. Please see https://github.com/ent/ent/pull/1858
for more info.
2021-08-27 16:02:29 +03:00
Ariel Mashraki
ee606f4e86 schema/field: add codegen header for template 2021-08-26 21:33:56 +03:00
Mohammed Salman
51ddb405fb schema/field: fix annotations doc example (#1878)
* schema/field: Fix annotation doc example

* Update numeric.tpl
2021-08-26 20:31:11 +03:00
Ariel Mashraki
30fc87de7f website/blog: fix gofmt in entviz blog 2021-08-26 16:01:50 +03:00
Amit Shani
0d63869c87 doc/website/blog: entviz blog post (#1871) 2021-08-26 15:10:31 +03:00
Ariel Mashraki
1304dc3d79 doc/features: format sql/modifier examples 2021-08-25 18:28:37 +03:00
Ariel Mashraki
badf981b37 entc/integration: add example for embedding ent.T in Scan 2021-08-24 22:26:59 +03:00
Amit Shani
60e726812b schema/field: add NotEmpty built-in validator to bytes fields (#1869)
* added MaxLen built-in validator to `[]byte`

* typo

* move test to type_test.go

* Update doc/md/schema-fields.md

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

* added min len validator to bytes

* fix tests
go generate

* CR

* add not empty validator

* CR

* doc/md:  add doc on `NotEmpty` bytes validator

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-08-24 14:47:15 +03:00
Amit Shani
ac0bd65145 schema/field: add MinLen built-in validator to bytes fields (#1867)
* added MaxLen built-in validator to `[]byte`

* typo

* move test to type_test.go

* Update doc/md/schema-fields.md

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

* added min len validator to bytes

* fix tests
go generate

* CR

* CR

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-08-24 14:07:29 +03:00
Amit Shani
ad792fe79e schema/field: add MaxLen built-in validator to bytes fields (#1863)
* added MaxLen built-in validator to `[]byte`

* typo

* move test to type_test.go

* Update doc/md/schema-fields.md

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

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-08-24 10:23:43 +03:00
allcontributors[bot]
d84ac191b1 docs: add dakimura as a contributor for code (#1862)
* 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-08-22 22:07:28 +03:00
dakimura
dac5ccaec9 dialect/sql/schema: fix error message for the missing fk constraints (#1861) 2021-08-22 22:05:40 +03:00
Ariel Mashraki
368a8f7a2e entc/gen: replace bindata with package embed 2021-08-21 17:13:44 +03:00
Ariel Mashraki
41e2d0c9b5 entc/load: replace bindata with package embed 2021-08-21 17:13:44 +03:00
Ariel Mashraki
11843ff867 go: upgrade to 1.17 2021-08-21 00:14:22 +03:00
Ariel Mashraki
ea67be12a4 dialect/sql/sqlgraph: avoid creating tx blocks for single statement create operation
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:

	(2000 Inserts)   8.41s      4206748 ns/op    4595 B/op    115 allocs/op

To:

	(2000 Inserts)   4.66s      2330222 ns/op    4107 B/op    104 allocs/op
2021-08-20 21:12:24 +03:00
Rotem Tamir
f326c7dfd0 dialect/sql: report explicit error when trying to SELECT .. FOR UPDAT… (#1847)
* dialect/sql: report explicit error when trying to SELECT .. FOR UPDATE with sqlite

* remove redundant assertion
v0.9.1
2021-08-17 12:54:23 +03:00
lhlmgr
22527cc281 Update graphql.md (#1846)
fix typo in doc: `WithNodeType` accepts a mapping function, while `WithFixedNodeType` accepts a `string` e.g. the typ name.
2021-08-17 06:02:30 +03:00
Amit Shani
7c727e1f84 doc/md: fix doc in eager-load page (#1844)
* update typo

* Update eager-load.md
2021-08-16 11:05:41 +03:00
Zeev Manilovich
5aaa7736ee doc/schema-fields: make enum example clearer (#1842) 2021-08-15 16:03:00 +03:00
Ariel Mashraki
b8532f87a6 entc/gen: support for upsert with client generated ids
Fixed #1826
2021-08-14 17:44:04 +03:00
Ciaran Liedeman
f25e0c17ea doc: Removed extra limit (#1837) 2021-08-14 13:27:14 +03:00
Ariel Mashraki
7e3785f105 entc/integ: add generated-id upsert example 2021-08-12 21:01:05 +03:00
Yoni Davidson
d1593150ee doc/website/blog: blog post prometheus hook (#1829)
* starting with part 1

* up to ent hooks

* finish hooks

* add metrics

* show metrics

* done first review

* duplicate repo

* minor links update

* Update doc/website/blog/2021-08-12-building-observable-ent-application-with-prometheus.md

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

* Update doc/website/blog/2021-08-12-building-observable-ent-application-with-prometheus.md

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

* Update doc/website/blog/2021-08-12-building-observable-ent-application-with-prometheus.md

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

* Update doc/website/blog/2021-08-12-building-observable-ent-application-with-prometheus.md

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

* Update doc/website/blog/2021-08-12-building-observable-ent-application-with-prometheus.md

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

* Update doc/website/blog/2021-08-12-building-observable-ent-application-with-prometheus.md

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

* Update doc/website/blog/2021-08-12-building-observable-ent-application-with-prometheus.md

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

* Update doc/website/blog/2021-08-12-building-observable-ent-application-with-prometheus.md

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

* remove shell syntax

* Update doc/website/blog/2021-08-12-building-observable-ent-application-with-prometheus.md

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

* Apply suggestions from code review

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

* Update doc/website/blog/2021-08-12-building-observable-ent-application-with-prometheus.md

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

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>
Co-authored-by: MasseElch <12862103+masseelch@users.noreply.github.com>
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-08-12 14:53:09 +03:00
Ariel Mashraki
e71ccc6b6e dialect/sql/sqlgraph: fix bug in entql predicate evaluation (#1827) 2021-08-11 21:03:52 +03:00