dialect/entsql: add support for partial indexes (#2944)

This commit is contained in:
Ariel Mashraki
2022-09-20 15:07:28 +03:00
committed by GitHub
parent a3e38c5141
commit 3fc4ba6f15
14 changed files with 257 additions and 19 deletions

View File

@@ -447,6 +447,9 @@ func (d *SQLite) atIndex(idx1 *Index, t2 *schema.Table, idx2 *schema.Index) erro
}
idx2.AddParts(&schema.IndexPart{C: c2})
}
if idx1.Annotation != nil && idx1.Annotation.Where != "" {
idx2.AddAttrs(&sqlite.IndexPredicate{P: idx1.Annotation.Where})
}
return nil
}