Commit Graph

14 Commits

Author SHA1 Message Date
Ariel Mashraki
53cfcb6e8b dialect/sql: fix predicate builder on join
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/143

Reviewed By: idoshveki

Differential Revision: D18346652

fbshipit-source-id: e8c5d7eb3cefc16f52090de0d121e82cae058fc2
2019-11-06 05:21:26 -08:00
Ariel Mashraki
930a17b767 dialect/sql: add neighbors function (#140)
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/140

This part of the effort of moving logic from Go templates to shared packages.
Next diffs will migrate the neighbors-set and predicates as well.

Dedicated tests for `sql/dialect/graph.go` will be added in a follow-up diff.

Reviewed By: alexsn

Differential Revision: D18304531

fbshipit-source-id: 93e9cf2636b5b4525eb27305bd2708122cfd6e40
2019-11-05 13:08:48 -08:00
Ariel Mashraki
c259aee24b entc/gen: generate sql builders with dialect option
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/130

Reviewed By: alexsn

Differential Revision: D18164397

fbshipit-source-id: 2858d69d3ff85c06b51382c01c3d4369ee2c3bdb
2019-10-27 21:53:50 -07:00
Ariel Mashraki
e493574c83 entc: add postgres dialect for sql storage driver options
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/123

Reviewed By: alexsn

Differential Revision: D18117641

fbshipit-source-id: 8e520a1b1f70c7bea70f8a37ac698116e98a804e
2019-10-24 10:49:47 -07:00
Alex Snast
9d9e121dbd ent/entc: .String() now uses ansic time format when formating time fields
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/103

Reviewed By: a8m

Differential Revision: D17978059

fbshipit-source-id: 721014b0bf712943d721c7ff038239cff690b94e
2019-10-17 04:36:04 -07:00
Alex Snast
5d988870bc ent/entc: use select/scan on id query (#1552)
Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1552

Pull Request resolved: https://github.com/facebookincubator/ent/pull/93

avoids complete ent load on id query

Reviewed By: a8m

Differential Revision: D17906002

fbshipit-source-id: 7749a0d7c707858eab368978a1d220b581ea6dbb
2019-10-14 23:16:14 -07:00
Ariel Mashraki
6f5f42ab3c dialect/sql: dialect based builders (#1550)
Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1550

Pull Request resolved: https://github.com/facebookincubator/ent/pull/84

This is still WIP and you should ignore this.

Reviewed By: alexsn

Differential Revision: D17854477

fbshipit-source-id: 2d19713c118adb31164b7a2781327e64c87db8d4
2019-10-13 07:03:11 -07:00
Ariel Mashraki
82f91dfcd2 examples/start: add license
Reviewed By: idoshveki

Differential Revision: D17788435

fbshipit-source-id: ae8ba70bcf84cf5e325291c45b69e8721a130bf1
2019-10-07 07:48:30 -07:00
Ariel Mashraki
7597f07912 entc: add option to use entc as package
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/72

Reviewed By: alexsn

Differential Revision: D17783580

fbshipit-source-id: 597f124a28415fef66b0b16811ad2acac8df631d
2019-10-07 07:06:32 -07:00
Alex Snast
ac50ea81d4 ent: address several lint errors throughout the project (#1534)
Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1534

Pull Request resolved: https://github.com/facebookincubator/ent/pull/73

lint errors detected by running `golangci-lint` tool.

Reviewed By: a8m

Differential Revision: D17784980

fbshipit-source-id: f7e8bd99fdf1e018d5672cea1e8d44b67f2a4201
2019-10-06 23:59:12 -07:00
Ariel Mashraki
b64330e475 ent/gen: remove redundant nillable check
Summary: nillable must be optional

Reviewed By: alexsn

Differential Revision: D17763004

fbshipit-source-id: 9c134e1648d1a387d90a5f2353de855a1aa3464f
2019-10-05 11:03:05 -07:00
Ariel Mashraki
8e66691db5 entc: return ErrNotFound on UpdateOne
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/52

Reviewed By: alexsn

Differential Revision: D17737477

fbshipit-source-id: 13890619e0af28a28e3d7bd50d7e4287599eeaf0
2019-10-03 06:25:11 -07:00
Ariel Mashraki
1750d33bd8 all: add support for running examples in playground
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/49

Reviewed By: alexsn

Differential Revision: D17735758

fbshipit-source-id: d4b80631e56870690cc54912528c9950f4e48ccc
2019-10-03 03:05:40 -07:00
Ariel Mashraki
6d159024e7 ent/doc: fix getting started example and add link to Github
Reviewed By: alexsn

Differential Revision: D17734937

fbshipit-source-id: abced88c23b7385d371361c5069292de5c1c5b1e
2019-10-03 01:40:58 -07:00