struct

Ralph::Schema::DatabaseIndex

Inherits Struct / Value / Object

Represents a database index

Constructors

new(name : String, table : String, columns : Array(String), unique : Bool, type : Symbol | Nil = nil, condition : String | Nil = nil)
Source

Instance methods

clone
Source
columns

Columns included in the index (in order)

condition

Partial index condition (PostgreSQL)

copy_with(name _name = @name, table _table = @table, columns _columns = @columns, unique _unique = @unique, type _type = @type, condition _condition = @condition)
Source
name

Index name

table

Table the index belongs to

type

Index type (e.g., :btree, :hash, :gin, :gist) - nil for default

unique

Whether this is a unique index