module PgPower::ConnectionAdapters::PostgreSQLAdapter::IndexMethods
Provides methods to extend {ActiveRecord::ConnectionAdapters::SchemaStatements} to support index features.
Public Instance Methods
index_name_for_remove(table_name, options = {})
click to toggle source
Overrides ActiveRecord::ConnectionAdapters::SchemaStatements.index_name_for_remove to support schema notation. Prepends the schema name to the index name.
Example¶ ↑
drop_index 'demography.citizens', :country_id # produces DROP INDEX "demography"."index_demography_citizens_on_country_id" # instead of DROP INDEX "index_demography_citizens_on_country_id"
Calls superclass method
# File lib/pg_power/connection_adapters/postgresql_adapter/index_methods.rb, line 32 def index_name_for_remove(table_name, options = {}) index_name = super if table_name.include?('.') # schema notation schema = table_name.split('.').first "#{schema}.#{index_name}" else index_name end end
supports_partial_index?()
click to toggle source
# File lib/pg_power/connection_adapters/postgresql_adapter/index_methods.rb, line 4 def supports_partial_index? true end