Method: Sequel::Postgres::InetDatabaseMethods.extended

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

.extended(db) ⇒ Object

Reset the conversion procs when extending the Database object, so it will pick up the inet/cidr converter. Also, extend the datasets with support for literalizing the IPAddr types.



41
42
43
44
45
46
47
# File 'lib/sequel/extensions/pg_inet.rb', line 41

def self.extended(db)
  db.instance_eval do
    extend_datasets(InetDatasetMethods)
    copy_conversion_procs([869, 650, 1041, 651, 1040])
    @schema_type_classes[:ipaddr] = IPAddr
  end
end