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).
ForeignKeyNotPrimaryKey
A synced foreign key does not reference the complete parent primary key (§9.1).
Fields
SetDefault
SET DEFAULT is on a synced table or references one (§9.1).
Fields
LocalChildAction
A local foreign key could prevent deletion of a synced row (§9.1).
LocalChildUpdate
A local foreign key could stop coven updating a synced value in place (§9.1).
MissingTable
A declared synced table isn’t in the database (E2).
DuplicateTable
Two declarations name one table (E2).
OwnerOnlyChanged
A synced table’s owner_only declaration changed without a breaking
migration to raise the schema (§18.3).
TwoAudiences
A table declares both audience_column and audience_from (E2).
FileColumnsChanged
A synced table’s file reference columns changed without a breaking migration to raise the schema (§18.1).
FileColumnRepeated
A column is declared a file reference twice (E2).
FileColumnGenerated
A file reference column is generated, so coven can’t write it (E2).
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.
FileColumnForeignKey
A file reference column is also an SQL foreign key (E2).
FileColumn
A declared file column isn’t in the table (E2).
MissingTrigger
A trigger declared shared isn’t on the table (§9.4).
NoPrimaryKey
A synced table has no primary key (§9.2).
NullableKey
A primary-key column of a synced or device-local table permits NULL (§9.2).
KeyCollation
A synced key column compares text by a collation other than BINARY (§9.2, D3).
Fields
GeneratedPrimaryKey
SQLite chooses the primary key itself (§9.2).
IndependentKeyNotUuid
An independent key has no text-affinity column to hold its UUID (§9.2).
KeyColumns
Declared key columns do not match the table’s primary key (E2).
GeneratedForeignKey
A foreign key includes a generated column (§9.1).
ImpossibleAction
SET NULL would put NULL in a NOT NULL column (§9.1).
PrimaryKeyAction
SET NULL acts on a primary-key column (§9.1).
AudienceColumn
The audience root column is nullable, is not text, or is generated (§15, E2).
AudienceForeignKeyColumns
The audience foreign key spans more than one column (§15.1).
AudienceForeignKeyTarget
The audience foreign key does not point into a synced table (§15.1).
AudienceForeignKeyAction
The audience foreign key uses SET NULL (§15.1).
AudienceCycle
Following audience foreign keys forms a loop (§15.1).
AudienceConstraint
A unique constraint or shared key spans audiences (§15.2).
A shared trigger lacks WHEN NOT coven_applying() (§9.4).
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).
Trait Implementations§
Source§impl Clone for SchemaError
impl Clone for SchemaError
Source§fn clone(&self) -> SchemaError
fn clone(&self) -> SchemaError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SchemaError
impl Debug for SchemaError
Source§impl Display for SchemaError
impl Display for SchemaError
Source§impl Error for SchemaError
impl Error for SchemaError
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
Source§impl From<SchemaError> for DbError
impl From<SchemaError> for DbError
Source§fn from(source: SchemaError) -> DbError
fn from(source: SchemaError) -> DbError
Source§impl PartialEq for SchemaError
impl PartialEq for SchemaError
impl Eq for SchemaError
impl StructuralPartialEq for SchemaError
Auto Trait Implementations§
impl Freeze for SchemaError
impl RefUnwindSafe for SchemaError
impl Send for SchemaError
impl Sync for SchemaError
impl Unpin for SchemaError
impl UnsafeUnpin for SchemaError
impl UnwindSafe for SchemaError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more