OptionalnameOptionaldefinitionWhat the materialized view selects, as query options rather than SQL.
Preferred over query; see ViewOptions.definition.
OptionalqueryThe SELECT statement that defines the materialized view.
OptionalqueryA function that returns the SELECT statement. Useful when the query depends on runtime values or other model table names.
OptionalschemaOptional schema prefix (e.g. 'public' for PostgreSQL).
OptionalreplaceIf true, uses CREATE OR REPLACE MATERIALIZED VIEW. Default: false.
OptionalifIf true, uses CREATE MATERIALIZED VIEW IF NOT EXISTS. Default: false.
OptionalwithIf false, uses WITH NO DATA (creates view without populating data). Default: true.
OptionaluniqueUnique index name for CONCURRENTLY refresh support. If provided, a unique index will be created on the specified column(s).
OptionalrefreshRefresh strategy for the materialized view.
OptionalcommentOptional comment for the materialized view.
The materialized view name in the database. Defaults to the class name (snake_cased) if not provided.