diff options
| author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-10-06 20:49:48 +0200 |
|---|---|---|
| committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-11-29 17:12:03 +0100 |
| commit | 1fe692f4810f54ddb689e1f9330d6ce9274f4e80 (patch) | |
| tree | f216dc11f7e458af230b1b283bf588d50ba0a255 /ishtar_common/utils.py | |
| parent | 1c14da20874141911751143e87818711319a8b38 (diff) | |
| download | Ishtar-1fe692f4810f54ddb689e1f9330d6ce9274f4e80.tar.bz2 Ishtar-1fe692f4810f54ddb689e1f9330d6ce9274f4e80.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 768c58495..bfe3928d2 100644 --- a/ishtar_common/utils.py +++ b/ishtar_common/utils.py @@ -67,7 +67,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 @@ -199,6 +199,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} |
