Open omidekz opened 3 weeks ago
jun 8/related changes:
UniqueIndex
in tortoise.indexes
Why you decided to make it as separate class?
I am concerned that it complicated class hierarchy - and now, for example, it is not clear how to make unique index of non-default type for postgres, as there are now separately HashIndex
for example, and Unique index, and it is not clear how to make unique HashIndex
Also CI seems to be failing due to lint, you can run make style
and make lint
to fix it
Hi i got your point. i'll remove shared unique index and go further with driver specific implementation
but i have a challenge with partialindex.
at the tortoise.indexes
file line of 75 where you are using the ValueWrapper
, force the k =
wrapped_value
. but we need k is
[not] null
if i check the wrapped_value is startswith(is) and then set the operator. its mean im producing some other issues.
create a postgresql unique index and consider the
nulls not distinct
Description
enhancement was started from this issue
this PR provide a manual solution for postgres driver. but i think the orm has to provide a base/shared solution. the solution is a way to consider nulls equal in unique indexes on that drivers that consider nulls not equal.
postgres can done that by :
nulls not distinct
sqlite and sqlserver too by : index expressions on mysql i don't know yet.