Class | Amalgalite::Column
In: | lib/amalgalite/column.rb lib/amalgalite/column.rb
Parent: | Object

a class representing the meta information about an SQLite column, this class serves both for general Schema level information, and for result set information from a SELECT query.

### Methods

auto_increment= auto_increment= auto_increment? auto_increment? has_default_value? has_default_value? new new not_null_constraint= not_null_constraint= not_null_constraint? not_null_constraint? nullable? nullable? primary_key= primary_key= primary_key? primary_key?

### Attributes

collation_sequence_name | [RW] | the collation sequence name of the column
collation_sequence_name | [RW] | the collation sequence name of the column
db | [RW] | the database name this column belongs to
db | [RW] | the database name this column belongs to
declared_data_type | [RW] | the declared data type of the column in the original sql that created the column
declared_data_type | [RW] | the declared data type of the column in the original sql that created the column
default_value | [RW] | the default value of the column. This may not have a value and that either means that there is no default value, or one could not be determined.
default_value | [RW] | the default value of the column. This may not have a value and that either means that there is no default value, or one could not be determined.
name | [RW] | the column name
name | [RW] | the column name
order | [RW] | The index (starting with 0) of this column in the table definition or result set
order | [RW] | The index (starting with 0) of this column in the table definition or result set
schema | [RW] | the schema object this column is associated with
schema | [RW] | the schema object this column is associated with
table | [RW] | the table to which this column belongs
table | [RW] | the table to which this column belongs

### Public Class methods

new( db, table, name, order)

Create a column with its name and associated table

new( db, table, name, order)

Create a column with its name and associated table

### Public Instance methods

auto_increment=( other )

set whether or not the column is auto increment

auto_increment=( other )

set whether or not the column is auto increment

auto_increment?()

true if the column is auto increment

auto_increment?()

true if the column is auto increment

has_default_value?()

true if the column has a default value

has_default_value?()

true if the column has a default value

not_null_constraint=( other )

set whether or not the column has a not null constraint

not_null_constraint=( other )

set whether or not the column has a not null constraint

not_null_constraint?()

true if the column as a NOT NULL constraint

not_null_constraint?()

true if the column as a NOT NULL constraint

nullable?()

true if the column may have a NULL value

nullable?()

true if the column may have a NULL value

primary_key=( other )

set whether or not the column is a primary key column

primary_key=( other )

set whether or not the column is a primary key column

primary_key?()

true if the column is a primary key column

primary_key?()

true if the column is a primary key column

[Validate]