Create a new materialized view - postgres docs
Arguments:
viewName
[Name] - name of the new materialized viewoptions
[object] - options:ifNotExists
[boolean] - default falsecolumns
[string or array] - use if you want to name columns differently then inferred from definitiontablespace
[string] - optionalstorageParameters
[object] - optional key value pairs of Storage Parametersdata
[boolean] - default undefined
definition
[string] - SQL of SELECT statement
Reverse Operation: dropMaterializedView
Drop a materialized view - postgres docs
Arguments:
viewName
[Name] - name of the view to deleteoptions
[object] - options:ifExists
[boolean] - drops view only if it existscascade
[boolean] - drops also dependent objects
Alter a materialized view - postgres docs
Arguments:
viewName
[Name] - name of the view to alteroptions
[object] - options:cluster
[string] - optional index name for clusteringextension
[string] - optional name of extension view is dependent onstorageParameters
[object] - optional key value pairs of Storage Parameters
Rename a materialized view - postgres docs
Arguments:
Rename a materialized view column - postgres docs
Arguments:
viewName
[Name] - name of the view to altercolumnName
[string] - current column namenewColumnName
[string] - new column name
Refreshes a materialized view - postgres docs
Arguments:
viewName
[Name] - old name of the viewoptions
[object] - options:concurrently
[boolean] - default falsedata
[boolean] - default undefined