You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create materialized view m_lentities_assets as
select l.id as lentity_id,
l.short_name as lentity_short_name,
l.full_name as lentity_full_name,
l.status as lentity_status,
m.role_id as lentity_role_id,
a.id as asset_id,
a.parent_id as asset_parent_id,
a.atypes_id as asset_atypes_id,
a.name as asset_name,
a.status as asset_status
from lentities l,
assets a,
lentity_assets m
where m.lentity_id = l.id
and m.asset_id = a.id
with no data;
refresh materialized view m_lentities_assets;
and query respectively:
-- name: MLentitiesAssetsGet :many
select *
from m_lentities_assets
order by @sql_order::text
limit @sql_limit offset @sql_offset;
but im unlucky yet...
Even for the read only selects i can't generate any result...
docker run --rm -v /Users/Stalker/workspace/src/gitlab.com/company/be:/src -w /src kjconroy/sqlc generate
# package dbs
storage/query/m_lentities_assets.sql:1:1: relation "m_lentities_assets" does not exist
make: *** [generate-dbs] Error 1
Activity
kyleconroy commentedon Jun 25, 2021
View support was added in #1044. Materialized view support has not been added yet.
prog8 commentedon Mar 4, 2022
Is there any plan to add materialized view support?
ludusrusso commentedon Mar 22, 2022
Is there someone on this issue? @kyleconroy I could try to work on a PR if is ok for you!
kyleconroy commentedon Mar 24, 2022
Sure! Would love to support this.