diff options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 21 |
2 files changed, 1 insertions, 22 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb b/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb index 1e095110f2..e5d100b51b 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb @@ -15,7 +15,7 @@ module ActiveRecord def dirties_query_cache(base, *method_names) method_names.each do |method_name| - base.class_eval <<-end_code, __FILE__, __LINE__ + base.class_eval <<-end_code, __FILE__, __LINE__ + 1 def #{method_name}_with_query_dirty(*args) # def update_with_query_dirty(*args) clear_query_cache if @query_cache_enabled # clear_query_cache if @query_cache_enabled #{method_name}_without_query_dirty(*args) # update_without_query_dirty(*args) diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 2395a744a3..68ee88bba4 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -658,27 +658,6 @@ module ActiveRecord end end - # Creates a schema for the given user - # - # Example: - # create_schema('products', 'postgres') - def create_schema(schema_name, pg_username) - execute("CREATE SCHEMA \"#{schema_name}\" AUTHORIZATION \"#{pg_username}\"") - end - - # Drops a schema - # - # Example: - # drop_schema('products') - def drop_schema(schema_name) - execute("DROP SCHEMA \"#{schema_name}\"") - end - - # Returns an array of all schemas in the database - def all_schemas - query('SELECT schema_name FROM information_schema.schemata').flatten - end - # Returns the list of all tables in the schema search path or a specified schema. def tables(name = nil) query(<<-SQL, name).map { |row| row[0] } |