Class | Amalgalite::Schema
In: | lib/amalgalite/schema.rb lib/amalgalite/schema.rb
Parent: | Object

An object view of the schema in the SQLite database. If the schema changes after this class is created, it has no knowledge of that.

### Methods

current_version current_version dirty? dirty? load_columns load_columns load_indexes load_indexes load_schema! load_schema! load_table load_table load_tables load_tables load_view load_view load_views load_views new new tables tables views views

### Attributes

catalog | [R] |
catalog | [R] |
db | [R] |
db | [R] |
dirty | [W] |
dirty | [W] |
schema | [R] |
schema | [R] |
schema_version | [R] |
schema_version | [R] |

### Public Class methods

new( db, catalog = 'main', schema = 'sqlite')

Create a new instance of Schema

new( db, catalog = 'main', schema = 'sqlite')

Create a new instance of Schema

### Public Instance methods

current_version()
current_version()
dirty?()
dirty?()
load_columns( table )

load all the columns for a particular table

load_columns( table )

load all the columns for a particular table

load_indexes( table )

load all the indexes for a particular table

load_indexes( table )

load all the indexes for a particular table

load_schema!()

load the schema from the database

load_schema!()

load the schema from the database

load_table( table_name )

Load a single table

load_table( table_name )

Load a single table

load_tables()

load all the tables

load_tables()

load all the tables

load_view( name )

load a single view

load_view( name )

load a single view

load_views()

load all the views for the database

load_views()

load all the views for the database

tables()

return the tables, reloading if dirty

tables()

return the tables, reloading if dirty

views()

return the views, reloading if dirty

views()

return the views, reloading if dirty

[Validate]