SeaQL / sea-schema

🌿 SQL schema definition and discovery
https://docs.rs/sea-schema
Apache License 2.0
186 stars 39 forks source link

Add support for custom where predicate and index type #97

Open manwantnosmoke opened 1 year ago

manwantnosmoke commented 1 year ago

Motivation

Creating a partial index is impossible right now, but adding support for both index type and where predicate would help creating an index like this:

CREATE UNIQUE INDEX cake_filling_id_idx ON public.cakes USING btree (filling_id) WHERE (filling_id IS NOT NULL);

billy1624 commented 1 year ago

Hey @manwantnosmoke, would be nice to have. A PR would be welcomed :)