<commit_before>PostgreSQL specific model fields
================================

All of these fields are available from the ``django.contrib.postgres.fields``
module.

.. currentmodule:: django.contrib.postgres.fields

ArrayField
----------

.. class:: ArrayField(base_field, size=None, **options)

    A field for storing lists of data. Most field types can be used, you simply
    pass another field instance as the :attr:`base_field
    <ArrayField.base_field>`. You may also specify a :attr:`size
    <ArrayField.size>`. ``ArrayField`` can be nested to store multi-dimensional
    arrays.

    .. attribute:: 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
        :class:`~django.db.models.Field`. For example, it could be an
        :class:`~django.db.models.IntegerField` or a
        :class:`~django.db.models.CharField`. Most field types are permitted,
        with the exception of those handling relational data
        (:class:`~django.db.models.ForeignKey`,
        :class:`~django.db.models.OneToOneField` and
        :class:`~django.db.models.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.contrib.postgres.fields import ArrayField

            class ChessBoard(models.Model):
                board = ArrayField(
                    ArrayField(
                        CharField(max_length=10, blank=True, null=True),
                        size=8),
                    size=8)

        Transformation of values between the database and the model, validation<commit_msg>[1.8.x] Improved nested ArrayField example<commit_after>PostgreSQL specific model fields
================================

All of these fields are available from the ``django.contrib.postgres.fields``
module.

.. currentmodule:: django.contrib.postgres.fields

ArrayField
----------

.. class:: ArrayField(base_field, size=None, **options)

    A field for storing lists of data. Most field types can be used, you simply
    pass another field instance as the :attr:`base_field
    <ArrayField.base_field>`. You may also specify a :attr:`size
    <ArrayField.size>`. ``ArrayField`` can be nested to store multi-dimensional
    arrays.

    .. attribute:: 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
        :class:`~django.db.models.Field`. For example, it could be an
        :class:`~django.db.models.IntegerField` or a
        :class:`~django.db.models.CharField`. Most field types are permitted,
        with the exception of those handling relational data
        (:class:`~django.db.models.ForeignKey`,
        :class:`~django.db.models.OneToOneField` and
        :class:`~django.db.models.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.contrib.postgres.fields import ArrayField

            class ChessBoard(models.Model):
                board = ArrayField(
                    ArrayField(
                        models.CharField(max_length=10, blank=True),
                        size=8,
                    ),
                    size=8,
                )

        Transformation of values between the database and the model, validation
{'fraction_non_alphanumeric': 0.10805609018421776, 'fraction_numerical': 0.0027495188342040143, 'mean_word_length': 2.4418164616840112, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3087577', 'n_tokens_mistral': 937, 'n_tokens_neox': 895, 'n_words': 322}