Class: ActiveRecord::ConnectionAdapters::CipherStashPG::Table
- Inherits:
-
Table
- Object
- Table
- ActiveRecord::ConnectionAdapters::CipherStashPG::Table
- Includes:
- ColumnMethods
- Defined in:
- lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb,
lib/active_record/connection_adapters/6.1/cipherstash_pg/schema_definitions.rb,
lib/active_record/connection_adapters/7.0/cipherstash_pg/schema_definitions.rb
Overview
Active Record PostgreSQL Adapter Table
Instance Method Summary collapse
-
#exclusion_constraint(*args) ⇒ Object
Adds an exclusion constraint.
-
#remove_exclusion_constraint(*args) ⇒ Object
Removes the given exclusion constraint from the table.
-
#remove_unique_key(*args) ⇒ Object
Removes the given unique constraint from the table.
-
#unique_key(*args) ⇒ Object
Adds an unique constraint.
Methods included from ColumnMethods
Instance Method Details
#exclusion_constraint(*args) ⇒ Object
Adds an exclusion constraint.
t.exclusion_constraint("price WITH =, availability_range WITH &&", using: :gist, name: "price_check")
305 306 307 |
# File 'lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb', line 305 def exclusion_constraint(*args) @base.add_exclusion_constraint(name, *args) end |
#remove_exclusion_constraint(*args) ⇒ Object
Removes the given exclusion constraint from the table.
t.remove_exclusion_constraint(name: "price_check")
314 315 316 |
# File 'lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb', line 314 def remove_exclusion_constraint(*args) @base.remove_exclusion_constraint(name, *args) end |
#remove_unique_key(*args) ⇒ Object
Removes the given unique constraint from the table.
t.remove_unique_key(name: "unique_position")
332 333 334 |
# File 'lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb', line 332 def remove_unique_key(*args) @base.remove_unique_key(name, *args) end |
#unique_key(*args) ⇒ Object
Adds an unique constraint.
t.unique_key(:position, name: 'unique_position', deferrable: :deferred)
323 324 325 |
# File 'lib/active_record/connection_adapters/7.1/cipherstash_pg/schema_definitions.rb', line 323 def unique_key(*args) @base.add_unique_key(name, *args) end |