Commit Graph

1375 Commits

Author SHA1 Message Date
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
dependabot[bot]
30330751bb build(deps): bump actions/setup-node from 2.3.2 to 2.4.0 (#1813)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.3.2 to 2.4.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.3.2...v2.4.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-08-11 17:39:34 +03:00
MasseElch
6f4882663a doc/md: rename masseelch user (#1825)
* doc/md: Hide my clear name

😄

* doc/md: Hide my clear name
2021-08-11 17:39:19 +03:00
MasseElch
9070057146 ent: Fixes error in CONTRIBUTING.md (#1820)
If one would change a template in `entc/gen/template` and not run regenerate `go-bindata/bindata` contents, code generation would not take changes into account.
2021-08-10 20:22:22 +03:00
MasseElch
d6ef361a7c doc/website/blog: Updated instructions to meet updated ent and elk. (#1818) 2021-08-09 23:47:38 +03:00
Yoni Davidson
33e3a8d7b7 doc/md: moved setup go environment before installation (#1816) 2021-08-08 14:14:10 +03:00
Mohammed Salman
710d5d77e9 schema/index: update index comments (#1814)
* update index comments

* Update schema/index/index.go

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-08-08 12:55:04 +03:00
Ariel Mashraki
e0a85ab609 blog/upsert: minor changes to upsert blogpost v0.9.0 2021-08-05 21:45:21 +03:00
Rotem Tamir
1a4403c1b3 doc/website/blog: blog post describing the upsert API in v0.9.0 2021-08-05 21:45:21 +03:00
Ariel Mashraki
eb87d64980 all: remove pkg/errors 2021-08-05 17:37:34 +03:00
Arie Litovsky
f0710aa004 doc: fix typos in documentation (#1810)
* Fix typos

* More typos
2021-08-05 17:31:18 +03:00
dependabot[bot]
6e48129b29 build(deps): bump actions/setup-node from 2.3.1 to 2.3.2 (#1806)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.3.1...v2.3.2)

---
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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-05 10:14:18 +03:00
allcontributors[bot]
d38683acaa docs: add sadmansakib as a contributor for doc (#1804)
* 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-04 22:41:35 +03:00
Sadman Sakib
df3f3bd5b3 doc: fix typo on doc/md/crud.md (#1803)
Signed-off-by: sadmansakib <ssadman8@gmail.com>
2021-08-04 22:40:28 +03:00
Ariel Mashraki
397b3e984d dialect/sql/schema: setup tables before execute hooks 2021-08-04 21:43:00 +03:00
Ariel Mashraki
dc35e380e5 doc/crud: document upsert feature-flag 2021-08-04 20:59:26 +03:00
Ariel Mashraki
09c4306378 entc/gen: add support for upsert/on-conflict feature-flag 2021-08-04 14:01:31 +03:00
MasseElch
a5c931ed13 doc/website/blog: add instructions to ensure mod dependencies are resolved correctly (#1800)
* doc/website/blog: Add instrustions to ensure mod dependencies are resolved correctly

* Update doc/website/blog/2021-07-29-generate-a-fully-working-go-crud-http-api-with-ent.md

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-08-04 13:38:26 +03:00
Yoni Davidson
c53dc35cc3 doc: fixed typo in codegen hook example (#1798) 2021-08-04 12:52:16 +03:00
dependabot[bot]
1eada59746 build(deps): bump actions/setup-node from 2.3.0 to 2.3.1 (#1799)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.3.0 to 2.3.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.3.0...v2.3.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>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-04 12:51:06 +03:00
MasseElch
56e32a3392 doc/website/blog: fixes a typo in elk blog post (#1795) 2021-08-03 13:05:51 +03:00
Ariel Mashraki
16c4b3379b sqlgraph: change modifiers to onconflict options 2021-08-01 18:43:59 +03:00
Ariel Mashraki
b19ac669c7 dialect/sql: override column values on Updater.Set
Avoid cases like 'SET a = 1, a = 2'.
2021-08-01 09:53:26 +03:00
Ariel Mashraki
64e0116ed7 blog: minor style changes to crud post 2021-07-29 23:45:07 +03:00
MasseElch
2ba1c6b22d doc/website/blog: Generate a fully-working Go CRUD HTTP API with Ent (#1788)
* doc/website/blog: Generate a fully-working Go CRUD HTTP API with Ent

* Update doc/website/blog/2021-09-29-generate-a-fully-working-go-crud-http-api-with-ent.md

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

* Rename 2021-09-29-generate-a-fully-working-go-crud-http-api-with-ent.md to 2021-07-29-generate-a-fully-working-go-crud-http-api-with-ent.md

* removing formatter

* final touches

Co-authored-by: Rotem Tamir <rotemtamir@gmail.com>
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-07-29 23:24:59 +03:00
Ariel Mashraki
3307dd5323 entc/gen: add the Exec(X) methods for BulkCreate 2021-07-29 17:50:51 +03:00
MasseElch
b4ba9eb12f doc/md: adding a missing space in writing-docs documentation (#1785) 2021-07-29 17:19:38 +03:00
Ariel Mashraki
7acf2234b6 dialect/sql/sqlgraph: allow setting stmt modifiers for create-many 2021-07-29 16:33:26 +03:00
Ariel Mashraki
b9fcbff724 dialect/sql/sqlgraph: allow setting stmt modifiers for create-one 2021-07-29 16:33:26 +03:00
MasseElch
19b418d1a0 doc/md: fixing a formatting error in writing-docs documentation 2021-07-29 15:54:54 +03:00
Ariel Mashraki
60a544bb9d doc/featureflag: add doc and example to the sql/modifier flag 2021-07-29 11:34:21 +03:00
allcontributors[bot]
d1c568dac7 docs: add shomodj as a contributor for doc (#1782)
* 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-07-29 11:27:22 +03:00
Boris Shomodjvarac
5e9cc84f99 doc/getting-started: fix typos (#1779)
fixing typo
2021-07-29 11:24:48 +03:00
Ariel Mashraki
b8f8ea0f06 dialect/sql: move onconflict clause to functional options 2021-07-28 12:49:11 +03:00
Tarrence van As
09fd9957c0 entc/integration: use exec when not interested in entity return value (#1775) 2021-07-27 22:32:27 +03:00
Ruben de Vries
1586d50f94 dialect/sql: do not call inner Scan for nil values in sql.NullScanner (#1771) 2021-07-27 12:05:22 +03:00
Ariel Mashraki
9de519d027 dialect/sql: add expression function support 2021-07-27 11:36:56 +03:00
Ciaran Liedeman
bab709001c entc/gen: fix panics during initTemplates when Config.Storage is nil (#1769) 2021-07-26 21:49:07 +03:00
Ariel Mashraki
8973af9b40 schema/field: add support for setting update default funcs to numeric fields (#1770)
* schema/field:add UpdateDefault to numeric (#1718)

* schema/field:fix comment

* schema/field: change interface to self type with DefaultFunc/UpdateDefault

* schema/field: change interface to self type with DefaultFunc/UpdateDefault

* schema/field: change interface to self type with DefaultFunc/UpdateDefault

* schema/field: add support for setting update default funcs to numeric fields

Co-authored-by: godcong <jumbycc@163.com>
2021-07-26 13:17:16 +03:00
Andrey Elenskiy
20b616768d dialect/sql: return selector's alias as a table name (#1745)
In case selector's from clause has *Selector instead of *SelectTable,
TableName() function (used for column checking) will panic.

Instead, return selector's alias which is useful if the query returns
a table with the same schema as some entity. Essentially, this allows
materialized views to reuse the same entity code as long as columns
are matching.
2021-07-25 22:14:32 +03:00
Ariel Mashraki
9704c4c87b examples: update version example to follow the locking blog post 2021-07-25 16:43:20 +03:00
Tarrence van As
cdfa3e35bb entc/gen: add Exec and ExecX to Create builder (#1753) 2021-07-23 15:00:47 +03:00
allcontributors[bot]
b9a6b955f8 docs: add neel229 as a contributor for code (#1765)
* 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-07-22 23:37:37 +03:00
allcontributors[bot]
2d7b298405 docs: add squarebat as a contributor for code (#1763)
* 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-07-22 23:36:23 +03:00
Khadija Sidhpuri
364ab46333 dialect/sql: append UNION before ORDER BY (#1761)
* fix: builder to append UNION before ORDER_BY

* gofmt builder_test.go
2021-07-22 23:33:34 +03:00
Rotem Tamir
444b5f57b9 doc/website/blog: database locking techniques with ent (#1762)
* doc/website/blog: database locking techniques with ent

* Update doc/website/blog/2021-07-22-database-locking-techniques-with-ent.md

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

* Update doc/website/blog/2021-07-22-database-locking-techniques-with-ent.md

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

* Update doc/website/blog/2021-07-22-database-locking-techniques-with-ent.md

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

* Update doc/website/blog/2021-07-22-database-locking-techniques-with-ent.md

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

* Update doc/website/blog/2021-07-22-database-locking-techniques-with-ent.md

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

* Update doc/website/blog/2021-07-22-database-locking-techniques-with-ent.md

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

* Update doc/website/blog/2021-07-22-database-locking-techniques-with-ent.md

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

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-07-22 17:05:24 +03:00
Neel Modi
051f19a997 entc/gen: fix typo in templates (#1760)
* fix typo

* fix typo
2021-07-22 12:19:39 +03:00
Ariel Mashraki
0751c342c6 doc/feature-flags: mention the new sql/lock feature-flag 2021-07-21 11:50:06 +03:00
Ariel Mashraki
6a7b3c8e7a entc/gen: add feature-flag and implementation for sql/lock
Fixed #358
2021-07-21 11:50:06 +03:00