Class | Amalgalite::Table |
In: |
lib/amalgalite/table.rb
lib/amalgalite/table.rb |
Parent: | Object |
a class representing the meta information about an SQLite table
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 |
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
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