class Marten::DB::Management::Index

Overview

Represents an index used when creating or altering tables.

Included Modules

Defined in:

marten/db/management/index.cr

Constructors

Instance Method Summary

Instance methods inherited from module Marten::DB::CanFormatStringsOrSymbols

format_string_or_symbol(value : String) format_string_or_symbol

Constructor Detail

def self.from(index : DB::Index) : Index #

Returns a management index from an index definition.


[View source]
def self.new(name : String | Symbol, column_names : Array(String | Symbol)) #

[View source]

Instance Method Detail

def ==(other : self) #

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


[View source]
def clone #

Returns a copy of the index.


[View source]
def column_names : Array(String) #

Returns the column names that are part of the index.


[View source]
def name : String #

Returns the index name.


[View source]
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.


[View source]