diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-10-06 20:49:48 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-10-22 15:55:17 +0200 |
| commit | fa33ee9e9e29d13ad96b2c7eedf259683431c434 (patch) | |
| tree | ec08654eb48cccc658d5ca51dbf425277bd8cd5c /ishtar_common/utils.py | |
| parent | 8543cc8b86ade03b2cf1700236084c94beeb0197 (diff) | |
| download | Ishtar-fa33ee9e9e29d13ad96b2c7eedf259683431c434.tar.bz2 Ishtar-fa33ee9e9e29d13ad96b2c7eedf259683431c434.zip | |
✨ Find - statistics: add top container
Diffstat (limited to 'ishtar_common/utils.py')
| -rw-r--r-- | ishtar_common/utils.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ishtar_common/utils.py b/ishtar_common/utils.py index 666e05bd9..23fe5b1a9 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -65,7 +65,7 @@ from django.core.files import File from django.core.files.storage import FileSystemStorage from django.core.validators import EMPTY_VALUES, MaxValueValidator from django.db import models -from django.db.models import Q +from django.db.models import Func, Q from django.db.models.functions import Length from django.http import HttpResponseRedirect from django.urls import reverse, NoReverseMatch @@ -193,6 +193,14 @@ class Round(models.Func): arg_joiner = "::numeric, " +class SplitPart(Func): + """ + PostgreSQL split part annotation + """ + function = 'split_part' + arity = 3 + + CSV_OPTIONS = {"delimiter": ",", "quotechar": '"', "quoting": QUOTE_ALL} |
