-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow querying inheritance data from database
- Loading branch information
1 parent
6733045
commit 903df43
Showing
5 changed files
with
111 additions
and
81 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
apps/hash-graph/libs/graph/postgres_migrations/V31__data_type_inheritance_aggregation.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
CREATE VIEW data_type_inherits_from_aggregation AS | ||
SELECT | ||
source_data_type_ontology_id, | ||
array_agg(target_data_type_ontology_id) AS target_data_type_ontology_ids, | ||
array_agg(depth) AS depths | ||
FROM data_type_inherits_from | ||
GROUP BY source_data_type_ontology_id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters