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:
Petrik 2023-04-21 11:09:34 +02:00
parent 932d2aeb6f
commit 7723795486
30 changed files with 51 additions and 0 deletions

View File

@ -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.
#

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -4,6 +4,7 @@ require "set"
module ActiveRecord
module AttributeMethods
# = Active Record Attribute Methods Primary Key
module PrimaryKey
extend ActiveSupport::Concern

View File

@ -2,6 +2,7 @@
module ActiveRecord
module AttributeMethods
# = Active Record Attribute Methods \Query
module Query
extend ActiveSupport::Concern

View File

@ -2,6 +2,7 @@
module ActiveRecord
module AttributeMethods
# = Active Record Attribute Methods \Read
module Read
extend ActiveSupport::Concern

View File

@ -2,6 +2,7 @@
module ActiveRecord
module AttributeMethods
# = Active Record Attribute Methods \Serialization
module Serialization
extend ActiveSupport::Concern

View File

@ -2,6 +2,7 @@
module ActiveRecord
module AttributeMethods
# = Active Record Attribute Methods \Write
module Write
extend ActiveSupport::Concern

View File

@ -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.
#

View File

@ -49,6 +49,8 @@ module ActiveRecord
end
end
# = Active Record Connection Pool
#
# Connection pool base class for managing Active Record database
# connections.
#

View File

@ -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

View File

@ -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.

View File

@ -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].

View File

@ -2,6 +2,7 @@
module ActiveRecord
module ConnectionAdapters
# = Active Record Connection Adapters \Savepoints
module Savepoints
def current_savepoint_name
current_transaction.savepoint_name

View File

@ -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]
#

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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)

View File

@ -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)

View File

@ -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).
#

View File

@ -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" }

View File

@ -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

View File

@ -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.

View File

@ -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.
#

View File

@ -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.

View File

@ -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] }