123456789_123456789_123456789_123456789_123456789_

Class: ActiveRecord::ConnectionAdapters::SQLite3::SchemaCreation

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: ActiveRecord::ConnectionAdapters::SchemaCreation
Defined in: activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation.rb

Class Method Summary

Instance Attribute Summary

Instance Method Summary

Constructor Details

This class inherits a constructor from ActiveRecord::ConnectionAdapters::SchemaCreation

Instance Attribute Details

#supports_index_using?Boolean (readonly, private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation.rb', line 14

def supports_index_using?
  false
end

Instance Method Details

#add_column_options!(sql, options) (private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation.rb', line 18

def add_column_options!(sql, options)
  if options[:collation]
    sql << " COLLATE \"#{options[:collation]}\""
  end

  if as = options[:as]
    sql << " GENERATED ALWAYS AS (#{as})"

    if options[:stored]
      sql << " STORED"
    else
      sql << " VIRTUAL"
    end
  end
  super
end

#visit_ForeignKeyDefinition(o) (private)

[ GitHub ]

  
# File 'activerecord/lib/active_record/connection_adapters/sqlite3/schema_creation.rb', line 8

def visit_ForeignKeyDefinition(o)
  super.dup.tap do |sql|
    sql << " DEFERRABLE INITIALLY #{o.deferrable.to_s.upcase}" if o.deferrable
  end
end