pub struct AnalysisOptions {
pub default_scope: Scope,
pub event_type_info: Type,
pub custom_types: HashSet<Ascii<String>>,
}Expand description
Configuration options for static analysis.
This structure contains the type information needed to perform static analysis on EventQL queries, including the default scope with built-in functions and the type information for event records.
Fields§
§default_scope: ScopeThe default scope containing built-in functions and their type signatures.
event_type_info: TypeType information for event records being queried.
custom_types: HashSet<Ascii<String>>Custom types that are not defined in the EventQL reference.
This set allows users to register custom type names that can be used
in type conversion expressions (e.g., field AS CustomType). Custom
type names are case-insensitive.
§Examples
use eventql_parser::prelude::AnalysisOptions;
let options = AnalysisOptions::default()
.add_custom_type("Foobar");Implementations§
Source§impl AnalysisOptions
impl AnalysisOptions
Sourcepub fn add_custom_type<'a>(self, value: impl Into<Cow<'a, str>>) -> Self
pub fn add_custom_type<'a>(self, value: impl Into<Cow<'a, str>>) -> Self
Adds a custom type name to the analysis options.
Custom types allow you to use type conversion syntax with types that are not part of the standard EventQL type system. The type name is stored case-insensitively.
§Arguments
value- The custom type name to register
§Returns
Returns self to allow for method chaining.
§Examples
use eventql_parser::prelude::AnalysisOptions;
let options = AnalysisOptions::default()
.add_custom_type("Timestamp")
.add_custom_type("UUID");