pub struct ReportConfig {
pub id: String,
pub name: String,
pub description: Option<String>,
pub schemas: Vec<String>,
pub sql: String,
pub params: Vec<ReportParam>,
pub validate_on_register: Option<bool>,
pub cache_ttl_secs: Option<i64>,
}Expand description
A read-only reporting query. The SQL is trusted (authored at deploy time, admin-gated on
registration); only the declared params are runtime input. Named params (:from, :to) are
translated to positional placeholders when the model is resolved. Reports carry no DDL — they
are pure metadata and can be added/updated/removed at runtime without touching the schema.
Fields§
§id: String§name: String§description: Option<String>§schemas: Vec<String>SQL schemas the query references (used for read-only role grants and a fast pre-check).
sql: StringParameterized SQL using named params, e.g. SELECT ... WHERE created_at >= :from.
params: Vec<ReportParam>§validate_on_register: Option<bool>When true (the default), the SQL is validated with EXPLAIN at registration time so
missing tables/columns fail fast rather than at first run. Set false for reports that
reference packages installed later (lazy validation at run time).
cache_ttl_secs: Option<i64>Per-report result-cache TTL in seconds. Only used when result caching is enabled globally
(env ARCHITECT_REPORT_CACHE). Falls back to ARCHITECT_REPORT_CACHE_TTL_SECS when unset;
a value of 0 disables caching for this report even when the global flag is on.
Trait Implementations§
Source§impl Clone for ReportConfig
impl Clone for ReportConfig
Source§fn clone(&self) -> ReportConfig
fn clone(&self) -> ReportConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ReportConfig
impl Debug for ReportConfig
Source§impl<'de> Deserialize<'de> for ReportConfig
impl<'de> Deserialize<'de> for ReportConfig
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>,
Auto Trait Implementations§
impl Freeze for ReportConfig
impl RefUnwindSafe for ReportConfig
impl Send for ReportConfig
impl Sync for ReportConfig
impl Unpin for ReportConfig
impl UnsafeUnpin for ReportConfig
impl UnwindSafe for ReportConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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