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
#composite, #lquery, #ltree, #search_language, #search_vector
Instance Attribute Details
#inherits ⇒ Object (readonly)
Returns the value of attribute inherits.
46 47 48 |
# File 'lib/torque/postgresql/adapter/schema_definitions.rb', line 46 def inherits @inherits end |
Instance Method Details
#initialize(*args, **options) ⇒ Object
48 49 50 51 52 53 |
# File 'lib/torque/postgresql/adapter/schema_definitions.rb', line 48 def initialize(*args, **) super @inherits = Array.wrap(.delete(:inherits)).flatten.compact \ if .key?(:inherits) end |
#set_primary_key(tn, id, primary_key) ⇒ Object
55 56 57 |
# File 'lib/torque/postgresql/adapter/schema_definitions.rb', line 55 def set_primary_key(tn, id, primary_key, *, **) super unless @inherits.present? && primary_key.blank? && id == :primary_key end |