Commit Graph

1217 Commits

Author SHA1 Message Date
BrentChesny
8e1b449f78 docs/md: add index edge fields example to docs (#1566) 2021-05-18 12:14:06 +03:00
dependabot[bot]
6ebafe8870 build(deps): bump github.com/lib/pq from 1.10.1 to 1.10.2 (#1563)
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.10.1 to 1.10.2.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.10.1...v1.10.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-18 10:57:14 +03:00
allcontributors[bot]
5c13296f3e docs: add sywesk as a contributor (#1568)
* 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-05-18 10:56:57 +03:00
Benjamin Bourgeais
56d8c77e5c schema/index: add support for annotations (#1562)
* index: Add support for annotations

* entc loader: Add support for index annotations
2021-05-18 10:55:53 +03:00
Ariel Mashraki
4ebbc0cd55 doc/faq: mention gqlgen integration for xid 2021-05-16 17:55:04 +03:00
dependabot[bot]
a821d80707 build(deps): bump golang.org/x/tools from 0.1.0 to 0.1.1 (#1558)
Bumps [golang.org/x/tools](https://github.com/golang/tools) from 0.1.0 to 0.1.1.
- [Release notes](https://github.com/golang/tools/releases)
- [Commits](https://github.com/golang/tools/compare/v0.1.0...v0.1.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-16 10:49:18 +03:00
dependabot[bot]
b759fd2e0b build(deps): bump actions/checkout from 2 to 2.3.4 (#1557)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-16 10:49:06 +03:00
dependabot[bot]
502331f82e build(deps): bump aws-actions/configure-aws-credentials from 1 to 1.5.9 (#1556)
Bumps [aws-actions/configure-aws-credentials](https://github.com/aws-actions/configure-aws-credentials) from 1 to 1.5.9.
- [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...v1.5.9)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-16 10:48:54 +03:00
Ariel Mashraki
f7db15ccbb dialect/sql/schema: add field collation support for postgres 2021-05-10 20:32:45 +03:00
allcontributors[bot]
53e885cbff docs: add mahmud2011 as a contributor (#1550)
* 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-05-09 18:17:25 +03:00
Mahmudul Haque
ba954ebeec dialect/sql/schema: add field collation support (#1548)
* specific field collation support

* go generate ./...
2021-05-09 18:09:08 +03:00
allcontributors[bot]
a2a6af4cd8 docs: add shanna as a contributor (#1549)
* 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-05-09 18:00:46 +03:00
Shane Hanna
8cf853e4dc Add github.com/rs/xid usage to FAQ documentation. (#1542)
* Add github.com/rs/xid usage to FAQ documentation.

Package xid is a globally unique ID generator library that uses the
Mongo Object ID algorithm to generate 12 byte, 20 character IDs
with no configuration.

* Fix FAQ index wrapping.
2021-05-09 17:59:36 +03:00
Ariel Mashraki
37d4b9e2cb dialect/sql/schema: do not set timestamp to nullable columns on MySQLv8.* (#1547)
Fixed #1541
2021-05-08 21:29:35 +03:00
Ariel Mashraki
0bfaa11e2f schema/field: support valuescanner types for uuid fields (#1538)
Fixed #1485
2021-05-07 16:22:46 +03:00
陈杨文
be59ad6d3f dialect.sql/schema.Column ScanDefault allowed uuid default to function (#1537) 2021-05-07 16:15:29 +03:00
Rotem Tamir
8837b53115 doc/website/blog/: announcing the schema import initiative blog post 2021-05-06 10:43:26 +03:00
陈杨文
6d3df1469c dialect/sql: include nested builder errors on join (#1533)
* sql.Builder Join include Querier's error

* sql.Builder Join ignore nil error

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

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-05-05 17:09:55 +03:00
Rotem Tamir
1910b0b614 doc/md: documentation for entgo.io/contrib/schemast 2021-05-05 14:01:39 +03:00
AlonDavidBehr
110bfd97ca dialect/sql/schema: fixed spelling mistakes in schema.go (#1532) 2021-05-03 21:02:52 +03:00
AlonDavidBehr
fb06930a62 entc/gen/template: fixed validation spelling (#1531) 2021-05-03 17:44:07 +03:00
Ariel Mashraki
efd225822c dialect/sql: add driver.Valuer to ParamFormatter example 2021-05-03 14:10:02 +03:00
allcontributors[bot]
d64c10dae2 docs: add DuGlaser as a contributor (#1524)
* docs: update doc/md/contributors.md 

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

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-04-30 19:02:51 +03:00
DuGlaser
a4223c570b doc/md: fix typo in "O2O Same Type" section (#1523) 2021-04-30 19:00:24 +03:00
Ariel Mashraki
edf473e043 dialect/sql: correct alias names for multiple join tables 2021-04-29 23:05:28 +03:00
allcontributors[bot]
124521d10f docs: add giautm as a contributor (#1521)
* 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-04-29 22:28:48 +03:00
allcontributors[bot]
51660a9715 docs: add davebehr1 as a contributor (#1520)
* 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-04-29 22:27:26 +03:00
Ariel Mashraki
1635a66cdd dialect/entsql: add check constraint annotation (#1519)
* added Check constraint annotation

* Update dialect/entsql/annotation.go

Co-authored-by: davebehr1 <davebehr1@gmail.com>
2021-04-29 22:25:27 +03:00
Ariel Mashraki
b3c437f936 entc/integration: add example for join table with edge fields 2021-04-29 16:54:10 +03:00
Ariel Mashraki
6b939670f5 entc/load: improve godoc and add pkgpath to errors 2021-04-28 11:11:44 +03:00
Ariel Mashraki
12a62afb24 entc/integration: add example for edgefield indexes 2021-04-27 19:18:08 +03:00
allcontributors[bot]
928f6f046e docs: add joesonw as a contributor (#1512)
* 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-04-26 22:04:22 +03:00
Ariel Mashraki
9b73ca3eef schema/field: use reflect string for rtype identifier 2021-04-26 16:57:36 +03:00
Ciaran Liedeman
b20d521593 dialect/sql/schema: added foreign keys to postgres inspect (#1493)
* Added foreign keys to postgres inspect

* Update dialect/sql/schema/inspect.go

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

* Update dialect/sql/schema/inspect.go

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

* added unit test

* fixed interface

* moved import back

* fixing tests

* Update dialect/sql/schema/inspect.go

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

* Update dialect/sql/schema/postgres.go

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

* Update dialect/sql/schema/postgres.go

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

* pr feedback

* added m2m test case

* converted to unit tests

Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
2021-04-26 15:32:12 +03:00
Ariel Mashraki
43e74a334f schema/field: fix uuid import path config 2021-04-25 18:54:35 +03:00
allcontributors[bot]
8979de939e docs: add wenerme as a contributor (#1505)
* 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-04-23 18:35:49 +03:00
陈杨文
7fd99a196a schema/field: field.UUID support Nillable (#1504) 2021-04-23 18:33:31 +03:00
Ariel Mashraki
1908b3e35f dialect/sql/sqlbuild: replace bytes.buffer with strings.builder (#1502)
benchmark                                      old ns/op     new ns/op     delta
BenchmarkInsertBuilder_Default/sqlite3-16      285           253           -11.06%
BenchmarkInsertBuilder_Default/mysql-16        283           219           -22.70%
BenchmarkInsertBuilder_Default/postgres-16     374           340           -9.17%
BenchmarkInsertBuilder_Small/sqlite3-16        1945          1734          -10.85%
BenchmarkInsertBuilder_Small/mysql-16          1957          1741          -11.04%
BenchmarkInsertBuilder_Small/postgres-16       2393          2220          -7.23%

benchmark                                      old allocs     new allocs     delta
BenchmarkInsertBuilder_Default/sqlite3-16      5              6              +20.00%
BenchmarkInsertBuilder_Default/mysql-16        5              5              +0.00%
BenchmarkInsertBuilder_Default/postgres-16     6              7              +16.67%
BenchmarkInsertBuilder_Small/sqlite3-16        22             23             +4.55%
BenchmarkInsertBuilder_Small/mysql-16          22             23             +4.55%
BenchmarkInsertBuilder_Small/postgres-16       31             32             +3.23%

benchmark                                      old bytes     new bytes     delta
BenchmarkInsertBuilder_Default/sqlite3-16      456           168           -63.16%
BenchmarkInsertBuilder_Default/mysql-16        440           104           -76.36%
BenchmarkInsertBuilder_Default/postgres-16     480           176           -63.33%
BenchmarkInsertBuilder_Small/sqlite3-16        1624          1176          -27.59%
BenchmarkInsertBuilder_Small/mysql-16          1624          1176          -27.59%
BenchmarkInsertBuilder_Small/postgres-16       1656          1192          -28.02%
2021-04-23 11:10:33 +03:00
Ariel Mashraki
63d630b7cf doc/website/blog: update supported databases 2021-04-22 21:24:35 +03:00
Rotem Tamir
d11a47d7cb doc/md/contributors: update contributor list from github commiter history to ent/ent and ent/contrib (#1500) 2021-04-22 17:32:01 +03:00
allcontributors[bot]
00f70f41d4 docs/md/contributors: add a8m as a contributor 2021-04-22 15:07:41 +03:00
Rotem Tamir
5708a15e58 doc/website: integrate contributors page with all-contributors bot
* doc/website: integrate contributors page with all-contributors bot

* link to contributors page
2021-04-22 15:04:35 +03:00
allcontributors[bot]
45e6062122 docs: add rotemtam as a contributor (#1496)
* docs: update README.md [skip ci]

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

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2021-04-22 14:35:02 +03:00
Ariel Mashraki
3a791b8e81 dialect/entsql: add integration tests (#1494) 2021-04-22 14:34:37 +03:00
Vojtěch Káně
43ef74b8a8 entc/gen: add support for default annotation to PKs as well (#1492) 2021-04-22 14:16:53 +03:00
dependabot[bot]
de150626fc build(deps): bump github.com/lib/pq from 1.10.0 to 1.10.1 (#1491)
Bumps [github.com/lib/pq](https://github.com/lib/pq) from 1.10.0 to 1.10.1.
- [Release notes](https://github.com/lib/pq/releases)
- [Commits](https://github.com/lib/pq/compare/v1.10.0...v1.10.1)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-22 14:15:59 +03:00
Ariel Mashraki
91dda6230f entc/gen: allow simple types to implement valuescanner 2021-04-20 14:44:31 +03:00
Ariel Mashraki
89d1bcd80c dialect/sql/sqlscan: allow scanning optional values to non-pointer fields 2021-04-20 09:29:41 +03:00
Ariel Mashraki
b3041725d2 dialect/sql/sqlscan: allow scanning values to embedded struct fields 2021-04-19 18:40:37 +03:00
Ariel Mashraki
497fca4c96 entc/gen: skip selecting group-by fields if they already selected 2021-04-19 17:20:44 +03:00