Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs #28643 -- Added MD5 database function. #11004

Merged
merged 1 commit into from Feb 21, 2019

Conversation

felixxm
Copy link
Member

@felixxm felixxm commented Feb 18, 2019

Ticket 28643.

tests/db_functions/text/test_md5.py Outdated Show resolved Hide resolved
tests/db_functions/text/test_md5.py Outdated Show resolved Hide resolved
tests/db_functions/text/test_md5.py Outdated Show resolved Hide resolved
Copy link
Member

@ngnpope ngnpope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay. Thanks for this. Nice Oracle-fu too.

Please can you add a test for the NULL case? This is particularly important for the SQLite bit. (I realise that we still need to add these NULL tests for some of the other functions.)

django/db/models/functions/text.py Outdated Show resolved Hide resolved
django/db/models/functions/text.py Outdated Show resolved Hide resolved
docs/ref/models/database-functions.txt Outdated Show resolved Hide resolved
@felixxm
Copy link
Member Author

felixxm commented Feb 19, 2019

@charettes @pope1ni Thanks for reviews 👍 . I updated PR.

Copy link
Member

@ngnpope ngnpope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

django/db/models/functions/__init__.py Outdated Show resolved Hide resolved
@@ -10,8 +10,9 @@
Mod, Pi, Power, Radians, Round, Sin, Sqrt, Tan,
)
from .text import (
Chr, Concat, ConcatPair, Left, Length, Lower, LPad, LTrim, Ord, Repeat,
Replace, Reverse, Right, RPad, RTrim, StrIndex, Substr, Trim, Upper,
MD5, Chr, Concat, ConcatPair, Left, Length, Lower, LPad, LTrim, Ord,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why isort sorts M before C. Is there a special rule for names in all caps?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isort treats MD5 as a constant and sorts imports for CONSTANTS, Classes, and modules/functions (see order_by_type setting).

docs/ref/models/database-functions.txt Show resolved Hide resolved
docs/ref/models/database-functions.txt Outdated Show resolved Hide resolved
Thanks Tim Graham, Nick Pope and Simon Charette for reviews.
@felixxm felixxm merged commit 9ff18c0 into django:master Feb 21, 2019
@felixxm felixxm deleted the refs-28643-md5 branch February 21, 2019 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants