Sha256: d2054508e77d77cfe20f38e999c58be62bf81b239d215c976a727ac40144aac8

Contents?: true

Size: 470 Bytes

Versions: 4

Compression:

Stored size: 470 Bytes

Contents

module SchemaPlus::Compatibility
  module ActiveRecord
    module ConnectionAdapters
      module PostgreSQLAdapter
        def tables_only
          select_values(<<-SQL, "SCHEMA")
            SELECT c.relname
            FROM pg_class c
            LEFT JOIN pg_namespace n ON n.oid = c.relnamespace
            WHERE c.relkind IN ('r') -- (r)elation/table
            AND n.nspname = ANY (current_schemas(false))
          SQL
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
schema_plus_compatibility-1.0.0 lib/schema_plus/compatibility/active_record/connection_adapters/postgresql_adapter.rb
schema_plus_compatibility-0.4.0 lib/schema_plus/compatibility/active_record/connection_adapters/postgresql_adapter.rb
schema_plus_compatibility-0.3.0 lib/schema_plus/compatibility/active_record/connection_adapters/postgresql_adapter.rb
schema_plus_compatibility-0.2.0 lib/schema_plus/compatibility/active_record/connection_adapters/postgresql_adapter.rb