Commit Graph

665 Commits

Author SHA1 Message Date
Ariel Mashraki
d9c8130d08 dialect/sql: configure contains-fold per dialect (#666) 2020-08-13 17:26:19 +03:00
Ariel Mashraki
07c38e8e8f doc: update project readme and website (#662) 2020-08-09 12:32:14 +03:00
Ariel Mashraki
5c170bce8f schema/mixin: add AnnotateEdges helper (#659) 2020-08-06 13:03:34 +03:00
Ariel Mashraki
2a0c219f9d doc: add schema and template annotations (#657)
And add gotemplate to highlight.js as a custom language
v0.3.0
2020-08-04 22:14:00 +03:00
Ariel Mashraki
b5a9c66290 entc/gen: import siblings packages by default (#655)
Also, add missing pkg-path for non-value types.
2020-08-02 15:06:05 +03:00
Ariel Mashraki
ebfc1a4f36 entc/gen: move builder naming to Go api (#653)
Fixed #652
2020-08-01 18:43:39 +03:00
Ariel Mashraki
05dfd6b78b schema/edge: add annotation support for edges (#651) 2020-08-01 15:38:47 +03:00
Joe Harvey
e9b406ca65 entc/gen: Split strings in pascal/camcelCase on - in addition to _ (#631) 2020-08-01 15:36:57 +03:00
Ariel Mashraki
c7bf64fa71 doc: add an example for create-bulk api (#650) 2020-07-30 19:25:19 +03:00
Ariel Mashraki
e71a6de39b entc/gen: fix hooks invocation on bulk-create (#649) 2020-07-29 18:35:21 +03:00
Ariel Mashraki
f677112e18 entc/gen: ignore query execution on empty batch (#648) 2020-07-29 18:07:14 +03:00
Ariel Mashraki
d42a5581b9 entc/integration/compose: remove unused Dockerfile (#647) 2020-07-29 13:00:10 +03:00
Ariel Mashraki
16d98d1acc dialect/sql/schema: accept default values for enum fields (#646)
Fixed #644
2020-07-28 12:55:02 +03:00
Ariel Mashraki
dd3cdc147d entc/gen: correctly handle custom storage-key for id fields (#643)
Fixed #621
2020-07-28 10:14:21 +03:00
dependabot[bot]
5f16308551 build(deps): bump github.com/lib/pq from 1.7.1 to 1.8.0 (#645)
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.7.1...v1.8.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-28 08:44:59 +03:00
Ariel Mashraki
ff6163f1a0 entc/gen: avoid double convertion for custom gotypes (#640) 2020-07-26 20:30:43 +03:00
Ariel Mashraki
01a04dbe24 entc/gen: generate predicates for custom enum types (#639) 2020-07-25 17:48:51 +03:00
Ariel Mashraki
875e6e516b entc/gen: initial implementation for create-bulk #613
Closed #236
2020-07-24 20:16:31 +03:00
Ariel Mashraki
04859c6fb4 schema/field: add GoType support for enum fields (#638) 2020-07-24 19:59:05 +03:00
dependabot[bot]
6564b0026d build(deps): bump github.com/mitchellh/mapstructure from 1.3.2 to 1.3.3 (#637)
Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.3.2 to 1.3.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.3.2...v1.3.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-23 09:33:46 +03:00
Ariel Mashraki
03fe39ab74 entc/integration: add tests for gql naming convention (#636) 2020-07-22 23:01:38 +03:00
Ariel Mashraki
daaa9f2db1 schema/field: add option to set the Go identifier for enums (#635) 2020-07-22 20:22:24 +03:00
dependabot[bot]
5ad267d862 build(deps): bump actions/setup-node from v2.1.0 to v2.1.1 (#633)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from v2.1.0 to v2.1.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v2.1.0...321b6ccb03083caa2ad22b27dc4b45335212e824)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-22 09:40:07 +03:00
Ariel Mashraki
1783294d75 entc/gen: skip slicing on empty fields (#632) 2020-07-21 13:15:27 +03:00
Ariel Mashraki
3b77e5d71a dialect/sql/sqlgraph: use correct column when querying m2o/o2o edges (#629)
Fixed #621
2020-07-21 10:21:51 +03:00
Ariel Mashraki
7425b90e01 schema/mixin: rename Annotate to AnnotateFields (#628) 2020-07-21 10:15:16 +03:00
dependabot[bot]
6a10b9d3d3 build(deps): bump github.com/lib/pq from 1.7.0 to 1.7.1 (#627)
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.7.0...v1.7.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-21 09:57:18 +03:00
Alex Snast
31105f408d schema/mixin: adding mixin.Annotate helper which adds anootations to mixin fields (#625)
Signed-off-by: Alex Snast <alexsn@fb.com>
2020-07-20 11:48:42 +03:00
dependabot[bot]
6a0ef7a057 build(deps): bump go.opencensus.io from 0.22.3 to 0.22.4 (#624)
Bumps [go.opencensus.io](https://github.com/census-instrumentation/opencensus-go) from 0.22.3 to 0.22.4.
- [Release notes](https://github.com/census-instrumentation/opencensus-go/releases)
- [Commits](https://github.com/census-instrumentation/opencensus-go/compare/v0.22.3...v0.22.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-20 07:16:49 +03:00
dependabot[bot]
36729a945e build(deps): bump github.com/lib/pq from 1.2.0 to 1.7.0 (#623)
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.2.0 to 1.7.0.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.2.0...v1.7.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-20 07:16:34 +03:00
Ariel Mashraki
54f0a6769b schema/field: add annotation option to schema field (#622) 2020-07-19 18:01:04 +03:00
dependabot[bot]
bdd80ebb3f build(deps): bump github.com/mitchellh/mapstructure from 1.2.2 to 1.3.2 (#620)
Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.2.2 to 1.3.2.
- [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.2.2...v1.3.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 23:43:15 +03:00
dependabot[bot]
7fc92be193 build(deps): bump github.com/json-iterator/go from 1.1.9 to 1.1.10 (#619)
Bumps [github.com/json-iterator/go](https://github.com/json-iterator/go) from 1.1.9 to 1.1.10.
- [Release notes](https://github.com/json-iterator/go/releases)
- [Commits](https://github.com/json-iterator/go/compare/v1.1.9...v1.1.10)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 23:38:37 +03:00
dependabot[bot]
31506b8e9a build(deps): bump github.com/stretchr/testify from 1.4.0 to 1.6.1 (#618)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.4.0 to 1.6.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.4.0...v1.6.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 23:38:16 +03:00
dependabot[bot]
0e9adf8627 build(deps): bump github.com/mattn/go-sqlite3 from 1.13.0 to 1.14.0 (#617)
Bumps [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) from 1.13.0 to 1.14.0.
- [Release notes](https://github.com/mattn/go-sqlite3/releases)
- [Commits](https://github.com/mattn/go-sqlite3/compare/v1.13.0...v1.14.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 23:37:00 +03:00
dependabot[bot]
091d3cd90d build(deps): bump github.com/DATA-DOG/go-sqlmock from 1.3.3 to 1.4.1 (#616)
Bumps [github.com/DATA-DOG/go-sqlmock](https://github.com/DATA-DOG/go-sqlmock) from 1.3.3 to 1.4.1.
- [Release notes](https://github.com/DATA-DOG/go-sqlmock/releases)
- [Commits](https://github.com/DATA-DOG/go-sqlmock/compare/v1.3.3...v1.4.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 23:36:05 +03:00
dependabot[bot]
1f94ba0a7d build(deps): bump golangci/golangci-lint-action from v1 to v2 (#615)
Bumps [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action) from v1 to v2.
- [Release notes](https://github.com/golangci/golangci-lint-action/releases)
- [Commits](https://github.com/golangci/golangci-lint-action/compare/v1...c238b72278d97934fd2cb007b97162d5b44757df)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 23:33:00 +03:00
dependabot[bot]
d30ed79f44 build(deps): bump actions/setup-node from v1 to v2.1.0 (#614)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from v1 to v2.1.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v1...1ae8f4b1fd89676f69b55d3dd6932b6df089ff7b)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-07-17 23:27:47 +03:00
Ariel Mashraki
88f9e803b8 github: add dependabot integration 2020-07-17 23:22:31 +03:00
Ariel Mashraki
33e4eb3a52 dialect/sql/schema: change id type of ent_types table to be unsigned (#612) 2020-07-16 20:07:37 +03:00
Ariel Mashraki
4e9fd67a3e entc/gen: allow setting unique fields with default values of type function (#610)
Fixed #609
2020-07-16 18:57:08 +03:00
Ariel Mashraki
9d42b5ef40 entc/gen: rename OnlyXID to OnlyIDX in codegen (#608) v0.2.7 2020-07-16 17:21:41 +03:00
Ariel Mashraki
f629275d60 doc: use dialect package constant in example (#607) 2020-07-15 19:30:23 +03:00
Ariel Mashraki
399883a71a entc/gen/sql: move spec creation to a function (#604)
To be shared with batch-create builder
2020-07-13 13:27:36 +03:00
Alex Snast
f7d4a52e68 entc: adding fail method to template engine
Signed-off-by: Alex Snast <alexsn@fb.com>
2020-07-12 13:56:03 +03:00
Ariel Mashraki
71feecbc07 ci/github: ignore ci on tag releases (#601) 2020-07-12 12:32:06 +03:00
Ariel Mashraki
6cd1d18d46 doc: add transaction hooks to entgo.io (#600) v0.2.6 2020-07-12 11:36:29 +03:00
Ariel Mashraki
e6c91e1dbf entc/gen: add support for tx hooks (#575) 2020-07-12 11:07:14 +03:00
Alex Snast
7b34abd8b4 entc/gen: adding singular variants of select query finishers (#594)
Signed-off-by: Alex Snast <alexsn@fb.com>
2020-07-09 10:59:33 +03:00
Ariel Mashraki
720766432a dialect/sql/sqlgraph: initial work for batch insert (#573)
This is the first part for adding batch insert support for the framework.
The second part if the codegen.
2020-07-08 17:48:26 +03:00