pub enum ViewUpdate<T: Materialization> {
AssignUUID {
uuid: String,
},
UpgradeFormatVersion {
format_version: i32,
},
AddSchema {
schema: Schema,
last_column_id: Option<i32>,
},
SetLocation {
location: String,
},
SetProperties {
updates: HashMap<String, String>,
},
RemoveProperties {
removals: Vec<String>,
},
AddViewVersion {
view_version: Version<T>,
},
SetCurrentViewVersion {
view_version_id: i64,
},
}
Expand description
Updates that can be applied to view metadata in a commit operation
This enum represents all possible modifications that can be made to view metadata:
- UUID assignment (only during view creation)
- Format version updates
- Schema modifications
- Location and property updates
- Version management (add versions, set current version)
§Type Parameters
T
- The materialization type for the view, typicallyOption<()>
for regular views orFullIdentifier
for materialized views
Each variant includes the necessary data for that specific update type. Updates are applied atomically as part of a commit operation.
Variants§
AssignUUID
Assigning a UUID to a table/view should only be done when creating the table/view. It is not safe to re-assign the UUID if a table/view already has a UUID assigned
UpgradeFormatVersion
Update format version
AddSchema
The highest assigned column ID for the table. This is used to ensure columns are always assigned an unused ID when evolving schemas. When omitted, it will be computed on the server side.
SetLocation
Set a new location for the table
SetProperties
Set table properties
RemoveProperties
Remove table properties
AddViewVersion
Add a new version to the view
SetCurrentViewVersion
The view version id to set as current, or -1 to set last added view version id
Trait Implementations§
Source§impl<T: Clone + Materialization> Clone for ViewUpdate<T>
impl<T: Clone + Materialization> Clone for ViewUpdate<T>
Source§fn clone(&self) -> ViewUpdate<T>
fn clone(&self) -> ViewUpdate<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl<T: Debug + Materialization> Debug for ViewUpdate<T>
impl<T: Debug + Materialization> Debug for ViewUpdate<T>
Source§impl<'de, T> Deserialize<'de> for ViewUpdate<T>where
T: Deserialize<'de> + Materialization,
impl<'de, T> Deserialize<'de> for ViewUpdate<T>where
T: Deserialize<'de> + Materialization,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<T: PartialEq + Materialization> PartialEq for ViewUpdate<T>
impl<T: PartialEq + Materialization> PartialEq for ViewUpdate<T>
Source§impl<T> Serialize for ViewUpdate<T>where
T: Serialize + Materialization,
impl<T> Serialize for ViewUpdate<T>where
T: Serialize + Materialization,
impl<T: Materialization> StructuralPartialEq for ViewUpdate<T>
Auto Trait Implementations§
impl<T> Freeze for ViewUpdate<T>where
T: Freeze,
impl<T> RefUnwindSafe for ViewUpdate<T>where
T: RefUnwindSafe,
impl<T> Send for ViewUpdate<T>where
T: Send,
impl<T> Sync for ViewUpdate<T>where
T: Sync,
impl<T> Unpin for ViewUpdate<T>where
T: Unpin,
impl<T> UnwindSafe for ViewUpdate<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more