Class | Amalgalite::Table
In: | lib/amalgalite/table.rb lib/amalgalite/table.rb
Parent: | Object

a class representing the meta information about an SQLite table

### Methods

column_names column_names columns_in_order columns_in_order new new primary_key primary_key primary_key_columns primary_key_columns temporary? temporary?

### Attributes

columns | [RW] | a hash of Column objects holding the meta information about the columns in this table. keys are the column names
columns | [RW] | a hash of Column objects holding the meta information about the columns in this table. keys are the column names
indexes | [RW] | hash of Index objects holding the meta informationa about the indexes on this table. The keys of the indexes variable is the index name
indexes | [RW] | hash of Index objects holding the meta informationa about the indexes on this table. The keys of the indexes variable is the index name
name | [R] | the table name
name | [R] | the table name
schema | [RW] | the schema object the table is associated with
schema | [RW] | the schema object the table is associated with
sql | [R] | the original sql that was used to create this table
sql | [R] | the original sql that was used to create this table

### Public Class methods

new( name, sql = nil )
new( name, sql = nil )

### Public Instance methods

column_names()

the column names in original definition order

column_names()

the column names in original definition order

columns_in_order()

the Columns in original definition order

columns_in_order()

the Columns in original definition order

primary_key()

the array of colmuns that make up the primary key of the table since a primary key has an index, we loop over all the indexes for the table and pick the first one that is unique, and all the columns in the index have primary_key? as true.

we do this instead of just looking for the columns where primary key is true because we want the columns in primary key order

primary_key()

the array of colmuns that make up the primary key of the table since a primary key has an index, we loop over all the indexes for the table and pick the first one that is unique, and all the columns in the index have primary_key? as true.

we do this instead of just looking for the columns where primary key is true because we want the columns in primary key order

primary_key_columns()

the columns that make up the primary key

primary_key_columns()

the columns that make up the primary key

temporary?()

Is the table a temporary table or not

temporary?()

Is the table a temporary table or not

[Validate]