Skip to main content

plan_create_index

Function plan_create_index 

Source
pub fn plan_create_index(ci: &CreateIndex) -> Result<SqlPlan>
Expand description

Plan a CREATE INDEX statement.

Supports:

  • CREATE [UNIQUE] INDEX [IF NOT EXISTS] [name] ON table (col [COLLATE coll])
  • COLLATE NOCASE / COLLATE CI / COLLATE CASE_INSENSITIVE on the indexed column → case_insensitive = true.

Multi-column indexes, expression indexes, and predicate (WHERE) indexes are rejected with a typed error rather than silently dropped.