instance method
data_sources
Ruby on Rails 5.0.7.2
Since v4.2.11.3 Last seen in v5.0.7.2Available in: v4.2.11.3 v5.0.7.2
Signature
data_sources()
No documentation comment.
Source
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 84
def data_sources # :nodoc
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', 'v','m') -- (r)elation/table, (v)iew, (m)aterialized view
AND n.nspname = ANY (current_schemas(false))
SQL
end
Defined in activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb line 84
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements