postgres.fields.DateTimeRangeField

class DateTimeRangeField(**options) [source] Stores a range of timestamps. Based on a DateTimeField. Represented by a tztsrange in the database and a DateTimeTZRange in Python.

postgres.fields.DateRangeField

class DateRangeField(**options) [source] Stores a range of dates. Based on a DateField. Represented by a daterange in the database and a DateRange in Python. Regardless of the bounds specified when saving the data, PostgreSQL always returns a range in a canonical form that includes the lower bound and excludes the upper bound; that is [).

postgres.fields.BigIntegerRangeField

class BigIntegerRangeField(**options) [source] Stores a range of large integers. Based on a BigIntegerField. Represented by an int8range in the database and a NumericRange in Python. Regardless of the bounds specified when saving the data, PostgreSQL always returns a range in a canonical form that includes the lower bound and excludes the upper bound; that is [).

postgres.fields.ArrayField.size

size This is an optional argument. If passed, the array will have a maximum size as specified. This will be passed to the database, although PostgreSQL at present does not enforce the restriction.

postgres.fields.ArrayField.base_field

base_field This is a required argument. Specifies the underlying data type and behavior for the array. It should be an instance of a subclass of Field. For example, it could be an IntegerField or a CharField. Most field types are permitted, with the exception of those handling relational data (ForeignKey, OneToOneField and ManyToManyField). It is possible to nest array fields - you can specify an instance of ArrayField as the base_field. For example: from django.db import models from django.

postgres.fields.ArrayField

class ArrayField(base_field, size=None, **options) [source] A field for storing lists of data. Most field types can be used, you simply pass another field instance as the base_field. You may also specify a size. ArrayField can be nested to store multi-dimensional arrays. If you give the field a default, ensure it’s a callable such as list (for an empty default) or a callable that returns a list (such as a function). Incorrectly using default=[] creates a mutable default that is shared betwee

postgres.aggregates.StringAgg.delimiter

delimiter Required argument. Needs to be a string.

postgres.aggregates.StringAgg

class StringAgg(expression, delimiter) [source] Returns the input values concatenated into a string, separated by the delimiter string. delimiter Required argument. Needs to be a string.

postgres.aggregates.RegrSYY

class RegrSYY(y, x) [source] Returns sum(y^2) - sum(y)^2/N (“sum of squares” of the dependent variable) as a float, or None if there aren’t any matching rows.

postgres.aggregates.RegrSXY

class RegrSXY(y, x) [source] Returns sum(x*y) - sum(x) * sum(y)/N (“sum of products” of independent times dependent variable) as a float, or None if there aren’t any matching rows.