Class ActiveRecord::ConnectionAdapters::Column
In: lib/active_record/connection_adapters/abstract/schema_definitions.rb
Parent: Object

An abstract definition of a column in a table.

Methods

Attributes

default  [R] 
limit  [R] 
name  [R] 
null  [R] 
primary  [RW] 
type  [R] 

Public Class methods

Used to convert from BLOBs to Strings

Instantiates a new column in the table.

name is the column’s name, as in supplier_id int(11). default is the type-casted default value, such as sales_stage varchar(20) default ‘new’. sql_type is only used to extract the column’s length, if necessary. For example, company_name varchar(60). null determines if this column allows NULL values.

Used to convert from Strings to BLOBs

Public Instance methods

Returns the human name of the column name.

Examples
 Column.new('sales_stage', ...).human_name #=> 'Sales stage'

Returns the Ruby class that corresponds to the abstract data type.

Casts value (which is a String) to an appropriate instance.

[Validate]