-
Notifications
You must be signed in to change notification settings - Fork 22
add support for math database functions #45
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
Conversation
d946448
to
dae3e31
Compare
django_mongodb/functions.py
Outdated
def func(self, compiler, connection): | ||
lhs_mql = process_lhs(self, compiler, connection) | ||
try: | ||
operator = MONGO_OPERATORS[self.__class__] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it can be done with get:
operator = MONGO_OPERATORS.get(self.__class__, self.function.lower())
django_mongodb/features.py
Outdated
@@ -54,12 +54,20 @@ class DatabaseFeatures(BaseDatabaseFeatures): | |||
"lookup.tests.LookupTests.test_pattern_lookups_with_substr", | |||
# Querying ObjectID with string doesn't work. | |||
"lookup.tests.LookupTests.test_lookup_int_as_str", | |||
# MongoDB gives the wrong result of log(number, base) when base is a | |||
# fractional Decimal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# fractional Decimal. | |
# fractional Decimal. https://jira.mongodb.org/browse/SERVER-91223 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after the minor changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for getting this in
No description provided.