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
The View work surfaced the first relation-level policy that naturally wants to live with the declaration a Query consumes: read-only. A Query already holds its table_schema, so read-only-ness should be DERIVED from the schema (Query::can_write() reads Schema::is_read_only(), Crud gates writes), not declared per-call - so a caller never has to know it is querying a view. That is landing as part of the View work: a read_only Schema property (default false; a view's schema sets it true).
The broader question
read_only is the first property to cross the columns/indexes boundary on Schema. Should Schema become the SINGLE relation-declaration surface - also carrying attributes that currently live on Table (engine, charset/collation, row_format, comment, ...)? That would make Schema the one thing a developer declares and both Table/View and Query consume, instead of splitting structure (Schema) from physical attributes (Table).
Appealing, but non-trivial:
BC: Table's engine/charset_collation/etc. config keys are @since released; moving their home needs care (accept on both, or deprecate).
Some attributes are genuinely Table-only (engine has no meaning for a view), so it is not a clean lift-and-shift - it is "which properties are relation-declaration vs installer-specific."
Research/design only. The read_only property ships with #235 regardless; this issue tracks whether to generalize the pattern. Related: #235, #237, #232.
Background
Fell out of the #235 (View) / #237 (Table decomposition) design. Today the declaration split is:
The View work surfaced the first relation-level policy that naturally wants to live with the declaration a
Queryconsumes: read-only. AQueryalready holds itstable_schema, so read-only-ness should be DERIVED from the schema (Query::can_write()readsSchema::is_read_only(),Crudgates writes), not declared per-call - so a caller never has to know it is querying a view. That is landing as part of the View work: aread_onlySchema property (default false; a view's schema sets it true).The broader question
read_onlyis the first property to cross the columns/indexes boundary onSchema. ShouldSchemabecome the SINGLE relation-declaration surface - also carrying attributes that currently live onTable(engine, charset/collation, row_format, comment, ...)? That would makeSchemathe one thing a developer declares and bothTable/ViewandQueryconsume, instead of splitting structure (Schema) from physical attributes (Table).Appealing, but non-trivial:
Table'sengine/charset_collation/etc. config keys are@sincereleased; moving their home needs care (accept on both, or deprecate).Scope
Research/design only. The
read_onlyproperty ships with #235 regardless; this issue tracks whether to generalize the pattern. Related: #235, #237, #232.