Skip to main content

WHERE

Constant WHERE 

Source
pub const WHERE: IndexMarker;
Expand description

Makes an index partial: only rows matching the SQL predicate are indexed.

The predicate is raw SQL. Write database column names; renaming a Rust field does not rewrite it.

ยงExamples

#[SQLiteIndex(where = "deleted_at IS NULL")]
struct ActiveUsersEmailIdx(Users::email);

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