No documentation

This module has no description. You can help the Ruby on Rails community by adding new notes.

Constants

ER_QUERY_TIMEOUT = 3024

ER_QUERY_INTERRUPTED = 1317

ER_LOCK_WAIT_TIMEOUT = 1205

ER_CANNOT_CREATE_TABLE = 1005

ER_CANNOT_ADD_FOREIGN = 1215

ER_LOCK_DEADLOCK = 1213

ER_OUT_OF_RANGE = 1264

ER_DATA_TOO_LONG = 1406

ER_NO_REFERENCED_ROW_2 = 1452

ER_DO_NOT_HAVE_DEFAULT = 1364

ER_NOT_NULL_VIOLATION = 1048

ER_DUP_ENTRY = 1062

ForeignKeyDefinition = Struct.new(:from_table, :to_table, :options) do #:nodoc: def name options[:name] end def column options[:column] end def primary_key options[:primary_key] || default_primary_key end def on_delete options[:on_delete] end def on_update options[:on_update] end def custom_primary_key? options[:primary_key] != default_primary_key end def validate? options.fetch(:validate, true) end alias validated? validate? def defined_for?(to_table_ord = nil, to_table: nil, **options) if to_table_ord self.to_table == to_table_ord.to_s else (to_table.nil? || to_table.to_s == self.to_table) && options.all? { |k, v| self.options[k].to_s == v.to_s } end end private def default_primary_key "id" end end

PrimaryKeyDefinition = Struct.new(:name)

ChangeColumnDefinition = Struct.new(:column, :name)

AddColumnDefinition = Struct.new(:column)

ColumnDefinition = Struct.new(:name, :type, :options, :sql_type) do # :nodoc: def primary_key? options[:primary_key] end [:limit, :precision, :scale, :default, :null, :collation, :comment].each do |option_name| module_eval <<-CODE, __FILE__, __LINE__ + 1 def #{option_name} options[:#{option_name}] end def #{option_name}=(value) options[:#{option_name}] = value end CODE end end

SchemaCreation = AbstractAdapter::SchemaCreation # :nodoc:

Attributes

Show files where this module is defined (70 files)
Register or log in to add new notes.