---
name: "SQL::Translator::Schema::IndexField"
section: "3pm"
platform: "linux"
package: "libsql-translator-perl"
version: "1.66-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/SQL::Translator::Schema::IndexField"
---

# SQL::Translator::Schema::IndexField(3pm)

SQL::Translator index field object

## NAME

SQL::Translator::Schema::IndexField - SQL::Translator index field object

## DESCRIPTION

`"SQL::Translator::Schema::IndexField"` is the index field object.

Different databases allow for different options on index fields. Those are supported through here

## METHODS

### new

Object constructor.

```
  my $schema = SQL::Translator::Schema::IndexField->new;
```

### name

The name of the index. The object stringifies to this. In addition, you can simply pass a string to the constructor to only set this attribute.

### extra

All options for the field are stored under the extra hash. The constructor will collect them for you if passed in straight. In addition, an accessor is provided for all supported options

Currently supported options:

- prefix\_length

  Supported by MySQL. Indicates that only N characters of the column are indexed.

## AUTHOR

Veesh Goldman \<veesh@cpan.org\>.
