# `Adbc.Field`
[🔗](https://github.com/elixir-explorer/adbc/blob/v0.12.1/lib/adbc/field.ex#L1)

Represents the schema definition of a column.

A field describes the name, type, and metadata of a column
without containing any data.

Use `new/2` to create a field:

    Adbc.Field.new(:s32, name: "id")
    Adbc.Field.new({:list, Adbc.Field.new(:s32)}, name: "ids")

# `data_type`

```elixir
@type data_type() ::
  :boolean
  | signed_integer()
  | unsigned_integer()
  | floating()
  | :binary
  | :large_binary
  | :binary_view
  | :string
  | :large_string
  | :string_view
  | :date32
  | :date64
  | time()
  | timestamp()
  | duration()
  | interval()
  | decimal()
  | {:fixed_size_binary, non_neg_integer()}
  | {:list, t()}
  | {:large_list, t()}
  | {:list_view, t()}
  | {:large_list_view, t()}
  | {:fixed_size_list, t(), integer()}
  | {:struct, [t()]}
  | {:map, t(), t()}
  | {:dictionary, t(), t()}
  | {:run_end_encoded, t(), t()}
```

# `decimal128`

```elixir
@type decimal128() :: {:decimal128, precision128(), integer()}
```

# `decimal256`

```elixir
@type decimal256() :: {:decimal256, precision256(), integer()}
```

# `decimal`

```elixir
@type decimal() :: decimal128() | decimal256()
```

# `duration`

```elixir
@type duration() ::
  {:duration, :seconds}
  | {:duration, :milliseconds}
  | {:duration, :microseconds}
  | {:duration, :nanoseconds}
```

# `floating`

```elixir
@type floating() :: :f16 | :f32 | :f64
```

# `interval`

```elixir
@type interval() ::
  {:interval, :month} | {:interval, :day_time} | {:interval, :month_day_nano}
```

# `interval_unit`

```elixir
@type interval_unit() :: :month | :day_time | :month_day_nano
```

# `precision128`

```elixir
@type precision128() :: 1..38
```

# `precision256`

```elixir
@type precision256() :: 1..76
```

# `signed_integer`

```elixir
@type signed_integer() :: :s8 | :s16 | :s32 | :s64
```

# `t`

```elixir
@type t() :: %Adbc.Field{
  metadata: map() | nil,
  name: String.t() | nil,
  type: data_type()
}
```

# `time32`

```elixir
@type time32() :: {:time32, :seconds} | {:time32, :milliseconds}
```

# `time64`

```elixir
@type time64() :: {:time64, :microseconds} | {:time64, :nanoseconds}
```

# `time`

```elixir
@type time() :: time32() | time64()
```

# `time_unit`

```elixir
@type time_unit() :: :seconds | :milliseconds | :microseconds | :nanoseconds
```

# `timestamp`

```elixir
@type timestamp() ::
  {:timestamp, :seconds, String.t()}
  | {:timestamp, :milliseconds, String.t()}
  | {:timestamp, :microseconds, String.t()}
  | {:timestamp, :nanoseconds, String.t()}
```

# `unsigned_integer`

```elixir
@type unsigned_integer() :: :u8 | :u16 | :u32 | :u64
```

# `new`

```elixir
@spec new(data_type(), Keyword.t()) :: t()
```

Creates a new field with the given type and options.

## Options

  * `:name` - The name of the field
  * `:metadata` - A map of metadata

---

*Consult [api-reference.md](api-reference.md) for complete listing*
