Struct mz_adapter::session::vars::SystemVars
source · pub struct SystemVars {Show 23 fields
config_has_synced_once: SystemVar<bool>,
max_aws_privatelink_connections: SystemVar<u32>,
max_tables: SystemVar<u32>,
max_sources: SystemVar<u32>,
max_sinks: SystemVar<u32>,
max_materialized_views: SystemVar<u32>,
max_clusters: SystemVar<u32>,
max_replicas_per_cluster: SystemVar<u32>,
max_databases: SystemVar<u32>,
max_schemas_per_database: SystemVar<u32>,
max_objects_per_schema: SystemVar<u32>,
max_secrets: SystemVar<u32>,
max_roles: SystemVar<u32>,
max_result_size: SystemVar<u32>,
allowed_cluster_replica_sizes: SystemVar<Vec<Ident>>,
enable_with_mutually_recursive: SystemVar<bool>,
persist_blob_target_size: SystemVar<usize>,
persist_compaction_minimum_timeout: SystemVar<Duration>,
persist_sink_minimum_batch_updates: SystemVar<usize>,
crdb_connect_timeout: SystemVar<Duration>,
dataflow_max_inflight_bytes: SystemVar<usize>,
metrics_retention: SystemVar<Duration>,
mock_audit_event_timestamp: SystemVar<Option<Timestamp>>,
}
Expand description
On disk variables.
See SessionVars
for more details on the Materialize configuration model.
Fields§
§config_has_synced_once: SystemVar<bool>
§max_aws_privatelink_connections: SystemVar<u32>
§max_tables: SystemVar<u32>
§max_sources: SystemVar<u32>
§max_sinks: SystemVar<u32>
§max_materialized_views: SystemVar<u32>
§max_clusters: SystemVar<u32>
§max_replicas_per_cluster: SystemVar<u32>
§max_databases: SystemVar<u32>
§max_schemas_per_database: SystemVar<u32>
§max_objects_per_schema: SystemVar<u32>
§max_secrets: SystemVar<u32>
§max_roles: SystemVar<u32>
§max_result_size: SystemVar<u32>
§allowed_cluster_replica_sizes: SystemVar<Vec<Ident>>
§enable_with_mutually_recursive: SystemVar<bool>
§persist_blob_target_size: SystemVar<usize>
§persist_compaction_minimum_timeout: SystemVar<Duration>
§persist_sink_minimum_batch_updates: SystemVar<usize>
§crdb_connect_timeout: SystemVar<Duration>
§dataflow_max_inflight_bytes: SystemVar<usize>
§metrics_retention: SystemVar<Duration>
§mock_audit_event_timestamp: SystemVar<Option<Timestamp>>
Implementations§
source§impl SystemVars
impl SystemVars
sourcepub fn iter(&self) -> impl Iterator<Item = &dyn Var>
pub fn iter(&self) -> impl Iterator<Item = &dyn Var>
Returns an iterator over the configuration parameters and their current values on disk.
sourcepub fn iter_synced(&self) -> impl Iterator<Item = &dyn Var>
pub fn iter_synced(&self) -> impl Iterator<Item = &dyn Var>
Returns an iterator over the configuration parameters and their current
values on disk. Compared to SystemVars::iter
, this should omit vars
that shouldn’t be synced by crate::config::SystemParameterFrontend
.
sourcepub fn get(&self, name: &str) -> Result<&dyn Var, AdapterError>
pub fn get(&self, name: &str) -> Result<&dyn Var, AdapterError>
Returns a Var
representing the configuration parameter with the
specified name.
Configuration parameters are matched case insensitively. If no such
configuration parameter exists, get
returns an error.
Note that if name
is known at compile time, you should instead use the
named accessor to access the variable with its true Rust type. For
example, self.get("max_tables").value()
returns the string
"25"
or the current value, while self.max_tables()
returns an i32.
Errors
The call will return an error:
- If
name
does not refer to a validSystemVars
field.
sourcepub fn is_default(
&self,
name: &str,
input: VarInput<'_>
) -> Result<bool, AdapterError>
pub fn is_default(
&self,
name: &str,
input: VarInput<'_>
) -> Result<bool, AdapterError>
Check if the given values
is the default value for the Var
identified by name
.
Errors
The call will return an error:
- If
name
does not refer to a validSystemVars
field. - If
values
does not represent a validSystemVars
value forname
.
sourcepub fn set(
&mut self,
name: &str,
input: VarInput<'_>
) -> Result<bool, AdapterError>
pub fn set(
&mut self,
name: &str,
input: VarInput<'_>
) -> Result<bool, AdapterError>
Sets the configuration parameter named name
to the value represented
by value
.
Like with SystemVars::get
, configuration parameters are matched case
insensitively. If value
is not valid, as determined by the underlying
configuration parameter, or if the named configuration parameter does
not exist, an error is returned.
Return a bool
value indicating whether the Var
identified by
name
was modified by this call (it won’t be if it already had the
given value
).
Errors
The call will return an error:
- If
name
does not refer to a validSystemVars
field. - If
value
does not represent a validSystemVars
value forname
.
sourcepub fn reset(&mut self, name: &str) -> Result<bool, AdapterError>
pub fn reset(&mut self, name: &str) -> Result<bool, AdapterError>
Sets the configuration parameter named name
to its default value.
Like with SystemVars::get
, configuration parameters are matched case
insensitively. If the named configuration parameter does not exist, an
error is returned.
Return a bool
value indicating whether the Var
identified by
name
was modified by this call (it won’t be if was already reset).
Errors
The call will return an error:
- If
name
does not refer to a validSystemVars
field.
sourcepub fn config_has_synced_once(&self) -> bool
pub fn config_has_synced_once(&self) -> bool
Returns the config_has_synced_once
configuration parameter.
sourcepub fn max_aws_privatelink_connections(&self) -> u32
pub fn max_aws_privatelink_connections(&self) -> u32
Returns the value of the max_aws_privatelink_connections
configuration parameter.
sourcepub fn max_tables(&self) -> u32
pub fn max_tables(&self) -> u32
Returns the value of the max_tables
configuration parameter.
sourcepub fn max_sources(&self) -> u32
pub fn max_sources(&self) -> u32
Returns the value of the max_sources
configuration parameter.
sourcepub fn max_materialized_views(&self) -> u32
pub fn max_materialized_views(&self) -> u32
Returns the value of the max_materialized_views
configuration parameter.
sourcepub fn max_clusters(&self) -> u32
pub fn max_clusters(&self) -> u32
Returns the value of the max_clusters
configuration parameter.
sourcepub fn max_replicas_per_cluster(&self) -> u32
pub fn max_replicas_per_cluster(&self) -> u32
Returns the value of the max_replicas_per_cluster
configuration parameter.
sourcepub fn max_databases(&self) -> u32
pub fn max_databases(&self) -> u32
Returns the value of the max_databases
configuration parameter.
sourcepub fn max_schemas_per_database(&self) -> u32
pub fn max_schemas_per_database(&self) -> u32
Returns the value of the max_schemas_per_database
configuration parameter.
sourcepub fn max_objects_per_schema(&self) -> u32
pub fn max_objects_per_schema(&self) -> u32
Returns the value of the max_objects_per_schema
configuration parameter.
sourcepub fn max_secrets(&self) -> u32
pub fn max_secrets(&self) -> u32
Returns the value of the max_secrets
configuration parameter.
sourcepub fn max_result_size(&self) -> u32
pub fn max_result_size(&self) -> u32
Returns the value of the max_result_size
configuration parameter.
sourcepub fn allowed_cluster_replica_sizes(&self) -> Vec<String> ⓘ
pub fn allowed_cluster_replica_sizes(&self) -> Vec<String> ⓘ
Returns the value of the allowed_cluster_replica_sizes
configuration parameter.
sourcepub fn persist_blob_target_size(&self) -> usize
pub fn persist_blob_target_size(&self) -> usize
Returns the persist_blob_target_size
configuration parameter.
sourcepub fn persist_compaction_minimum_timeout(&self) -> Duration
pub fn persist_compaction_minimum_timeout(&self) -> Duration
Returns the persist_compaction_minimum_timeout
configuration parameter.
sourcepub fn crdb_connect_timeout(&self) -> Duration
pub fn crdb_connect_timeout(&self) -> Duration
Returns the crdb_connect_timeout
configuration parameter.
sourcepub fn dataflow_max_inflight_bytes(&self) -> usize
pub fn dataflow_max_inflight_bytes(&self) -> usize
Returns the dataflow_max_inflight_bytes
configuration parameter.
sourcepub fn persist_sink_minimum_batch_updates(&self) -> usize
pub fn persist_sink_minimum_batch_updates(&self) -> usize
Returns the persist_sink_minimum_batch_updates
configuration parameter.
sourcepub fn metrics_retention(&self) -> Duration
pub fn metrics_retention(&self) -> Duration
Returns the metrics_retention
configuration parameter.
sourcepub fn mock_audit_event_timestamp(&self) -> Option<Timestamp>
pub fn mock_audit_event_timestamp(&self) -> Option<Timestamp>
Returns the mock_audit_event_timestamp
configuration parameter.
sourcepub fn enable_with_mutually_recursive(&self) -> bool
pub fn enable_with_mutually_recursive(&self) -> bool
Returns the enable_with_mutually_recursive
configuration parameter.
sourcepub fn set_enable_with_mutually_recursive(&mut self, value: bool) -> bool
pub fn set_enable_with_mutually_recursive(&mut self, value: bool) -> bool
Sets the enable_with_mutually_recursive
configuration parameter.
Trait Implementations§
source§impl Clone for SystemVars
impl Clone for SystemVars
source§fn clone(&self) -> SystemVars
fn clone(&self) -> SystemVars
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SystemVars
impl Debug for SystemVars
Auto Trait Implementations§
impl RefUnwindSafe for SystemVars
impl Send for SystemVars
impl Sync for SystemVars
impl Unpin for SystemVars
impl UnwindSafe for SystemVars
Blanket Implementations§
source§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage + 'static, Global>
source§impl<T> CloneableStorage for Twhere
T: Any + Send + Sync + Clone,
impl<T> CloneableStorage for Twhere
T: Any + Send + Sync + Clone,
fn clone_storage(&self) -> Box<dyn CloneableStorage + 'static, Global>
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.