Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

expressions.py 405B

1 year ago
1234567891011121314
  1. from django.contrib.postgres.fields import ArrayField
  2. from django.db.models import Subquery
  3. from django.utils.functional import cached_property
  4. class ArraySubquery(Subquery):
  5. template = "ARRAY(%(subquery)s)"
  6. def __init__(self, queryset, **kwargs):
  7. super().__init__(queryset, **kwargs)
  8. @cached_property
  9. def output_field(self):
  10. return ArrayField(self.query.output_field)