pub enum DatabaseWarning {
Show 13 variants
MissingRelation {
query_name: String,
sql_source: String,
},
MissingFunction {
mutation_name: String,
sql_source: String,
},
MissingTypeSource {
type_name: String,
sql_source: String,
},
MissingAdditionalView {
query_name: String,
view_name: String,
},
MissingJsonColumn {
query_name: String,
sql_source: String,
column_name: String,
},
WrongJsonColumnType {
query_name: String,
sql_source: String,
column_name: String,
actual_type: String,
},
MissingPaginationColumn {
query_name: String,
sql_source: String,
column_name: String,
},
PaginationIdentityFallback {
query_name: String,
sql_source: String,
pk_column: String,
},
SelfOrderingView {
query_name: String,
sql_source: String,
},
MissingCursorColumn {
query_name: String,
sql_source: String,
column_name: String,
},
MissingJsonKey {
query_name: String,
type_name: String,
sql_source: String,
json_column: String,
field_name: String,
json_key: String,
field_required: bool,
},
NativeColumnFallback {
query_name: String,
sql_source: String,
arg_name: String,
},
TypeConvertibility {
query_name: String,
sql_source: String,
arg_name: String,
graphql_type: String,
column_type: String,
},
}Expand description
A single database validation warning.
Variants§
MissingRelation
L1: sql_source relation does not exist.
Fields
MissingFunction
L1: a mutation’s sql_source function does not exist.
Distinct from MissingRelation: a mutation’s
sql_source names a SQL function (the runtime calls
SELECT * FROM fn(...)), not a view/table, so it is probed via pg_proc
rather than the relation catalog.
Fields
MissingTypeSource
L1: a @fraiseql.type’s declared sql_source view does not exist (#653).
Most often an embedded value object the SDK gave a synthesized v_<name> source by
naming convention (a view that was never authored). Advisory only — it never fails
the compile; the hard FRAISEQL_VALIDATE_SQL_SOURCES gate deliberately does not
probe type sources (it would drown in synthesized-source noise), so this warn-grade
path under --database is the only place phantom type sources surface.
Fields
MissingAdditionalView
L1: additional_view does not exist.
MissingJsonColumn
L2: jsonb_column does not exist on the relation.
Fields
WrongJsonColumnType
L2: jsonb_column exists but is not a JSON/JSONB type.
Fields
MissingPaginationColumn
L2: an authored pagination_order column does not exist on the relation (#1303).
The same shape as MissingCursorColumn and
error-grade for the same reason: the column is rendered into ORDER BY, so
a name the relation does not carry is a query that fails at request time,
on a route that compiled cleanly.
Fields
PaginationIdentityFallback
L2: no cheaper unique column was found, so pages stay ordered by
data->>'id' (#1303).
Advisory: the ordering is correct, and correct is the point — id is an
enforced invariant (ADR-0017), so the extraction orders every type. It is
simply the most expensive of the three known spellings, and the relation is
the only place a cheaper one could have come from.
Fields
SelfOrderingView
L2: the view carries its own ORDER BY and the query did not declare
pagination_order = "none" (#1303).
The one case where ordering pages by the entity identity is a regression:
a self-ordering view is the compiler’s own documented remedy for
order_by = false, and a default ordering replaces the author’s order
rather than adding to it. Advisory rather than error-grade because
pg_get_viewdef cannot tell a top-level ORDER BY from one inside a
subquery or window frame, where imposing a page order is entirely correct —
so this reports a suspicion, and the author resolves it by declaring either
way.
MissingCursorColumn
L2: relay_cursor_column does not exist on the relation.
Fields
MissingJsonKey
L3: a JSON key path is declared but not found in sampled data.
Fields
NativeColumnFallback
L2: a direct query argument has no matching native column — will fall back to JSONB extraction.
For best performance, consider adding a native column with the same name
and an index on the sql_source table/view.
Fields
TypeConvertibility
L2: a direct query argument resolves to a native column whose SQL type cannot
cleanly drive the predicate for the argument’s GraphQL scalar type (e.g. an
Int argument filtering a uuid column — WHERE col = $N errors or never
matches).
Implementations§
Source§impl DatabaseWarning
impl DatabaseWarning
Sourcepub const fn severity(&self) -> Severity
pub const fn severity(&self) -> Severity
The severity of this finding under compile --database (#384).
Error-severity drift fails the compile (unless --allow-drift):
the declared schema names database objects that do not exist or cannot
serve the declared shape, so the first query/mutation against them fails
at runtime. Warn-severity findings are advisory:
MissingTypeSourceis warn-grade by design (#653): synthesized value-object sources would drown a hard gate.MissingJsonKeyis sampling-based; a nullable field may legitimately be unset in every sampled row, so only a required field’s absent key is an error.NativeColumnFallbackis a performance advisory — the JSONB path is correct, just slower.
Trait Implementations§
Source§impl Debug for DatabaseWarning
impl Debug for DatabaseWarning
Auto Trait Implementations§
impl Freeze for DatabaseWarning
impl RefUnwindSafe for DatabaseWarning
impl Send for DatabaseWarning
impl Sync for DatabaseWarning
impl Unpin for DatabaseWarning
impl UnsafeUnpin for DatabaseWarning
impl UnwindSafe for DatabaseWarning
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> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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 moreSource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<E> Sanitize for Ewhere
E: Display,
impl<E> Sanitize for Ewhere
E: Display,
Source§fn sanitized(self, user_message: &str) -> SanitizedError
fn sanitized(self, user_message: &str) -> SanitizedError
impl<T> Send for Twhere
T: ?Sized,
impl<T> Sync for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more