module Tablature
Tablature
adds methods to `ActiveRecord::Migration` to create and manage partitioned tables in Rails applications.
Constants
- VERSION
Public Class Methods
configuration()
click to toggle source
@return [Tablature::Configuration] Tablature's current configuration
# File lib/tablature/configuration.rb, line 15 def self.configuration @configuration ||= Configuration.new end
configuration=(config)
click to toggle source
Set Tablature's configuration
@param config [Tablature::Configuration]
# File lib/tablature/configuration.rb, line 22 def self.configuration=(config) @configuration = config end
configure() { |configuration| ... }
click to toggle source
Modify Tablature's current configuration
@yieldparam [Tablature::Configuration] config current Tablature
config @example
Tablature.configure do |config| config.database = Tablature::Adapters::Postgres.new end
# File lib/tablature/configuration.rb, line 33 def self.configure yield configuration end
database()
click to toggle source
The current database adapter used by Tablature
.
This defaults to {Adapters::Postgres} by can be overriden via {Configuration}.
# File lib/tablature.rb, line 29 def self.database configuration.database end
load()
click to toggle source
Hooks Tablature
into Rails.
Enables tablature migration methods.
# 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