Skip to main content

STRICT

Constant STRICT 

Source
pub const STRICT: TableMarker;
Expand description

Makes the table STRICT, so SQLite rejects values that do not match the declared column types.

ยงExamples

#[SQLiteTable(strict)]
struct Users {
    #[column(primary)]
    id: i32,
    name: String,
}

A STRICT table still converts values losslessly where it can (the text '1' into an INTEGER column), and only ANY columns accept any value.

See: https://sqlite.org/stricttables.html