Class: ActiveRecord::ConnectionAdapters::IndexDefinition
- Defined in:
- activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
Overview
Abstract representation of an index definition on a table. Instances of this type are typically created and returned by methods in database adapters. e.g. ActiveRecord::ConnectionAdapters::MySQL::SchemaStatements#indexes
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#comment ⇒ Object
readonly
Returns the value of attribute comment.
-
#lengths ⇒ Object
readonly
Returns the value of attribute lengths.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#opclasses ⇒ Object
readonly
Returns the value of attribute opclasses.
-
#orders ⇒ Object
readonly
Returns the value of attribute orders.
-
#table ⇒ Object
readonly
Returns the value of attribute table.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#unique ⇒ Object
readonly
Returns the value of attribute unique.
-
#using ⇒ Object
readonly
Returns the value of attribute using.
-
#where ⇒ Object
readonly
Returns the value of attribute where.
Instance Method Summary collapse
-
#initialize(table, name, unique = false, columns = [], lengths: {}, orders: {}, opclasses: {}, where: nil, type: nil, using: nil, comment: nil) ⇒ IndexDefinition
constructor
A new instance of IndexDefinition.
Constructor Details
#initialize(table, name, unique = false, columns = [], lengths: {}, orders: {}, opclasses: {}, where: nil, type: nil, using: nil, comment: nil) ⇒ IndexDefinition
Returns a new instance of IndexDefinition.
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 11 def initialize( table, name, unique = false, columns = [], lengths: {}, orders: {}, opclasses: {}, where: nil, type: nil, using: nil, comment: nil ) @table = table @name = name @unique = unique @columns = columns @lengths = (lengths) @orders = (orders) @opclasses = (opclasses) @where = where @type = type @using = using @comment = comment end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns
9 10 11 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 9 def columns @columns end |
#comment ⇒ Object (readonly)
Returns the value of attribute comment
9 10 11 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 9 def comment @comment end |
#lengths ⇒ Object (readonly)
Returns the value of attribute lengths
9 10 11 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 9 def lengths @lengths end |
#name ⇒ Object (readonly)
Returns the value of attribute name
9 10 11 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 9 def name @name end |
#opclasses ⇒ Object (readonly)
Returns the value of attribute opclasses
9 10 11 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 9 def opclasses @opclasses end |
#orders ⇒ Object (readonly)
Returns the value of attribute orders
9 10 11 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 9 def orders @orders end |
#table ⇒ Object (readonly)
Returns the value of attribute table
9 10 11 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 9 def table @table end |
#type ⇒ Object (readonly)
Returns the value of attribute type
9 10 11 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 9 def type @type end |
#unique ⇒ Object (readonly)
Returns the value of attribute unique
9 10 11 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 9 def unique @unique end |
#using ⇒ Object (readonly)
Returns the value of attribute using
9 10 11 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 9 def using @using end |
#where ⇒ Object (readonly)
Returns the value of attribute where
9 10 11 |
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 9 def where @where end |