Module: Sequel::IdentifierMangling::DatasetMethods
- Defined in:
- lib/sequel/extensions/identifier_mangling.rb
Instance Method Summary collapse
-
#identifier_input_method ⇒ Object
The String instance method to call on identifiers before sending them to the database.
-
#identifier_output_method ⇒ Object
The String instance method to call on identifiers before sending them to the database.
-
#quote_identifiers? ⇒ Boolean
Check with the database to see if identifier quoting is enabled.
-
#with_identifier_input_method(meth) ⇒ Object
Return a modified dataset with identifier_input_method set.
-
#with_identifier_output_method(meth) ⇒ Object
Return a modified dataset with identifier_output_method set.
Instance Method Details
#identifier_input_method ⇒ Object
The String instance method to call on identifiers before sending them to the database.
133 134 135 |
# File 'lib/sequel/extensions/identifier_mangling.rb', line 133 def identifier_input_method @opts.fetch(:identifier_input_method, db.identifier_input_method) end |
#identifier_output_method ⇒ Object
The String instance method to call on identifiers before sending them to the database.
139 140 141 |
# File 'lib/sequel/extensions/identifier_mangling.rb', line 139 def identifier_output_method @opts.fetch(:identifier_output_method, db.identifier_output_method) end |
#quote_identifiers? ⇒ Boolean
Check with the database to see if identifier quoting is enabled
144 145 146 |
# File 'lib/sequel/extensions/identifier_mangling.rb', line 144 def quote_identifiers? @opts.fetch(:quote_identifiers, db.quote_identifiers?) end |
#with_identifier_input_method(meth) ⇒ Object
Return a modified dataset with identifier_input_method set.
149 150 151 |
# File 'lib/sequel/extensions/identifier_mangling.rb', line 149 def with_identifier_input_method(meth) clone(:identifier_input_method=>meth, :skip_symbol_cache=>true) end |
#with_identifier_output_method(meth) ⇒ Object
Return a modified dataset with identifier_output_method set.
154 155 156 |
# File 'lib/sequel/extensions/identifier_mangling.rb', line 154 def with_identifier_output_method(meth) clone(:identifier_output_method=>meth) end |