method
quoted_scope
v6.1.7.7 -
Show latest stable
- Class:
ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements
quoted_scope(name = nil, type: nil)public
No documentation available.
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 769
def quoted_scope(name = nil, type: nil)
schema, name = extract_schema_qualified_name(name)
type = case type
when "BASE TABLE"
"'r','p'"
when "VIEW"
"'v','m'"
when "FOREIGN TABLE"
"'f'"
end
scope = {}
scope[:schema] = schema ? quote(schema) : "ANY (current_schemas(false))"
scope[:name] = quote(name) if name
scope[:type] = type if type
scope
end