Module: DataMapper::Adapters::Sql::Quoting
- Defined in:
- lib/data_mapper/adapters/sql/quoting.rb
Overview
Quoting is a mixin that extends your DataMapper::Database singleton-class to allow for object-name and value quoting to be exposed to the queries.
DESIGN: Is there any need for this outside of the query objects? Should we just include it in our query object subclasses and not rely on a Quoting mixin being part of the “standard” Adapter interface?
Instance Method Summary collapse
Instance Method Details
#quote_column_name(name) ⇒ Object
17 18 19 |
# File 'lib/data_mapper/adapters/sql/quoting.rb', line 17 def quote_column_name(name) name.ensure_wrapped_with(self.class::COLUMN_QUOTING_CHARACTER) end |
#quote_table_name(name) ⇒ Object
13 14 15 |
# File 'lib/data_mapper/adapters/sql/quoting.rb', line 13 def quote_table_name(name) name.ensure_wrapped_with(self.class::TABLE_QUOTING_CHARACTER) end |