class

Marten::DB::Management::Index

Inherits Marten::DB::CanFormatStringsOrSymbols / Reference / Object

Represents an index used when creating or altering tables.

Constructors

from(index : DB::Index) : Index

Returns a management index from an index definition.

Source
new(name : String | Symbol, column_names : Array(String | Symbol))
Source

Instance methods

==(other : self)

Returns true if the other index corresponds to the same index configuration.

Source
clone

Returns a copy of the index.

Source
column_names

Returns the column names that are part of the index.

Source
name

Returns the index name.

Source
serialize_args

Returns a serialized version of the index arguments to be used when generating migrations.

The returned string will be used in the context of add_index / index statements in generated migrations.

Source