diff options
| author | Mads Jensen <mje@inducks.org> | 2019-07-12 13:08:00 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-07-16 18:04:41 +0200 |
| commit | a3417282ac0464a9a2d1d7685bcfef10feed2597 (patch) | |
| tree | a041b9f3f50c7199c0574c66fb185f0337831cf9 /docs/ref/contrib/postgres/fields.txt | |
| parent | 7174cf0b009711c41e5f76f6c0c68137898716a0 (diff) | |
Fixed #29824 -- Added support for database exclusion constraints on PostgreSQL.
Thanks to Nick Pope and Mariusz Felisiak for review.
Co-Authored-By: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'docs/ref/contrib/postgres/fields.txt')
| -rw-r--r-- | docs/ref/contrib/postgres/fields.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/ref/contrib/postgres/fields.txt b/docs/ref/contrib/postgres/fields.txt index 387eb0f02e..14cb1d00cb 100644 --- a/docs/ref/contrib/postgres/fields.txt +++ b/docs/ref/contrib/postgres/fields.txt @@ -944,3 +944,26 @@ corresponding lookups. NOT_LT = '&>' NOT_GT = '&<' ADJACENT_TO = '-|-' + +RangeBoundary() expressions +--------------------------- + +.. versionadded:: 3.0 + +.. class:: RangeBoundary(inclusive_lower=True, inclusive_upper=False) + + .. attribute:: inclusive_lower + + If ``True`` (default), the lower bound is inclusive ``'['``, otherwise + it's exclusive ``'('``. + + .. attribute:: inclusive_upper + + If ``False`` (default), the upper bound is exclusive ``')'``, otherwise + it's inclusive ``']'``. + +A ``RangeBoundary()`` expression represents the range boundaries. It can be +used with a custom range functions that expected boundaries, for example to +define :class:`~django.contrib.postgres.constraints.ExclusionConstraint`. See +`the PostgreSQL documentation for the full details <https://www.postgresql.org/ +docs/current/rangetypes.html#RANGETYPES-INCLUSIVITY>`_. |
