module ActiveRecord::PostgreSQLExtensions::Features
Public Class Methods
check_feature(feature)
click to toggle source
# File lib/active_record/postgresql_extensions/features.rb, line 39 def check_feature(feature) if !self.send("#{feature}?") raise ActiveRecord::PostgreSQLExtensions::FeatureNotSupportedError.new(feature) end end
Private Class Methods
sniff_features()
click to toggle source
# File lib/active_record/postgresql_extensions/features.rb, line 50 def sniff_features @sniffed = true if ActiveRecord::PostgreSQLExtensions.SERVER_VERSION >= '9.3' @has_copy_from_freeze = true @has_copy_from_program = true @has_create_schema_if_not_exists = true @has_event_triggers = true @has_materialized_views = true @has_rename_rule = true @has_type_if_not_exists = true @has_view_recursive = true end if ActiveRecord::PostgreSQLExtensions.SERVER_VERSION >= '9.1' @has_copy_from_encoding = true @has_create_table_if_not_exists = true @has_create_table_unlogged = true @has_extensions = true @has_foreign_tables = true @has_view_if_exists = true @has_view_set_options = true end if ActiveRecord::PostgreSQLExtensions.SERVER_VERSION >= '9.0' @has_modify_mass_privileges = true end if !!ActiveRecord::PostgreSQLExtensions::PostGIS.VERSION @has_postgis = true end end
sniffed?()
click to toggle source
# File lib/active_record/postgresql_extensions/features.rb, line 46 def sniffed? @sniffed end