pub enum QailBuildError {
RlsInsertRequiresExplicitColumns {
table: String,
tenant_column: String,
},
RlsTenantColumnMutationDenied {
table: String,
tenant_column: String,
},
RlsMergeSourceTenantProjectionRequired {
table: String,
tenant_column: String,
},
RlsRegistryUninitialized {
table: String,
},
RlsRegistryUnavailable {
table: String,
reason: String,
},
RlsScopeMissing {
table: String,
scope: &'static str,
column: String,
},
RlsJoinKindUnsupported {
table: String,
join_kind: String,
},
RlsOwnerMergeUnsupported {
table: String,
owner_column: String,
},
RelationRegistryLock(String),
AmbiguousRelation {
from_table: String,
to_table: String,
foreign_key_count: usize,
},
RelationNotFound {
from_table: String,
to_table: String,
},
}Expand description
Error type for query-builder operations.
Variants§
RlsInsertRequiresExplicitColumns
RLS insertion cannot safely align positional values without columns.
Fields
RlsTenantColumnMutationDenied
RLS-protected updates cannot rewrite the tenant column.
Fields
RlsMergeSourceTenantProjectionRequired
RLS-protected MERGE query sources need a tenant projection for safe row classification.
Fields
RlsRegistryUninitialized
with_rls was called before the process declared its scope registries.
Call qail_core::rls::init_scope_registries(&schema) (AST injection
from schema metadata) or declare_policy_only_isolation(reason) (DB
policies only) at application startup.
A scope registry could not be read (poisoned lock) while scoping.
Fail-closed: “cannot read the registry” must never be interpreted as “table is unregistered”, or a late poison would disable every tenant/owner predicate in the process at once.
RlsScopeMissing
A registered RLS table was scoped with a context lacking the scope it requires.
Fail-closed: a tenant-registered table needs a tenant (or global) context; an owner-registered table needs an authenticated user.
Fields
RlsJoinKindUnsupported
A joined RLS relation cannot be scoped through this join kind.
RIGHT/FULL joins reintroduce rows the ON predicate rejects, so a scope predicate on the joined side does not isolate.
RlsOwnerMergeUnsupported
Owner-scoped MERGE is not supported by AST injection.
Fields
RelationRegistryLock(String)
Runtime relation registry lock failed.
AmbiguousRelation
Relation metadata has more than one possible join edge.
Fields
RelationNotFound
No schema relation could be found for an implicit join.
Trait Implementations§
Source§impl Clone for QailBuildError
impl Clone for QailBuildError
Source§fn clone(&self) -> QailBuildError
fn clone(&self) -> QailBuildError
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 QailBuildError
impl Debug for QailBuildError
Source§impl Display for QailBuildError
impl Display for QailBuildError
impl Eq for QailBuildError
Source§impl Error for QailBuildError
impl Error for QailBuildError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()