pub struct AliasRecord {
pub name: String,
pub sources: SourceSpec,
pub aggregator: Option<AliasAggregator>,
pub filter: String,
pub default_limit: Option<u32>,
pub description: Option<String>,
pub params_schema: Option<String>,
pub scope: Option<AliasScope>,
}Expand description
A single global alias record.
filter is stored verbatim — either a serialised
crate::filter::ListFilter JSON string, or a MiniJinja template
string when params_schema is Some. sources / aggregator are
serialised via serde_json at the storage boundary.
Fields§
§name: StringAlias name (PRIMARY KEY within each scope’s _global_aliases).
sources: SourceSpecSource-table specifier (Single / Multi / Pattern).
aggregator: Option<AliasAggregator>Optional aggregator (None means a plain Rows alias).
filter: StringSerialised filter JSON or MiniJinja template string.
default_limit: Option<u32>Optional default limit to apply when alias_run does not supply one.
description: Option<String>Optional human-readable description.
params_schema: Option<String>Optional JSON array of parameter name strings (e.g. ["project","owner"]).
None means the alias takes no parameters.
scope: Option<AliasScope>Origin scope of this record after alias_get / alias_list.
None for newly-constructed records that have not yet been
persisted or loaded.
Implementations§
Source§impl AliasRecord
impl AliasRecord
Sourcepub fn new(
name: impl Into<String>,
sources: SourceSpec,
aggregator: Option<AliasAggregator>,
filter: impl Into<String>,
default_limit: Option<u32>,
description: Option<String>,
params_schema: Option<String>,
) -> Self
pub fn new( name: impl Into<String>, sources: SourceSpec, aggregator: Option<AliasAggregator>, filter: impl Into<String>, default_limit: Option<u32>, description: Option<String>, params_schema: Option<String>, ) -> Self
Construct a new record with scope = None. Persistence assigns
the scope via GlobalAliasStorage::alias_create.
Trait Implementations§
Source§impl Clone for AliasRecord
impl Clone for AliasRecord
Source§fn clone(&self) -> AliasRecord
fn clone(&self) -> AliasRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more