Module: Tablature
- Defined in:
- lib/tablature.rb,
lib/tablature/model.rb,
lib/tablature/railtie.rb,
lib/tablature/version.rb,
lib/tablature/statements.rb,
lib/tablature/configuration.rb,
lib/tablature/schema_dumper.rb,
lib/tablature/command_recorder.rb,
lib/tablature/adapters/postgres.rb,
lib/tablature/partitioned_table.rb,
lib/tablature/adapters/postgres/uuid.rb,
lib/tablature/adapters/postgres/errors.rb,
lib/tablature/adapters/postgres/quoting.rb,
lib/tablature/adapters/postgres/connection.rb,
lib/tablature/adapters/postgres/handlers/base.rb,
lib/tablature/adapters/postgres/handlers/list.rb,
lib/tablature/adapters/postgres/handlers/range.rb,
lib/tablature/adapters/postgres/partitioned_tables.rb
Overview
Tablature adds methods to ‘ActiveRecord::Migration` to create and manage partitioned tables in Rails applications.
Defined Under Namespace
Modules: Adapters, CommandRecorder, Model, SchemaDumper, Statements Classes: Configuration, MissingPartition, PartitionedTable, Railtie
Constant Summary collapse
- VERSION =
'0.3.1'.freeze
Class Method Summary collapse
-
.configuration ⇒ Tablature::Configuration
Tablature’s current configuration.
-
.configuration=(config) ⇒ Object
Set Tablature’s configuration.
-
.configure {|config| ... } ⇒ Object
Modify Tablature’s current configuration.
-
.database ⇒ Object
The current database adapter used by Tablature.
-
.load ⇒ Object
Hooks Tablature into Rails.
Class Method Details
.configuration ⇒ Tablature::Configuration
Returns Tablature’s current configuration.
15 16 17 |
# File 'lib/tablature/configuration.rb', line 15 def self.configuration @configuration ||= Configuration.new end |
.configuration=(config) ⇒ Object
Set Tablature’s configuration
22 23 24 |
# File 'lib/tablature/configuration.rb', line 22 def self.configuration=(config) @configuration = config end |
.configure {|config| ... } ⇒ Object
Modify Tablature’s current configuration
33 34 35 |
# File 'lib/tablature/configuration.rb', line 33 def self.configure yield configuration end |
.database ⇒ Object
The current database adapter used by Tablature.
This defaults to Tablature::Adapters::Postgres by can be overriden via Configuration.
29 30 31 |
# File 'lib/tablature.rb', line 29 def self.database configuration.database end |
.load ⇒ Object
Hooks Tablature into Rails.
Enables tablature migration methods.
19 20 21 22 23 24 |
# File 'lib/tablature.rb', line 19 def self.load ActiveRecord::ConnectionAdapters::AbstractAdapter.include Tablature::Statements ActiveRecord::Migration::CommandRecorder.include Tablature::CommandRecorder ActiveRecord::SchemaDumper.prepend Tablature::SchemaDumper ActiveRecord::Base.include Tablature::Model end |