move our dbsp-based views to materialized views

We will implement normal SQLite-style view-as-an-alias for
compatibility, and will call our incremental views materialized views.
This commit is contained in:
Glauber Costa
2025-08-12 14:06:19 -05:00
parent a6247e891f
commit 770f86e490
6 changed files with 65 additions and 23 deletions

View File

@@ -478,6 +478,11 @@ cmd ::= createkw temp(T) VIEW ifnotexists(E) fullname(Y) eidlist_opt(C)
self.ctx.stmt = Some(Stmt::CreateView{ temporary: T, if_not_exists: E, view_name: Y, columns: C,
select: Box::new(S) });
}
cmd ::= createkw MATERIALIZED VIEW ifnotexists(E) fullname(Y) eidlist_opt(C)
AS select(S). {
self.ctx.stmt = Some(Stmt::CreateMaterializedView{ if_not_exists: E, view_name: Y, columns: C,
select: Box::new(S) });
}
cmd ::= DROP VIEW ifexists(E) fullname(X). {
self.ctx.stmt = Some(Stmt::DropView{ if_exists: E, view_name: X });
}