Module: Sequel::Plugins::PgRow::ClassMethods

Defined in:
lib/sequel/plugins/pg_row.rb

Instance Method Summary collapse

Instance Method Details

#register_row_typeObject

Register the model’s row type with the database.



61
62
63
64
65
# File 'lib/sequel/plugins/pg_row.rb', line 61

def register_row_type
  table = dataset.first_source_table
  db.register_row_type(table, :converter=>self, :typecaster=>method(:new))
  db.instance_variable_get(:@schema_type_classes)[:"pg_row_#{table}"] = self
end