class Marten::DB::Management::Index
- Marten::DB::Management::Index
- Reference
- Object
Overview
Represents an index used when creating or altering tables.
Included Modules
Defined in:
marten/db/management/index.crConstructors
-
.from(index : DB::Index) : Index
Returns a management index from an index definition.
- .new(name : String | Symbol, column_names : Array(String | Symbol))
Instance Method Summary
-
#==(other : self)
Returns true if the other index corresponds to the same index configuration.
-
#clone
Returns a copy of the index.
-
#column_names : Array(String)
Returns the column names that are part of the index.
-
#name : String
Returns the index name.
-
#serialize_args : String
Returns a serialized version of the index arguments to be used when generating migrations.
Instance methods inherited from module Marten::DB::CanFormatStringsOrSymbols
format_string_or_symbol(value : String)
format_string_or_symbol
Constructor Detail
Returns a management index from an index definition.
Instance Method Detail
def serialize_args : String
#
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.