Method: Sequel::Postgres::DatabaseMethods#add_named_conversion_proc

Defined in:
lib/sequel/adapters/shared/postgres.rb

#add_named_conversion_proc(name, &block) ⇒ Object

Add a conversion proc for a named type. This should be used for types without fixed OIDs, which includes all types that are not included in a default PostgreSQL installation. If a block is given, it is used as the conversion proc, otherwise the conversion proc is looked up in the PG_NAMED_TYPES hash.



162
163
164
# File 'lib/sequel/adapters/shared/postgres.rb', line 162

def add_named_conversion_proc(name, &block)
  add_named_conversion_procs(conversion_procs, name=>(block || PG_NAMED_TYPES[name]))
end