module Sequel::IdentifierMangling::DatasetMethods

Public Instance Methods

identifier_input_method() click to toggle source

The String instance method to call on identifiers before sending them to the database.

# File lib/sequel/extensions/identifier_mangling.rb, line 141
def identifier_input_method
  @opts.fetch(:identifier_input_method, db.identifier_input_method)
end
identifier_input_method=(v) click to toggle source

Set the method to call on identifiers going into the database for this dataset

# File lib/sequel/extensions/identifier_mangling.rb, line 146
def identifier_input_method=(v)
  raise_if_frozen!(%widentifier_input_method= with_identifier_input_method")
  skip_symbol_cache!
  @opts[:identifier_input_method] = v
end
identifier_output_method() click to toggle source

The String instance method to call on identifiers before sending them to the database.

# File lib/sequel/extensions/identifier_mangling.rb, line 154
def identifier_output_method
  @opts.fetch(:identifier_output_method, db.identifier_output_method)
end
identifier_output_method=(v) click to toggle source

Set the method to call on identifiers coming the database for this dataset

# File lib/sequel/extensions/identifier_mangling.rb, line 159
def identifier_output_method=(v)
  raise_if_frozen!(%widentifier_output_method= with_identifier_output_method")
  @opts[:identifier_output_method] = v
end
quote_identifiers?() click to toggle source

Check with the database to see if identifier quoting is enabled

# File lib/sequel/extensions/identifier_mangling.rb, line 165
def quote_identifiers?
  @opts.fetch(:quote_identifiers, db.quote_identifiers?)
end
with_identifier_input_method(meth) click to toggle source

Return a modified dataset with #identifier_input_method set.

# File lib/sequel/extensions/identifier_mangling.rb, line 170
def with_identifier_input_method(meth)
  clone(:identifier_input_method=>meth, :skip_symbol_cache=>true)
end
with_identifier_output_method(meth) click to toggle source

Return a modified dataset with #identifier_output_method set.

# File lib/sequel/extensions/identifier_mangling.rb, line 175
def with_identifier_output_method(meth)
  clone(:identifier_output_method=>meth)
end