pub struct QueryAdmissionPolicy { /* private fields */ }Expand description
Read-admission policy attached to one query surface.
Implementations§
Source§impl QueryAdmissionPolicy
impl QueryAdmissionPolicy
Sourcepub const fn public_read(
max_returned_rows: NonZeroU32,
max_response_bytes: NonZeroU32,
) -> Self
pub const fn public_read( max_returned_rows: NonZeroU32, max_response_bytes: NonZeroU32, ) -> Self
Build the safe default policy for caller-facing bounded read endpoints.
Sourcepub const fn admin_ad_hoc(
max_returned_rows: NonZeroU32,
max_scanned_rows: NonZeroU64,
max_response_bytes: NonZeroU32,
) -> Self
pub const fn admin_ad_hoc( max_returned_rows: NonZeroU32, max_scanned_rows: NonZeroU64, max_response_bytes: NonZeroU32, ) -> Self
Build a trusted ad-hoc policy with explicit execution budgets.
Sourcepub const fn diagnostic_explain() -> Self
pub const fn diagnostic_explain() -> Self
Build an EXPLAIN-only policy that cannot execute rows.
Sourcepub const fn dev_test_unbounded() -> Self
pub const fn dev_test_unbounded() -> Self
Build an unbounded test policy for local harnesses only.
Sourcepub const fn lane(&self) -> QueryAdmissionLane
pub const fn lane(&self) -> QueryAdmissionLane
Return the lane this policy governs.
Sourcepub const fn require_limit(&self) -> bool
pub const fn require_limit(&self) -> bool
Return whether the surface requires caller-visible LIMIT.
Sourcepub const fn max_returned_rows(&self) -> Option<NonZeroU32>
pub const fn max_returned_rows(&self) -> Option<NonZeroU32>
Return the maximum rows that may be returned.
Sourcepub const fn max_scanned_rows(&self) -> Option<NonZeroU64>
pub const fn max_scanned_rows(&self) -> Option<NonZeroU64>
Return the maximum rows that may be scanned.
Sourcepub const fn max_response_bytes(&self) -> Option<NonZeroU32>
pub const fn max_response_bytes(&self) -> Option<NonZeroU32>
Return the maximum response bytes.
Sourcepub const fn require_index(&self) -> bool
pub const fn require_index(&self) -> bool
Return whether the selected plan must use an index-backed path.
Sourcepub const fn reject_non_zero_offset(&self) -> bool
pub const fn reject_non_zero_offset(&self) -> bool
Return whether this surface rejects non-zero OFFSET execution.
Sourcepub const fn allow_full_scan(&self) -> bool
pub const fn allow_full_scan(&self) -> bool
Return whether a full entity scan may execute.
Sourcepub const fn allow_materialized_sort(&self) -> bool
pub const fn allow_materialized_sort(&self) -> bool
Return whether this surface permits materialized ORDER BY execution.
Sourcepub const fn max_materialized_rows(&self) -> Option<NonZeroU32>
pub const fn max_materialized_rows(&self) -> Option<NonZeroU32>
Return the maximum rows that may be materialized for sort/projection work.
Sourcepub const fn max_projection_columns(&self) -> Option<NonZeroU32>
pub const fn max_projection_columns(&self) -> Option<NonZeroU32>
Return the maximum projected columns.
Sourcepub const fn grouped(&self) -> GroupedAdmissionPolicy
pub const fn grouped(&self) -> GroupedAdmissionPolicy
Return grouped/aggregate budgets.
Sourcepub const fn public_caps_are_finite(&self) -> bool
pub const fn public_caps_are_finite(&self) -> bool
Return whether public-read construction kept the mandatory finite caps.
Sourcepub fn evaluate(&self, summary: QueryAdmissionSummary) -> QueryAdmissionSummary
pub fn evaluate(&self, summary: QueryAdmissionSummary) -> QueryAdmissionSummary
Apply this policy to one already-summarized plan.
Trait Implementations§
Source§impl Clone for QueryAdmissionPolicy
impl Clone for QueryAdmissionPolicy
Source§fn clone(&self) -> QueryAdmissionPolicy
fn clone(&self) -> QueryAdmissionPolicy
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 QueryAdmissionPolicy
impl Debug for QueryAdmissionPolicy
impl Eq for QueryAdmissionPolicy
Source§impl PartialEq for QueryAdmissionPolicy
impl PartialEq for QueryAdmissionPolicy
Source§fn eq(&self, other: &QueryAdmissionPolicy) -> bool
fn eq(&self, other: &QueryAdmissionPolicy) -> bool
self and other values to be equal, and is used by ==.