Struct schema_connector::warnings::Warnings
source · pub struct Warnings {Show 38 fields
pub fields_with_empty_names_in_model: Vec<ModelAndField>,
pub fields_with_empty_names_in_view: Vec<ViewAndField>,
pub fields_with_empty_names_in_type: Vec<TypeAndField>,
pub remapped_fields_in_model: Vec<ModelAndField>,
pub remapped_fields_in_view: Vec<ViewAndField>,
pub enum_values_with_empty_names: Vec<EnumAndValue>,
pub models_without_columns: Vec<Model>,
pub models_without_identifiers: Vec<Model>,
pub views_without_identifiers: Vec<View>,
pub reintrospected_id_names_in_model: Vec<Model>,
pub reintrospected_id_names_in_view: Vec<View>,
pub unsupported_types_in_model: Vec<ModelAndFieldAndType>,
pub unsupported_types_in_view: Vec<ViewAndFieldAndType>,
pub unsupported_types_in_type: Vec<TypeAndFieldAndType>,
pub remapped_models: Vec<Model>,
pub remapped_views: Vec<View>,
pub remapped_values: Vec<EnumAndValue>,
pub remapped_enums: Vec<Enum>,
pub reintrospected_relations: Vec<Model>,
pub duplicate_names: Vec<TopLevelItem>,
pub partition_tables: Vec<Model>,
pub inherited_tables: Vec<Model>,
pub non_default_index_null_sort_order: Vec<IndexedColumn>,
pub row_level_security_tables: Vec<Model>,
pub check_constraints: Vec<ModelAndConstraint>,
pub exclusion_constraints: Vec<ModelAndConstraint>,
pub row_level_ttl: Vec<Model>,
pub non_default_deferring: Vec<ModelAndConstraint>,
pub expression_indexes: Vec<ModelAndConstraint>,
pub objects_with_comments: Vec<Object>,
pub model_fields_pointing_to_an_empty_type: Vec<ModelAndField>,
pub type_fields_pointing_to_an_empty_type: Vec<TypeAndField>,
pub model_fields_with_unknown_type: Vec<ModelAndField>,
pub type_fields_with_unknown_type: Vec<TypeAndField>,
pub undecided_types_in_models: Vec<ModelAndFieldAndType>,
pub undecided_types_in_types: Vec<TypeAndFieldAndType>,
pub json_schema_defined: Vec<Model>,
pub capped_collection: Vec<Model>,
}
Expand description
Collections used for warning generation. These should be preferred over directly creating warnings from the code, to prevent spamming the user.
Fields§
§fields_with_empty_names_in_model: Vec<ModelAndField>
Fields having an empty name.
fields_with_empty_names_in_view: Vec<ViewAndField>
Fields having an empty name.
fields_with_empty_names_in_type: Vec<TypeAndField>
Fields having an empty name.
remapped_fields_in_model: Vec<ModelAndField>
Field names in models we remapped during introspection.
remapped_fields_in_view: Vec<ViewAndField>
Field names in views we remapped during introspection.
enum_values_with_empty_names: Vec<EnumAndValue>
Enum values that are empty strings.
models_without_columns: Vec<Model>
Models that have no fields.
models_without_identifiers: Vec<Model>
Models missing a id or unique constraint.
views_without_identifiers: Vec<View>
Views missing a id or unique constraint.
reintrospected_id_names_in_model: Vec<Model>
If the id attribute has a name taken from a previous model.
reintrospected_id_names_in_view: Vec<View>
If the id attribute has a name taken from a previous view.
unsupported_types_in_model: Vec<ModelAndFieldAndType>
The field in model has a type we do not currently support in Prisma.
unsupported_types_in_view: Vec<ViewAndFieldAndType>
The field in view has a type we do not currently support in Prisma.
unsupported_types_in_type: Vec<TypeAndFieldAndType>
The field in the composite type has a type we do not currently support in Prisma.
remapped_models: Vec<Model>
The name of the model is taken from a previous data model.
remapped_views: Vec<View>
The name of the view is taken from a previous data model.
remapped_values: Vec<EnumAndValue>
The name of the enum variant is taken from a previous data model.
remapped_enums: Vec<Enum>
The name of the enum is taken from a previous data model.
reintrospected_relations: Vec<Model>
The relation is copied from a previous data model, only if
relationMode
is prisma
.
duplicate_names: Vec<TopLevelItem>
The name of these models or enums was a dupe in the PSL.
partition_tables: Vec<Model>
Warn about using partition tables, which only have introspection support.
inherited_tables: Vec<Model>
Warn about using inherited tables, which only have introspection support.
non_default_index_null_sort_order: Vec<IndexedColumn>
Warn about non-default NULLS FIRST/NULLS LAST in indices.
row_level_security_tables: Vec<Model>
Warn about using row level security, which is currently unsupported.
check_constraints: Vec<ModelAndConstraint>
Warn about check constraints.
exclusion_constraints: Vec<ModelAndConstraint>
Warn about exclusion constraints.
row_level_ttl: Vec<Model>
Warn about row level TTL
non_default_deferring: Vec<ModelAndConstraint>
Warn about non-default unique deferring setup
expression_indexes: Vec<ModelAndConstraint>
Warning about Expression Indexes.
objects_with_comments: Vec<Object>
Warn about comments
model_fields_pointing_to_an_empty_type: Vec<ModelAndField>
Warn about fields which point to an empty type.
type_fields_pointing_to_an_empty_type: Vec<TypeAndField>
Warn about compositefields which point to an empty type.
model_fields_with_unknown_type: Vec<ModelAndField>
Warn about unknown types in a model.
type_fields_with_unknown_type: Vec<TypeAndField>
Warn about unknown types in a composite type.
undecided_types_in_models: Vec<ModelAndFieldAndType>
Warn about undecided types in a model.
undecided_types_in_types: Vec<TypeAndFieldAndType>
Warn about undecided types in a composite type.
json_schema_defined: Vec<Model>
Warning about JSONSchema on a model.
capped_collection: Vec<Model>
Warning about JSONSchema on a model.
Implementations§
Trait Implementations§
source§impl PartialEq for Warnings
impl PartialEq for Warnings
impl StructuralPartialEq for Warnings
Auto Trait Implementations§
impl RefUnwindSafe for Warnings
impl Send for Warnings
impl Sync for Warnings
impl Unpin for Warnings
impl UnwindSafe for Warnings
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<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
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.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> 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) -> Rwhere
Self: Borrow<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> Rwhere Self: Borrow<B>, B: 'a + ?Sized, R: 'a,
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> Rwhere
Self: BorrowMut<B>,
B: 'a + ?Sized,
R: 'a,
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> Rwhere Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere
Self: AsRef<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> Rwhere Self: AsRef<U>, U: 'a + ?Sized, R: 'a,
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) -> Rwhere
Self: AsMut<U>,
U: 'a + ?Sized,
R: 'a,
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> Rwhere Self: AsMut<U>, U: 'a + ?Sized, R: 'a,
self
, then passes self.as_mut()
into the pipe
function.source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere
Self: Deref<Target = T>,
T: ?Sized,
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Selfwhere Self: Deref<Target = T>, T: ?Sized,
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere
Self: DerefMut<Target = T> + Deref,
T: ?Sized,
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Selfwhere Self: DerefMut<Target = T> + Deref, T: ?Sized,
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)) -> Selfwhere
Self: Borrow<B>,
B: ?Sized,
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Selfwhere Self: Borrow<B>, B: ?Sized,
.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)) -> Selfwhere
Self: BorrowMut<B>,
B: ?Sized,
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Selfwhere Self: BorrowMut<B>, B: ?Sized,
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere
Self: AsRef<R>,
R: ?Sized,
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Selfwhere Self: AsRef<R>, R: ?Sized,
.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)) -> Selfwhere
Self: AsMut<R>,
R: ?Sized,
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Selfwhere Self: AsMut<R>, R: ?Sized,
.tap_ref_mut()
only in debug builds, and is erased in release
builds.