Skip to main content

SchemaError

Enum SchemaError 

Source
pub enum SchemaError {
Show 33 variants DuplicateNamespace { namespace: String, }, ForeignKeyNotPrimaryKey { table: String, key: String, }, SetDefault { table: String, key: String, }, LocalChildAction { table: String, column: String, }, LocalChildUpdate { table: String, column: String, }, MissingTable { table: String, }, DuplicateTable { table: String, }, OwnerOnlyChanged { table: String, }, TwoAudiences { table: String, }, FileColumnsChanged { table: String, }, FileColumnRepeated { table: String, column: String, }, FileColumnGenerated { table: String, column: String, }, FilesForeignKey { table: String, key: String, }, FileColumnForeignKey { table: String, column: String, }, FileColumn { table: String, column: String, }, MissingTrigger { table: String, trigger: String, }, NoPrimaryKey { table: String, }, NullableKey { table: String, column: String, }, KeyCollation { table: String, column: String, collation: String, }, GeneratedPrimaryKey { table: String, }, IndependentKeyNotUuid { table: String, }, KeyColumns { table: String, }, GeneratedForeignKey { table: String, column: String, }, ImpossibleAction { table: String, column: String, }, PrimaryKeyAction { table: String, column: String, }, AudienceColumn { table: String, column: String, }, AudienceForeignKeyColumns { table: String, }, AudienceForeignKeyTarget { table: String, column: String, }, AudienceForeignKeyAction { table: String, column: String, }, AudienceCycle { table: String, }, AudienceConstraint { table: String, constraint: String, }, SharedTriggerGuard { table: String, trigger: String, }, TriggerTiming { trigger: String, table: String, },
}
Expand description

A schema rule checked on open and after migrating (§9, §15.1).

Variants§

§

DuplicateNamespace

Two namespace declarations share a name (E1).

Fields

§namespace: String

The namespace.

§

ForeignKeyNotPrimaryKey

A synced foreign key does not reference the complete parent primary key (§9.1).

Fields

§table: String

The referencing synced table.

§key: String

The foreign key’s columns and referenced table and columns, as SQL.

§

SetDefault

SET DEFAULT is on a synced table or references one (§9.1).

Fields

§table: String

The referencing table.

§key: String

The foreign key’s columns and referenced table and columns, as SQL.

§

LocalChildAction

A local foreign key could prevent deletion of a synced row (§9.1).

Fields

§table: String

The local child table.

§column: String

The referencing column.

§

LocalChildUpdate

A local foreign key could stop coven updating a synced value in place (§9.1).

Fields

§table: String

The local child table.

§column: String

The referencing column.

§

MissingTable

A declared synced table isn’t in the database (E2).

Fields

§table: String

The declared table.

§

DuplicateTable

Two declarations name one table (E2).

Fields

§table: String

The repeated table.

§

OwnerOnlyChanged

A synced table’s owner_only declaration changed without a breaking migration to raise the schema (§18.3).

Fields

§table: String

The table whose declaration changed.

§

TwoAudiences

A table declares both audience_column and audience_from (E2).

Fields

§table: String

The declared table.

§

FileColumnsChanged

A synced table’s file reference columns changed without a breaking migration to raise the schema (§18.1).

Fields

§table: String

The table whose declaration changed.

§

FileColumnRepeated

A column is declared a file reference twice (E2).

Fields

§table: String

The declared table.

§column: String

The repeated column.

§

FileColumnGenerated

A file reference column is generated, so coven can’t write it (E2).

Fields

§table: String

The declared table.

§column: String

The generated column.

§

FilesForeignKey

An SQL foreign key references coven’s files table, which only declared file columns reference (§17.2, E2). key names the referencing columns and referenced table and columns as SQL.

Fields

§table: String

The table holding the key.

§key: String

The key, as SQL.

§

FileColumnForeignKey

A file reference column is also an SQL foreign key (E2).

Fields

§table: String

The declared table.

§column: String

The column.

§

FileColumn

A declared file column isn’t in the table (E2).

Fields

§table: String

The declared table.

§column: String

The missing column.

§

MissingTrigger

A trigger declared shared isn’t on the table (§9.4).

Fields

§table: String

The declared table.

§trigger: String

The missing trigger.

§

NoPrimaryKey

A synced table has no primary key (§9.2).

Fields

§table: String

The declared table.

§

NullableKey

A primary-key column of a synced or device-local table permits NULL (§9.2).

Fields

§table: String

The table.

§column: String

The nullable key column.

§

KeyCollation

A synced key column compares text by a collation other than BINARY (§9.2, D3).

Fields

§table: String

The table holding the key, unique constraint or foreign key.

§column: String

The column, or for an expression term the unique index naming it.

§collation: String

The column’s or index term’s collation.

§

GeneratedPrimaryKey

SQLite chooses the primary key itself (§9.2).

Fields

§table: String

The declared table.

§

IndependentKeyNotUuid

An independent key has no text-affinity column to hold its UUID (§9.2).

Fields

§table: String

The declared table.

§

KeyColumns

Declared key columns do not match the table’s primary key (E2).

Fields

§table: String

The declared table.

§

GeneratedForeignKey

A foreign key includes a generated column (§9.1).

Fields

§table: String

The synced or local table.

§column: String

The generated referencing column.

§

ImpossibleAction

SET NULL would put NULL in a NOT NULL column (§9.1).

Fields

§table: String

The synced or local table.

§column: String

The non-null referencing column.

§

PrimaryKeyAction

SET NULL acts on a primary-key column (§9.1).

Fields

§table: String

The declared table.

§column: String

The primary-key column.

§

AudienceColumn

The audience root column is nullable, is not text, or is generated (§15, E2).

Fields

§table: String

The declared table.

§column: String

The audience column.

§

AudienceForeignKeyColumns

The audience foreign key spans more than one column (§15.1).

Fields

§table: String

The declared table.

§

AudienceForeignKeyTarget

The audience foreign key does not point into a synced table (§15.1).

Fields

§table: String

The declared table.

§column: String

The audience foreign-key column.

§

AudienceForeignKeyAction

The audience foreign key uses SET NULL (§15.1).

Fields

§table: String

The declared table.

§column: String

The audience foreign-key column.

§

AudienceCycle

Following audience foreign keys forms a loop (§15.1).

Fields

§table: String

The table from which the cycle was reached.

§

AudienceConstraint

A unique constraint or shared key spans audiences (§15.2).

Fields

§table: String

The declared table.

§constraint: String

The primary key or unique index.

§

SharedTriggerGuard

A shared trigger lacks WHEN NOT coven_applying() (§9.4).

Fields

§table: String

The declared table.

§trigger: String

The shared trigger.

§

TriggerTiming

A trigger on coven_files, coven_pins, coven_pin_requests, coven_moves, coven_upload_queue, coven_sync_status or coven_retry_effect runs before the change, where it could skip or refuse coven’s own (§9.4).

Fields

§trigger: String

The trigger.

§table: String

The table of coven’s it follows.

Trait Implementations§

Source§

impl Clone for SchemaError

Source§

fn clone(&self) -> SchemaError

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SchemaError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for SchemaError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for SchemaError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<SchemaError> for DbError

Source§

fn from(source: SchemaError) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for SchemaError

Source§

fn eq(&self, other: &SchemaError) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for SchemaError

Source§

impl StructuralPartialEq for SchemaError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,