mirror of https://github.com/rails/rails
Add some missing headers to Active Records docs [ci-skip]
Having a h1 heading will improve SEO and makes things look more consistent.
This commit is contained in:
parent
932d2aeb6f
commit
7723795486
|
@ -2,6 +2,8 @@
|
|||
|
||||
module ActiveRecord
|
||||
module Associations
|
||||
# = Active Record Collection Proxy
|
||||
#
|
||||
# Collection proxies in Active Record are middlemen between an
|
||||
# <tt>association</tt>, and its <tt>target</tt> result set.
|
||||
#
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
module ActiveRecord
|
||||
module Associations
|
||||
# = Active Record Has Many Association
|
||||
#
|
||||
# This is the proxy that handles a has many association.
|
||||
#
|
||||
# If the association has a <tt>:through</tt> option further specialization
|
||||
|
|
|
@ -4,6 +4,8 @@ require "active_support/core_ext/enumerable"
|
|||
|
||||
module ActiveRecord
|
||||
module Associations
|
||||
# = Active Record \Preloader
|
||||
#
|
||||
# Implements the details of eager loading of Active Record associations.
|
||||
#
|
||||
# Suppose that you have the following two Active Record models:
|
||||
|
|
|
@ -4,6 +4,7 @@ require "active_support/core_ext/module/attribute_accessors"
|
|||
|
||||
module ActiveRecord
|
||||
module AttributeMethods
|
||||
# = Active Record Attribute Methods \Dirty
|
||||
module Dirty
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ require "set"
|
|||
|
||||
module ActiveRecord
|
||||
module AttributeMethods
|
||||
# = Active Record Attribute Methods Primary Key
|
||||
module PrimaryKey
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
module ActiveRecord
|
||||
module AttributeMethods
|
||||
# = Active Record Attribute Methods \Query
|
||||
module Query
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
module ActiveRecord
|
||||
module AttributeMethods
|
||||
# = Active Record Attribute Methods \Read
|
||||
module Read
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
module ActiveRecord
|
||||
module AttributeMethods
|
||||
# = Active Record Attribute Methods \Serialization
|
||||
module Serialization
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
module ActiveRecord
|
||||
module AttributeMethods
|
||||
# = Active Record Attribute Methods \Write
|
||||
module Write
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ require "concurrent/map"
|
|||
|
||||
module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
# = Active Record Connection Adapters Connection Handler
|
||||
#
|
||||
# ConnectionHandler is a collection of ConnectionPool objects. It is used
|
||||
# for keeping separate connection pools that connect to different databases.
|
||||
#
|
||||
|
|
|
@ -49,6 +49,8 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
# = Active Record Connection Pool
|
||||
#
|
||||
# Connection pool base class for managing Active Record database
|
||||
# connections.
|
||||
#
|
||||
|
|
|
@ -6,6 +6,8 @@ require "monitor"
|
|||
module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
class ConnectionPool
|
||||
# = Active Record Connection Pool \Queue
|
||||
#
|
||||
# Threadsafe, fair, LIFO queue. Meant to be used by ConnectionPool
|
||||
# with which it shares a Monitor.
|
||||
class Queue
|
||||
|
|
|
@ -6,6 +6,8 @@ require "weakref"
|
|||
module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
class ConnectionPool
|
||||
# = Active Record Connection Pool \Reaper
|
||||
#
|
||||
# Every +frequency+ seconds, the reaper will call +reap+ and +flush+ on
|
||||
# +pool+. A reaper instantiated with a zero frequency will never reap
|
||||
# the connection pool.
|
||||
|
|
|
@ -5,6 +5,7 @@ require "active_support/multibyte/chars"
|
|||
|
||||
module ActiveRecord
|
||||
module ConnectionAdapters # :nodoc:
|
||||
# = Active Record Connection Adapters \Quoting
|
||||
module Quoting
|
||||
# Quotes the column value to help prevent
|
||||
# {SQL injection attacks}[https://en.wikipedia.org/wiki/SQL_injection].
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
# = Active Record Connection Adapters \Savepoints
|
||||
module Savepoints
|
||||
def current_savepoint_name
|
||||
current_transaction.savepoint_name
|
||||
|
|
|
@ -337,6 +337,8 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
# = Active Record Connection Adapters \Table \Definition
|
||||
#
|
||||
# Represents the schema of an SQL table in an abstract way. This class
|
||||
# provides methods for manipulating the schema representation.
|
||||
#
|
||||
|
@ -652,6 +654,8 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
# = Active Record Connection Adapters \Table
|
||||
#
|
||||
# Represents an SQL table in an abstract way for updating a table.
|
||||
# Also see TableDefinition and {connection.create_table}[rdoc-ref:SchemaStatements#create_table]
|
||||
#
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
# = Active Record Connection Adapters Transaction State
|
||||
class TransactionState
|
||||
def initialize(state = nil)
|
||||
@state = state
|
||||
|
@ -254,6 +255,7 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
# = Active Record Restart Parent \Transaction
|
||||
class RestartParentTransaction < Transaction
|
||||
def initialize(connection, parent_transaction, **options)
|
||||
super(connection, **options)
|
||||
|
@ -281,6 +283,7 @@ module ActiveRecord
|
|||
def full_rollback?; false; end
|
||||
end
|
||||
|
||||
# = Active Record Savepoint \Transaction
|
||||
class SavepointTransaction < Transaction
|
||||
def initialize(connection, savepoint_name, parent_transaction, **options)
|
||||
super(connection, **options)
|
||||
|
@ -318,6 +321,7 @@ module ActiveRecord
|
|||
def full_rollback?; false; end
|
||||
end
|
||||
|
||||
# = Active Record Real \Transaction
|
||||
class RealTransaction < Transaction
|
||||
def materialize!
|
||||
if isolation_level
|
||||
|
|
|
@ -57,6 +57,7 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
# = Active Record MySQL Adapter \Table Definition
|
||||
class TableDefinition < ActiveRecord::ConnectionAdapters::TableDefinition
|
||||
include ColumnMethods
|
||||
|
||||
|
@ -102,6 +103,7 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
# = Active Record MySQL Adapter \Table
|
||||
class Table < ActiveRecord::ConnectionAdapters::Table
|
||||
include ColumnMethods
|
||||
end
|
||||
|
|
|
@ -19,6 +19,7 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
module ConnectionAdapters
|
||||
# = Active Record MySQL2 Adapter
|
||||
class Mysql2Adapter < AbstractMysqlAdapter
|
||||
ER_BAD_DB_ERROR = 1049
|
||||
ER_ACCESS_DENIED_ERROR = 1045
|
||||
|
|
|
@ -229,6 +229,7 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
# = Active Record PostgreSQL Adapter \Table Definition
|
||||
class TableDefinition < ActiveRecord::ConnectionAdapters::TableDefinition
|
||||
include ColumnMethods
|
||||
|
||||
|
@ -286,6 +287,7 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
# = Active Record PostgreSQL Adapter \Table
|
||||
class Table < ActiveRecord::ConnectionAdapters::Table
|
||||
include ColumnMethods
|
||||
|
||||
|
@ -326,6 +328,7 @@ module ActiveRecord
|
|||
end
|
||||
end
|
||||
|
||||
# = Active Record PostgreSQL Adapter Alter \Table
|
||||
class AlterTable < ActiveRecord::ConnectionAdapters::AlterTable
|
||||
attr_reader :constraint_validations, :exclusion_constraint_adds, :exclusion_constraint_drops, :unique_key_adds, :unique_key_drops
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
module ConnectionAdapters
|
||||
# = Active Record PostgreSQL Adapter
|
||||
#
|
||||
# The PostgreSQL adapter works with the native C (https://github.com/ged/ruby-pg) driver.
|
||||
#
|
||||
# Options:
|
||||
|
|
|
@ -4,6 +4,7 @@ require "active_support/core_ext/file/atomic"
|
|||
|
||||
module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
# = Active Record Connection Adapters Schema Cache
|
||||
class SchemaCache
|
||||
def self.load_from(filename)
|
||||
return unless File.file?(filename)
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
module ActiveRecord
|
||||
module ConnectionAdapters
|
||||
module SQLite3
|
||||
# = Active Record SQLite3 Adapter \Table Definition
|
||||
class TableDefinition < ActiveRecord::ConnectionAdapters::TableDefinition
|
||||
def references(*args, **options)
|
||||
super(*args, type: :integer, **options)
|
||||
|
|
|
@ -26,6 +26,8 @@ module ActiveRecord
|
|||
end
|
||||
|
||||
module ConnectionAdapters # :nodoc:
|
||||
# = Active Record SQLite3 Adapter
|
||||
#
|
||||
# The SQLite3 adapter works with the sqlite3-ruby drivers
|
||||
# (available as gem from https://rubygems.org/gems/sqlite3).
|
||||
#
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActiveRecord
|
||||
# = Active Record Connection Handling
|
||||
module ConnectionHandling
|
||||
RAILS_ENV = -> { (Rails.env if defined?(Rails.env)) || ENV["RAILS_ENV"].presence || ENV["RACK_ENV"].presence }
|
||||
DEFAULT_ENV = -> { RAILS_ENV.call || "default_env" }
|
||||
|
|
|
@ -7,6 +7,7 @@ require "active_support/parameter_filter"
|
|||
require "concurrent/map"
|
||||
|
||||
module ActiveRecord
|
||||
# = Active Record \Core
|
||||
module Core
|
||||
extend ActiveSupport::Concern
|
||||
include ActiveModel::Access
|
||||
|
|
|
@ -7,6 +7,8 @@ require "active_record/database_configurations/url_config"
|
|||
require "active_record/database_configurations/connection_url_resolver"
|
||||
|
||||
module ActiveRecord
|
||||
# = Active Record Database Configurations
|
||||
#
|
||||
# ActiveRecord::DatabaseConfigurations returns an array of DatabaseConfig
|
||||
# objects that are constructed from the application's database
|
||||
# configuration hash or URL string.
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
module ActiveRecord
|
||||
class DatabaseConfigurations
|
||||
# = Active Record Database Hash Config
|
||||
#
|
||||
# A HashConfig object is created for each database configuration entry that
|
||||
# is created from a hash.
|
||||
#
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
module ActiveRecord
|
||||
class DatabaseConfigurations
|
||||
# = Active Record Database Url Config
|
||||
#
|
||||
# A UrlConfig object is created for each database configuration
|
||||
# entry that is created from a URL. This can either be a URL string
|
||||
# or a hash with a URL in place of the config hash.
|
||||
|
|
|
@ -4,6 +4,8 @@ module ActiveRecord
|
|||
class DestroyAssociationAsyncError < StandardError
|
||||
end
|
||||
|
||||
# = Active Record Destroy Association Async Job
|
||||
#
|
||||
# Job to destroy the records associated with a destroyed record in background.
|
||||
class DestroyAssociationAsyncJob < ActiveJob::Base
|
||||
queue_as { ActiveRecord.queues[:destroy] }
|
||||
|
|
Loading…
Reference in New Issue