Fields

Fields let you customize the behavior of the Columns. They accept any parameter that regular Pydantic Fields do, plus a few extra parameters that are specific to your database.

::: iceaxe.field.Field


CLASSiceaxe.field.DBFieldInfo

Class Constructor

  • Name
    kwargs
    Type
    Unpack[DBFieldInputs]
    Description

    Default: {}

Class Attributes

  • Name
    primary_key
    Type
    bool
    Description
  • Name
    autoincrement
    Type
    bool
    Description
  • Name
    postgres_config
    Type
    PostgresFieldBase | None
    Description
  • Name
    foreign_key
    Type
    str | None
    Description
  • Name
    unique
    Type
    bool
    Description
  • Name
    index
    Type
    bool
    Description
  • Name
    check_expression
    Type
    str | None
    Description
  • Name
    is_json
    Type
    bool
    Description

Class Methods

  • Name
    extend_field
    Return type
    Description

Postgres Types

Some primitives (like datetimes) allow for more configuration in Postgres than their types do in Python. In these cases we provide additional configuration classes that can be passed to postgres_config within the Field.

CLASSiceaxe.postgres.PostgresFieldBase

Extensions to python core types that specify addition arguments used by Postgres.


CLASSiceaxe.postgres.PostgresDateTime

Class Attributes

  • Name
    timezone
    Type
    bool
    Description

CLASSiceaxe.postgres.PostgresTime

Class Attributes

  • Name
    timezone
    Type
    bool
    Description