Fixes #1239, support resource embedding on materialized views
This commit is contained in:
committed by
Steve Chávez
parent
1f513f24a5
commit
9387e70b66
@@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
### Added
|
### Added
|
||||||
|
|
||||||
- #690, Add `?columns` query parameter for faster bulk inserts, also ignores unspecified json keys in a payload - @steve-chavez
|
- #690, Add `?columns` query parameter for faster bulk inserts, also ignores unspecified json keys in a payload - @steve-chavez
|
||||||
|
- #1239, Add support for resource embedding on materialized views - @vitorbaptista
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -722,7 +722,7 @@ allSynonyms cols pgVer =
|
|||||||
from pg_class c
|
from pg_class c
|
||||||
join pg_namespace n on n.oid = c.relnamespace
|
join pg_namespace n on n.oid = c.relnamespace
|
||||||
join pg_rewrite r on r.ev_class = c.oid
|
join pg_rewrite r on r.ev_class = c.oid
|
||||||
where (c.relkind = 'v'::char) and n.nspname = $1
|
where (c.relkind in ('v', 'm')) and n.nspname = $1
|
||||||
),
|
),
|
||||||
removed_subselects as(
|
removed_subselects as(
|
||||||
select
|
select
|
||||||
|
|||||||
@@ -333,6 +333,9 @@ spec = do
|
|||||||
it "can detect fk relations through views to tables in the public schema" $
|
it "can detect fk relations through views to tables in the public schema" $
|
||||||
get "/consumers_view?select=*,orders_view(*)" `shouldRespondWith` 200
|
get "/consumers_view?select=*,orders_view(*)" `shouldRespondWith` 200
|
||||||
|
|
||||||
|
it "can detect fk relations through materialized views to tables in the public schema" $
|
||||||
|
get "/materialized_projects?select=*,users(*)" `shouldRespondWith` 200
|
||||||
|
|
||||||
it "can request parent without specifying primary key" $
|
it "can request parent without specifying primary key" $
|
||||||
get "/articleStars?select=createdAt,article(owner),user(name)&limit=1" `shouldRespondWith`
|
get "/articleStars?select=createdAt,article(owner),user(name)&limit=1" `shouldRespondWith`
|
||||||
[json|[{"createdAt":"2015-12-08T04:22:57.472738","article":{"owner": "postgrest_test_authenticator"},"user":{"name": "Angela Martin"}}]|]
|
[json|[{"createdAt":"2015-12-08T04:22:57.472738","article":{"owner": "postgrest_test_authenticator"},"user":{"name": "Angela Martin"}}]|]
|
||||||
|
|||||||
Reference in New Issue
Block a user