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

Fixed #30056 -- Added SQLite support for StdDev and Variance functions. #10783

Merged
merged 1 commit into from Dec 24, 2018

Conversation

ngnpope
Copy link
Member

@ngnpope ngnpope commented Dec 22, 2018

Ticket #30056.

Copy link
Member

@charettes charettes left a comment

Choose a reason for hiding this comment

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

Nice stuff, thanks for the SQLite3 references I missed.

django/db/backends/sqlite3/base.py Outdated Show resolved Hide resolved
@timgraham
Copy link
Member

For the future, please submit cleanups as separate PRs so they can be merged more easily.

Copy link
Member

@felixxm felixxm left a comment

Choose a reason for hiding this comment

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

@pope1ni Thanks for this PR 👍

@@ -49,6 +50,14 @@ def wrapper(*args, **kwargs):
return wrapper


def list_aggregate(function):
"""
Returns an aggregate class that accumulates values in a list and applies
Copy link
Member

Choose a reason for hiding this comment

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

Returns -> Return due to the PEP 257.

@@ -333,6 +336,11 @@ backends.
``DatabaseIntrospection.get_constraints()`` returns must be normalized by
``identifier_converter()``.

* ``DatabaseFeatures.supports_stddev`` has been removed. It was originally
Copy link
Member

Choose a reason for hiding this comment

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

Maybe has been removed -> is removed 🤔

Copy link
Member

Choose a reason for hiding this comment

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

It seems this removal would only affect third party database backends that override it -- and if there are such backends, then it would seem to be an argument for keeping the feature, otherwise the backend must use some other hack to skip the test.

Copy link
Member

Choose a reason for hiding this comment

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

I checked and none of the official 3rd-party-database-backends uses this feature.

is available as an extension module for SQLite. Consult the `SQlite
documentation`_ for instructions on obtaining and installing this
extension.
Support was added for SQLite.
Copy link
Member

Choose a reason for hiding this comment

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

Based on the phrasing used in ref/contrib/gis/geoquerysets.txt... "SQLite support was added."

@@ -333,6 +336,11 @@ backends.
``DatabaseIntrospection.get_constraints()`` returns must be normalized by
``identifier_converter()``.

* ``DatabaseFeatures.supports_stddev`` has been removed. It was originally
Copy link
Member

Choose a reason for hiding this comment

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

It seems this removal would only affect third party database backends that override it -- and if there are such backends, then it would seem to be an argument for keeping the feature, otherwise the backend must use some other hack to skip the test.

@timgraham timgraham merged commit 83677fa into django:master Dec 24, 2018
@timgraham timgraham changed the title Fixed #30056 -- Added StdDev() and Variance() support for SQLite. Fixed #30056 -- Added SQLite support for StdDev and Variance functions. Dec 24, 2018
@ngnpope ngnpope deleted the ticket-30056 branch December 31, 2018 10:08
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