Class: Arel::Transformer::PrefixSchemaName
- Inherits:
-
Object
- Object
- Arel::Transformer::PrefixSchemaName
- Defined in:
- lib/arel/transformer/prefix_schema_name.rb
Constant Summary collapse
- PG_CATALOG =
'pg_catalog'.freeze
- DEFAULT_SCHEMA_PRIORITY =
['public', PG_CATALOG].freeze
Instance Attribute Summary collapse
-
#object_mapping ⇒ Object
readonly
Returns the value of attribute object_mapping.
-
#schema_priority ⇒ Object
readonly
Returns the value of attribute schema_priority.
Instance Method Summary collapse
- #call(arel, next_middleware) ⇒ Object
-
#initialize(schema_priority = DEFAULT_SCHEMA_PRIORITY, override_object_mapping = {}) ⇒ PrefixSchemaName
constructor
A new instance of PrefixSchemaName.
Constructor Details
#initialize(schema_priority = DEFAULT_SCHEMA_PRIORITY, override_object_mapping = {}) ⇒ PrefixSchemaName
Returns a new instance of PrefixSchemaName.
10 11 12 13 14 15 16 |
# File 'lib/arel/transformer/prefix_schema_name.rb', line 10 def initialize( schema_priority = DEFAULT_SCHEMA_PRIORITY, override_object_mapping = {} ) @schema_priority = schema_priority @object_mapping = database_object_mapping.merge(override_object_mapping) end |
Instance Attribute Details
#object_mapping ⇒ Object (readonly)
Returns the value of attribute object_mapping.
7 8 9 |
# File 'lib/arel/transformer/prefix_schema_name.rb', line 7 def object_mapping @object_mapping end |
#schema_priority ⇒ Object (readonly)
Returns the value of attribute schema_priority.
8 9 10 |
# File 'lib/arel/transformer/prefix_schema_name.rb', line 8 def schema_priority @schema_priority end |