Module: Sequel::DuplicateColumnsHandler

Defined in:
lib/sequel/extensions/duplicate_columns_handler.rb

Constant Summary collapse

CALLER_ARGS =
(RUBY_VERSION >= '2.0' ? [0,1] : [0]).freeze

Instance Method Summary collapse

Instance Method Details

#on_duplicate_columns(handler = (raise Error, "Must provide either an argument or a block to on_duplicate_columns" unless block_given?; nil), &block) ⇒ Object

Customize handling of duplicate columns for this dataset.

Raises:


45
46
47
48
# File 'lib/sequel/extensions/duplicate_columns_handler.rb', line 45

def on_duplicate_columns(handler = (raise Error, "Must provide either an argument or a block to on_duplicate_columns" unless block_given?; nil), &block)
  raise Error, "Cannot provide both an argument and a block to on_duplicate_columns" if handler && block
  clone(:on_duplicate_columns=>handler||block)
end