Module: SchemaPlus::Compatibility::ActiveRecord::ConnectionAdapters::PostgreSQLAdapter

Defined in:
lib/schema_plus/compatibility/active_record/connection_adapters/postgresql_adapter.rb

Instance Method Summary collapse

Instance Method Details

#tables_onlyObject



5
6
7
8
9
10
11
12
13
# File 'lib/schema_plus/compatibility/active_record/connection_adapters/postgresql_adapter.rb', line 5

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