Module: Torque::PostgreSQL::Adapter::TableDefinition
- Includes:
- ColumnMethods
- Defined in:
- lib/torque/postgresql/adapter/schema_definitions.rb
Instance Attribute Summary collapse
-
#inherits ⇒ Object
readonly
Returns the value of attribute inherits.
Instance Method Summary collapse
Methods included from ColumnMethods
#search_language, #search_vector
Instance Attribute Details
#inherits ⇒ Object (readonly)
Returns the value of attribute inherits.
26 27 28 |
# File 'lib/torque/postgresql/adapter/schema_definitions.rb', line 26 def inherits @inherits end |
Instance Method Details
#initialize(*args, **options) ⇒ Object
28 29 30 31 32 33 |
# File 'lib/torque/postgresql/adapter/schema_definitions.rb', line 28 def initialize(*args, **) super @inherits = Array.wrap(.delete(:inherits)).flatten.compact \ if .key?(:inherits) end |
#set_primary_key(tn, id, primary_key) ⇒ Object
35 36 37 |
# File 'lib/torque/postgresql/adapter/schema_definitions.rb', line 35 def set_primary_key(tn, id, primary_key, *, **) super unless @inherits.present? && primary_key.blank? && id == :primary_key end |