pub struct GeneralViewMetadataBuilder<T: Representation> { /* private fields */ }Expand description
Builder for GeneralViewMetadata.
Implementations§
source§impl<T: Representation + Clone> GeneralViewMetadataBuilder<T>
impl<T: Representation + Clone> GeneralViewMetadataBuilder<T>
sourcepub fn view_uuid(&mut self, value: Uuid) -> &mut Self
pub fn view_uuid(&mut self, value: Uuid) -> &mut Self
A UUID that identifies the view, generated when the view is created. Implementations must throw an exception if a view’s UUID does not match the expected UUID after refreshing metadata
sourcepub fn format_version(&mut self, value: FormatVersion) -> &mut Self
pub fn format_version(&mut self, value: FormatVersion) -> &mut Self
An integer version number for the view format; must be 1
sourcepub fn location<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn location<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The view’s base location. This is used to determine where to store manifest files and view metadata files.
sourcepub fn current_version_id(&mut self, value: i64) -> &mut Self
pub fn current_version_id(&mut self, value: i64) -> &mut Self
Current version of the view. Set to ‘1’ when the view is first created.
sourcepub fn versions(&mut self, value: HashMap<i64, Version<T>>) -> &mut Self
pub fn versions(&mut self, value: HashMap<i64, Version<T>>) -> &mut Self
An array of structs describing the last known versions of the view. Controlled by the table property: “version.history.num-entries”. See section Versions.
sourcepub fn with_version<VALUE>(&mut self, item: VALUE) -> &mut Self
pub fn with_version<VALUE>(&mut self, item: VALUE) -> &mut Self
An array of structs describing the last known versions of the view. Controlled by the table property: “version.history.num-entries”. See section Versions.
sourcepub fn version_log(&mut self, value: Vec<VersionLogStruct>) -> &mut Self
pub fn version_log(&mut self, value: Vec<VersionLogStruct>) -> &mut Self
A list of timestamp and version ID pairs that encodes changes to the current version for the view. Each time the current-version-id is changed, a new entry should be added with the last-updated-ms and the new current-version-id.
sourcepub fn schemas(&mut self, value: HashMap<i32, Schema>) -> &mut Self
pub fn schemas(&mut self, value: HashMap<i32, Schema>) -> &mut Self
A list of schemas, the same as the ‘schemas’ field from Iceberg table spec.
sourcepub fn with_schema<VALUE>(&mut self, item: VALUE) -> &mut Self
pub fn with_schema<VALUE>(&mut self, item: VALUE) -> &mut Self
A list of schemas, the same as the ‘schemas’ field from Iceberg table spec.
sourcepub fn properties(&mut self, value: HashMap<String, String>) -> &mut Self
pub fn properties(&mut self, value: HashMap<String, String>) -> &mut Self
A string to string map of view properties. This is used for metadata such as “comment” and for settings that affect view maintenance. This is not intended to be used for arbitrary metadata.
sourcepub fn build(
&self
) -> Result<GeneralViewMetadata<T>, GeneralViewMetadataBuilderError>
pub fn build( &self ) -> Result<GeneralViewMetadata<T>, GeneralViewMetadataBuilderError>
Trait Implementations§
source§impl<T: Clone + Representation> Clone for GeneralViewMetadataBuilder<T>
impl<T: Clone + Representation> Clone for GeneralViewMetadataBuilder<T>
source§fn clone(&self) -> GeneralViewMetadataBuilder<T>
fn clone(&self) -> GeneralViewMetadataBuilder<T>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more