django
django copied to clipboard
Doc'd that Q expression order is preserved.
This refs the closed ticket (do we #Refs
wontfix tickets?) https://code.djangoproject.com/ticket/34964
I'm not really sure what we want to say here - Mariusz or Simon will have better phrasing - but I thought it might be prudent to at least say that:
Q(one=One, two=Two)
isn't necessarily preserved (I've been told the kwargs are sorted)
but:
Q(one=One) & Q(two=Two)
is preserved.
This is important for people that wish to control the expression order on databases that do preserve check constraint expressions for performance reasons.
Edit: I suppose not documenting this at all is also an option - perhaps this only really effects a niche group of people that use check constraints with performance implications!
This is really tiny thing, important in really rare cases. I don't mind a short note, but adding a section with examples etc. sounds like overkill.
This is really tiny thing, important in really rare cases. I don't mind a short note, but adding a section with examples etc. sounds like overkill.
I agree, I wasn't asking for a new section, I was suggesting we add a small example in the same admonition, just like the following note for Oracle has.
@shangxiao Do you have time to keep working on this?
@felixxm can do sorry this dropped off my radar.
So we just need an example? I can do that.
@shangxiao Thanks :+1: