diff options
| author | Andriy Sokolovskiy <me@asokolovskiy.com> | 2015-02-08 17:21:48 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-03-30 10:44:37 -0400 |
| commit | e4cf8c8420634d6f2dc8ce873246256ce635972d (patch) | |
| tree | ea71c476b420df6497439609c496e80cd57c7725 /tests/postgres_tests/models.py | |
| parent | 931a340f1feca05b7a9f95efb9a3ba62b93b37f9 (diff) | |
Fixed #24301 -- Added PostgreSQL-specific aggregate functions
Diffstat (limited to 'tests/postgres_tests/models.py')
| -rw-r--r-- | tests/postgres_tests/models.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/postgres_tests/models.py b/tests/postgres_tests/models.py index f698d56a58..b53eda4cca 100644 --- a/tests/postgres_tests/models.py +++ b/tests/postgres_tests/models.py @@ -62,3 +62,21 @@ else: class ArrayFieldSubclass(ArrayField): def __init__(self, *args, **kwargs): super(ArrayFieldSubclass, self).__init__(models.IntegerField()) + + +class AggregateTestModel(models.Model): + """ + To test postgres-specific general aggregation functions + """ + char_field = models.CharField(max_length=30, blank=True) + integer_field = models.IntegerField(null=True) + boolean_field = models.NullBooleanField() + + +class StatTestModel(models.Model): + """ + To test postgres-specific aggregation functions for statistics + """ + int1 = models.IntegerField() + int2 = models.IntegerField() + related_field = models.ForeignKey(AggregateTestModel, null=True) |
