module Sequel::DuplicateColumnsHandler

  1. lib/sequel/extensions/duplicate_columns_handler.rb

Methods

Public Instance

  1. on_duplicate_columns

Constants

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

Public Instance methods

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

Customize handling of duplicate columns for this dataset.

[show source]
# File lib/sequel/extensions/duplicate_columns_handler.rb, line 44
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