Commit Graph

7 Commits

Author SHA1 Message Date
Ariel Mashraki
2543d90167 dialect/sql: add hasneigbors for predicates (#184)
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/184

This diff is part of the ongoing effort for moving the sql logic out from codegen.

Reviewed By: alexsn

Differential Revision: D18656817

fbshipit-source-id: 71001d37eb78032414c2f83f200d3011b50c114b
2019-11-24 04:16:36 -08:00
Ariel Mashraki
c355ed49be entc/gen: move set-neighbors logic from codegen to sqlgraph
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/183

Reviewed By: alexsn

Differential Revision: D18644179

fbshipit-source-id: 2f2b0c03811a09c4c11240e5161187afbb2ac553
2019-11-24 04:16:36 -08:00
Ariel Mashraki
aece79f8a8 dialect/sql: add option for getting the neighbors of set of vertices (#157)
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/157

It should be used by the query builders for stepping to neighbors of the matches.

Reviewed By: alexsn

Differential Revision: D18448517

fbshipit-source-id: bf3aeea8c90a4e9b090e9298a20600b8f0b5ace3
2019-11-12 10:37:23 -08:00
Ariel Mashraki
73e294a21e dialect/sql: reduce the number of joins on neighbors without predicates (#154)
Summary:
Pull Request resolved: https://github.com/facebookincubator/ent/pull/154

Loading the "form" table is not required where there's no predicate on the join.

Reviewed By: alexsn

Differential Revision: D18421062

fbshipit-source-id: cb2a045a5a8a76ea4f07e5cf4305a6da338a616e
2019-11-10 21:51:32 -08:00
Ariel Mashraki
0ff49fe89f dialect/sql: add neighbors test for O2O with 2 types
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/146

Reviewed By: idoshveki

Differential Revision: D18369884

fbshipit-source-id: 8cba47de27831d317dbe438ccff49b61132f6085
2019-11-07 02:42:35 -08:00
Ariel Mashraki
6eb14bba9f dialect/sql: add O2O tests for graph neighbors
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/145

Reviewed By: naor9991

Differential Revision: D18354409

fbshipit-source-id: 0327443cfb8cae6c2136cf6acc4057a17d0e3e0c
2019-11-06 23:54:31 -08:00
Ariel Mashraki
7a6d1ce9dc dialect/sql: add tests for graph neighbors function
Summary: Pull Request resolved: https://github.com/facebookincubator/ent/pull/141

Reviewed By: naor9991

Differential Revision: D18333780

fbshipit-source-id: 920f1c77182ee2a5cbd942d6c9cceec448b9900b
2019-11-05 22:50:16 -08:00