repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/bound_sql_literal.rb
activerecord/lib/arel/nodes/bound_sql_literal.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class BoundSqlLiteral < NodeExpression attr_reader :sql_with_placeholders, :positional_binds, :named_binds def initialize(sql_with_placeholders, positional_binds, named_binds) has_positional = !(positional_binds.nil? || pos...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/table_alias.rb
activerecord/lib/arel/nodes/table_alias.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class TableAlias < Arel::Nodes::Binary alias :name :right alias :relation :left alias :table_alias :name def [](name) relation.is_a?(Table) ? relation[name, self] : Attribute.new(self, name) end def...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/equality.rb
activerecord/lib/arel/nodes/equality.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Equality < Arel::Nodes::Binary include FetchAttribute def equality?; true; end def invert Arel::Nodes::NotEqual.new(left, right) end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/descending.rb
activerecord/lib/arel/nodes/descending.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Descending < Ordering def reverse Ascending.new(expr) end def direction :desc end def ascending? false end def descending? true end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/casted.rb
activerecord/lib/arel/nodes/casted.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Casted < Arel::Nodes::NodeExpression # :nodoc: attr_reader :value, :attribute alias :value_before_type_cast :value def initialize(value, attribute) @value = value @attribute = attribute super...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/grouping.rb
activerecord/lib/arel/nodes/grouping.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Grouping < Unary def fetch_attribute(&block) expr.fetch_attribute(&block) end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/comment.rb
activerecord/lib/arel/nodes/comment.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Comment < Arel::Nodes::Node attr_reader :values def initialize(values) super() @values = values end def initialize_copy(other) super @values = @values.clone end def ha...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/case.rb
activerecord/lib/arel/nodes/case.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Case < Arel::Nodes::NodeExpression attr_accessor :case, :conditions, :default def initialize(expression = nil, default = nil) @case = expression @conditions = [] @default = default end def...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/homogeneous_in.rb
activerecord/lib/arel/nodes/homogeneous_in.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class HomogeneousIn < Node attr_reader :attribute, :values, :type def initialize(values, attribute, type) @values = values @attribute = attribute @type = type end def hash ivars.hash ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/values_list.rb
activerecord/lib/arel/nodes/values_list.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class ValuesList < Unary alias :rows :expr end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/matches.rb
activerecord/lib/arel/nodes/matches.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Matches < Binary attr_reader :escape attr_accessor :case_sensitive def initialize(left, right, escape = nil, case_sensitive = false) super(left, right) @escape = escape && Nodes.build_quoted(escape) ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/terminal.rb
activerecord/lib/arel/nodes/terminal.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Distinct < Arel::Nodes::NodeExpression def hash self.class.hash end def eql?(other) self.class == other.class end alias :== :eql? end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/false.rb
activerecord/lib/arel/nodes/false.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class False < Arel::Nodes::NodeExpression def hash self.class.hash end def eql?(other) self.class == other.class end alias :== :eql? end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/unary.rb
activerecord/lib/arel/nodes/unary.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Unary < Arel::Nodes::NodeExpression attr_accessor :expr alias :value :expr def initialize(expr) super() @expr = expr end def hash @expr.hash end def eql?(other) ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/string_join.rb
activerecord/lib/arel/nodes/string_join.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class StringJoin < Arel::Nodes::Join def initialize(left, right = nil) super end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/infix_operation.rb
activerecord/lib/arel/nodes/infix_operation.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class InfixOperation < Binary include Arel::Expressions include Arel::Predications include Arel::OrderPredications include Arel::AliasPredication include Arel::Math attr_reader :operator def initializ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/bind_param.rb
activerecord/lib/arel/nodes/bind_param.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class BindParam < Node attr_reader :value def initialize(value) @value = value super() end def hash [self.class, self.value].hash end def eql?(other) other.is_a?(BindParam) ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/function.rb
activerecord/lib/arel/nodes/function.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Function < Arel::Nodes::NodeExpression include Arel::WindowPredications include Arel::FilterPredications attr_accessor :expressions, :distinct def initialize(expr) super() @expressions = expr ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/sql_literal.rb
activerecord/lib/arel/nodes/sql_literal.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class SqlLiteral < String include Arel::Expressions include Arel::Predications include Arel::AliasPredication include Arel::OrderPredications attr_reader :retryable def initialize(string, retryable: false) ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/regexp.rb
activerecord/lib/arel/nodes/regexp.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Regexp < Binary attr_accessor :case_sensitive def initialize(left, right, case_sensitive = true) super(left, right) @case_sensitive = case_sensitive end end class NotRegexp < Regexp; end end e...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/node_expression.rb
activerecord/lib/arel/nodes/node_expression.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class NodeExpression < Arel::Nodes::Node include Arel::Expressions include Arel::Predications include Arel::AliasPredication include Arel::OrderPredications include Arel::Math end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/outer_join.rb
activerecord/lib/arel/nodes/outer_join.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class OuterJoin < Arel::Nodes::Join end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/select_core.rb
activerecord/lib/arel/nodes/select_core.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class SelectCore < Arel::Nodes::Node attr_accessor :projections, :wheres, :groups, :windows, :comment attr_accessor :havings, :source, :set_quantifier, :optimizer_hints def initialize(relation = nil) super() @...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/fragments.rb
activerecord/lib/arel/nodes/fragments.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Fragments < Arel::Nodes::Node attr_reader :values def initialize(values = []) super() @values = values end def initialize_copy(other) super @values = @values.clone end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/true.rb
activerecord/lib/arel/nodes/true.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class True < Arel::Nodes::NodeExpression def hash self.class.hash end def eql?(other) self.class == other.class end alias :== :eql? end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/cte.rb
activerecord/lib/arel/nodes/cte.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Cte < Arel::Nodes::Binary alias :name :left alias :relation :right attr_reader :materialized def initialize(name, relation, materialized: nil) super(name, relation) @materialized = materialized ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/with.rb
activerecord/lib/arel/nodes/with.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class With < Arel::Nodes::Unary alias children expr end class WithRecursive < With; end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/unqualified_column.rb
activerecord/lib/arel/nodes/unqualified_column.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class UnqualifiedColumn < Arel::Nodes::Unary alias :attribute :expr alias :attribute= :expr= def relation @expr.relation end def column @expr.column end def name @expr.name ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/nodes/ordering.rb
activerecord/lib/arel/nodes/ordering.rb
# frozen_string_literal: true module Arel # :nodoc: all module Nodes class Ordering < Unary def nulls_first NullsFirst.new(self) end def nulls_last NullsLast.new(self) end end class NullsFirst < Ordering def reverse NullsLast.new(expr.reverse) ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/attributes/attribute.rb
activerecord/lib/arel/attributes/attribute.rb
# frozen_string_literal: true module Arel # :nodoc: all module Attributes class Attribute < Struct.new :relation, :name include Arel::Expressions include Arel::Predications include Arel::AliasPredication include Arel::OrderPredications include Arel::Math def type_caster ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/visitors/mysql.rb
activerecord/lib/arel/visitors/mysql.rb
# frozen_string_literal: true module Arel # :nodoc: all module Visitors class MySQL < Arel::Visitors::ToSql private def visit_Arel_Nodes_Bin(o, collector) collector << "CAST(" visit o.expr, collector collector << " AS BINARY)" end def visit_Arel_Nodes_...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/visitors/to_sql.rb
activerecord/lib/arel/visitors/to_sql.rb
# frozen_string_literal: true module Arel # :nodoc: all module Visitors class UnsupportedVisitError < StandardError def initialize(object) super "Unsupported argument type: #{object.class.name}. Construct an Arel node instead." end end class ToSql < Arel::Visitors::Visitor def ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/visitors/postgresql.rb
activerecord/lib/arel/visitors/postgresql.rb
# frozen_string_literal: true module Arel # :nodoc: all module Visitors class PostgreSQL < Arel::Visitors::ToSql private def visit_Arel_Nodes_UpdateStatement(o, collector) collector.retryable = false o = prepare_update_statement(o) collector << "UPDATE " # ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/visitors/visitor.rb
activerecord/lib/arel/visitors/visitor.rb
# frozen_string_literal: true module Arel # :nodoc: all module Visitors class Visitor def initialize @dispatch = get_dispatch_cache end def accept(object, collector = nil) visit object, collector end private attr_reader :dispatch def self.dispatch_...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/visitors/dot.rb
activerecord/lib/arel/visitors/dot.rb
# frozen_string_literal: true module Arel # :nodoc: all module Visitors class Dot < Arel::Visitors::Visitor class Node # :nodoc: attr_accessor :name, :id, :fields def initialize(name, id, fields = []) @name = name @id = id @fields = fields end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/visitors/sqlite.rb
activerecord/lib/arel/visitors/sqlite.rb
# frozen_string_literal: true module Arel # :nodoc: all module Visitors class SQLite < Arel::Visitors::ToSql private def visit_Arel_Nodes_UpdateStatement(o, collector) collector.retryable = false o = prepare_update_statement(o) collector << "UPDATE " # UPDA...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/collectors/composite.rb
activerecord/lib/arel/collectors/composite.rb
# frozen_string_literal: true module Arel # :nodoc: all module Collectors class Composite attr_accessor :preparable attr_reader :retryable def initialize(left, right) @left = left @right = right end def retryable=(retryable) left.retryable = retryable ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/collectors/sql_string.rb
activerecord/lib/arel/collectors/sql_string.rb
# frozen_string_literal: true require "arel/collectors/plain_string" module Arel # :nodoc: all module Collectors class SQLString < PlainString attr_accessor :preparable, :retryable def initialize(*) super @bind_index = 1 end def add_bind(bind, &) self << yield(@...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/collectors/bind.rb
activerecord/lib/arel/collectors/bind.rb
# frozen_string_literal: true module Arel # :nodoc: all module Collectors class Bind attr_accessor :retryable def initialize @binds = [] end def <<(str) self end def add_bind(bind, &) @binds << bind self end def add_binds(binds, ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/collectors/plain_string.rb
activerecord/lib/arel/collectors/plain_string.rb
# frozen_string_literal: true module Arel # :nodoc: all module Collectors class PlainString def initialize @str = +"" end def value @str end def <<(str) @str << str self end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/arel/collectors/substitute_binds.rb
activerecord/lib/arel/collectors/substitute_binds.rb
# frozen_string_literal: true module Arel # :nodoc: all module Collectors class SubstituteBinds attr_accessor :preparable, :retryable def initialize(quoter, delegate_collector) @quoter = quoter @delegate = delegate_collector end def <<(str) delegate << str ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/insert_all.rb
activerecord/lib/active_record/insert_all.rb
# frozen_string_literal: true require "active_support/core_ext/enumerable" module ActiveRecord class InsertAll # :nodoc: attr_reader :model, :connection, :inserts, :keys attr_reader :on_duplicate, :update_only, :returning, :unique_by, :update_sql class << self def execute(relation, ...) r...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/attributes.rb
activerecord/lib/active_record/attributes.rb
# frozen_string_literal: true require "active_model/attribute/user_provided_default" module ActiveRecord # See ActiveRecord::Attributes::ClassMethods for documentation module Attributes extend ActiveSupport::Concern include ActiveModel::AttributeRegistration include ActiveModel::Attributes::Normalizat...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/core.rb
activerecord/lib/active_record/core.rb
# frozen_string_literal: true require "active_support/core_ext/enumerable" require "active_support/parameter_filter" require "concurrent/map" module ActiveRecord # = Active Record \Core module Core extend ActiveSupport::Concern include ActiveModel::Access included do ## # :singleton-metho...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/persistence.rb
activerecord/lib/active_record/persistence.rb
# frozen_string_literal: true require "active_record/insert_all" module ActiveRecord # = Active Record \Persistence module Persistence extend ActiveSupport::Concern module ClassMethods # Creates an object (or multiple objects) and saves it to the database, if validations pass. # The resulting...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/delegated_type.rb
activerecord/lib/active_record/delegated_type.rb
# frozen_string_literal: true require "active_support/core_ext/string/inquiry" module ActiveRecord # = Delegated types # # Class hierarchies can map to relational database tables in many ways. Active Record, for example, offers # purely abstract classes, where the superclass doesn't persist any attributes, an...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/explain.rb
activerecord/lib/active_record/explain.rb
# frozen_string_literal: true require "active_record/explain_registry" module ActiveRecord module Explain # Executes the block with the collect flag enabled. Queries are collected # asynchronously by the subscriber and returned. def collecting_queries_for_explain # :nodoc: ExplainRegistry.start ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/model_schema.rb
activerecord/lib/active_record/model_schema.rb
# frozen_string_literal: true require "monitor" module ActiveRecord module ModelSchema extend ActiveSupport::Concern ## # :method: id_value # :call-seq: id_value # # Returns the underlying column value for a column named "id". Useful when defining # a composite primary key including an ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/fixtures.rb
activerecord/lib/active_record/fixtures.rb
# frozen_string_literal: true require "erb" require "yaml" require "active_support/dependencies" require "active_support/core_ext/digest/uuid" require "active_record/test_fixtures" module ActiveRecord class FixtureClassNotFound < ActiveRecord::ActiveRecordError # :nodoc: end # = Active Record \Fixtures # #...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/internal_metadata.rb
activerecord/lib/active_record/internal_metadata.rb
# frozen_string_literal: true require "active_record/scoping/default" require "active_record/scoping/named" module ActiveRecord # This class is used to create a table that keeps track of values and keys such # as which environment migrations were run in. # # This is enabled by default. To disable this functio...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/version.rb
activerecord/lib/active_record/version.rb
# frozen_string_literal: true require_relative "gem_version" module ActiveRecord # Returns the currently loaded version of Active Record as a +Gem::Version+. def self.version gem_version end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/counter_cache.rb
activerecord/lib/active_record/counter_cache.rb
# frozen_string_literal: true module ActiveRecord # = Active Record Counter Cache module CounterCache extend ActiveSupport::Concern included do class_attribute :_counter_cache_columns, instance_accessor: false, default: [] class_attribute :counter_cached_association_names, instance_writer: fal...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/nested_attributes.rb
activerecord/lib/active_record/nested_attributes.rb
# frozen_string_literal: true require "active_support/core_ext/hash/except" require "active_support/core_ext/module/redefine_method" require "active_support/core_ext/hash/indifferent_access" module ActiveRecord module NestedAttributes # :nodoc: class TooManyRecords < ActiveRecordError end extend Active...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/serialization.rb
activerecord/lib/active_record/serialization.rb
# frozen_string_literal: true module ActiveRecord # :nodoc: # = Active Record \Serialization module Serialization extend ActiveSupport::Concern include ActiveModel::Serializers::JSON included do self.include_root_in_json = false end def serializable_hash(options = nil) if self.cla...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/token_for.rb
activerecord/lib/active_record/token_for.rb
# frozen_string_literal: true require "active_support/core_ext/object/json" module ActiveRecord module TokenFor extend ActiveSupport::Concern included do class_attribute :token_definitions, instance_accessor: false, instance_predicate: false, default: {} class_attribute :generated_token_verifie...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/table_metadata.rb
activerecord/lib/active_record/table_metadata.rb
# frozen_string_literal: true module ActiveRecord class TableMetadata # :nodoc: def initialize(klass, arel_table) @klass = klass @arel_table = arel_table end def primary_key klass&.primary_key end def type(column_name) arel_table.type_for_attribute(column_name) end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/log_subscriber.rb
activerecord/lib/active_record/log_subscriber.rb
# frozen_string_literal: true module ActiveRecord class LogSubscriber < ActiveSupport::EventReporter::LogSubscriber # :nodoc: IGNORE_PAYLOAD_NAMES = ["SCHEMA", "EXPLAIN"] self.namespace = "active_record" class_attribute :backtrace_cleaner, default: ActiveSupport::BacktraceCleaner.new def strict_lo...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/inheritance.rb
activerecord/lib/active_record/inheritance.rb
# frozen_string_literal: true require "active_support/inflector" module ActiveRecord # = Single table inheritance # # Active Record allows inheritance by storing the name of the class in a column that by # default is named "type" (can be changed by overwriting <tt>Base.inheritance_column</tt>). # This means...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/errors.rb
activerecord/lib/active_record/errors.rb
# frozen_string_literal: true module ActiveRecord include ActiveSupport::Deprecation::DeprecatedConstantAccessor # = Active Record Errors # # Generic Active Record exception class. class ActiveRecordError < StandardError end # Raised when the single-table inheritance mechanism fails to locate the subc...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/type.rb
activerecord/lib/active_record/type.rb
# frozen_string_literal: true require "active_model/type" require "active_record/type/internal/timezone" require "active_record/type/date" require "active_record/type/date_time" require "active_record/type/decimal_without_scale" require "active_record/type/json" require "active_record/type/time" require "active_reco...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/query_logs.rb
activerecord/lib/active_record/query_logs.rb
# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors_per_thread" require "active_record/query_logs_formatter" module ActiveRecord # = Active Record Query Logs # # Automatically append comments to SQL queries with runtime information tags. This can be used to trace troublesom...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/translation.rb
activerecord/lib/active_record/translation.rb
# frozen_string_literal: true module ActiveRecord module Translation # Set the lookup ancestors for ActiveModel. def lookup_ancestors # :nodoc: klass = self classes = [klass] return classes if klass == ActiveRecord::Base while !klass.base_class? classes << klass = klass.super...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/legacy_yaml_adapter.rb
activerecord/lib/active_record/legacy_yaml_adapter.rb
# frozen_string_literal: true module ActiveRecord module LegacyYamlAdapter # :nodoc: def self.convert(coder) return coder unless coder.is_a?(Psych::Coder) case coder["active_record_yaml_version"] when 1, 2 then coder else raise("Active Record doesn't know how to load YAML with th...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/marshalling.rb
activerecord/lib/active_record/marshalling.rb
# frozen_string_literal: true module ActiveRecord module Marshalling @format_version = 6.1 class << self attr_reader :format_version def format_version=(version) case version when 6.1 Methods.remove_method(:marshal_dump) if Methods.method_defined?(:marshal_dump) ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/encryption.rb
activerecord/lib/active_record/encryption.rb
# frozen_string_literal: true require "active_support/core_ext/module" require "active_support/core_ext/array" module ActiveRecord module Encryption extend ActiveSupport::Autoload eager_autoload do autoload :AutoFilteredParameters autoload :Cipher autoload :Config autoload :Configur...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/test_databases.rb
activerecord/lib/active_record/test_databases.rb
# frozen_string_literal: true require "active_support/testing/parallelization" module ActiveRecord module TestDatabases # :nodoc: ActiveSupport::Testing::Parallelization.before_fork_hook do if ActiveSupport.parallelize_test_databases ActiveRecord::Base.connection_handler.clear_all_connections! ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/destroy_association_async_job.rb
activerecord/lib/active_record/destroy_association_async_job.rb
# frozen_string_literal: true 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 { Active...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/scoping.rb
activerecord/lib/active_record/scoping.rb
# frozen_string_literal: true module ActiveRecord module Scoping extend ActiveSupport::Concern included do include Default include Named end module ClassMethods # :nodoc: # Collects attributes from scopes that should be applied when creating # an AR instance for the particu...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/transaction.rb
activerecord/lib/active_record/transaction.rb
# frozen_string_literal: true require "active_support/core_ext/digest" module ActiveRecord # Class specifies the interface to interact with the current transaction state. # # It can either map to an actual transaction/savepoint, or represent the # absence of a transaction. # # == State # # We say that...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/relation.rb
activerecord/lib/active_record/relation.rb
# frozen_string_literal: true module ActiveRecord # = Active Record \Relation class Relation class ExplainProxy # :nodoc: def initialize(relation, options) @relation = relation @options = options end def inspect exec_explain { @relation.send(:exec_queries) } e...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/secure_password.rb
activerecord/lib/active_record/secure_password.rb
# frozen_string_literal: true module ActiveRecord module SecurePassword extend ActiveSupport::Concern include ActiveModel::SecurePassword module ClassMethods # Given a set of attributes, finds a record using the non-password # attributes, and then authenticates that record using the passwor...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/result.rb
activerecord/lib/active_record/result.rb
# frozen_string_literal: true module ActiveRecord ### # = Active Record \Result # # This class encapsulates a result returned from calling # {#exec_query}[rdoc-ref:ConnectionAdapters::DatabaseStatements#exec_query] # on any database connection adapter. For example: # # result = ActiveRecord::Base.lea...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/attribute_methods.rb
activerecord/lib/active_record/attribute_methods.rb
# frozen_string_literal: true require "active_support/core_ext/enumerable" module ActiveRecord # = Active Record Attribute Methods module AttributeMethods extend ActiveSupport::Concern include ActiveModel::AttributeMethods included do initialize_generated_modules include Read includ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/store.rb
activerecord/lib/active_record/store.rb
# frozen_string_literal: true require "active_support/core_ext/hash/indifferent_access" module ActiveRecord # = Active Record \Store # # Store gives you a thin wrapper around serialize for the purpose of storing hashes in a single column. # It's like a simple key/value store baked into your record when you do...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/callbacks.rb
activerecord/lib/active_record/callbacks.rb
# frozen_string_literal: true module ActiveRecord # = Active Record \Callbacks # # \Callbacks are hooks into the life cycle of an Active Record object that allow you to trigger logic # before or after a change in the object state. This can be used to make sure that associated and # dependent objects are dele...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/message_pack.rb
activerecord/lib/active_record/message_pack.rb
# frozen_string_literal: true module ActiveRecord module MessagePack # :nodoc: FORMAT_VERSION = 1 class << self def dump(input) encoder = Encoder.new [FORMAT_VERSION, encoder.encode(input), encoder.entries] end def load(dumped) format_version, top_level, entries = ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/query_logs_formatter.rb
activerecord/lib/active_record/query_logs_formatter.rb
# frozen_string_literal: true module ActiveRecord module QueryLogs module LegacyFormatter # :nodoc: class << self # Formats the key value pairs into a string. def format(key, value) "#{key}:#{value}" end def join(pairs) pairs.join(",") end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/autosave_association.rb
activerecord/lib/active_record/autosave_association.rb
# frozen_string_literal: true require "active_record/associations/nested_error" module ActiveRecord # = Active Record Autosave Association # # AutosaveAssociation is a module that takes care of automatically saving # associated records when their parent is saved. In addition to saving, it # also destroys an...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/secure_token.rb
activerecord/lib/active_record/secure_token.rb
# frozen_string_literal: true module ActiveRecord module SecureToken class MinimumLengthError < StandardError; end MINIMUM_TOKEN_LENGTH = 24 extend ActiveSupport::Concern module ClassMethods # Example using #has_secure_token # # # Schema: User(token:string, auth_token:string) ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/validations.rb
activerecord/lib/active_record/validations.rb
# frozen_string_literal: true module ActiveRecord # = Active Record \RecordInvalid # # Raised by {ActiveRecord::Base#save!}[rdoc-ref:Persistence#save!] and # {ActiveRecord::Base#create!}[rdoc-ref:Persistence::ClassMethods#create!] when the record is invalid. # Use the #record method to retrieve the record wh...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/connection_handling.rb
activerecord/lib/active_record/connection_handling.rb
# 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" } # Establishes the conn...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/database_configurations.rb
activerecord/lib/active_record/database_configurations.rb
# frozen_string_literal: true require "uri" require "active_record/database_configurations/database_config" require "active_record/database_configurations/hash_config" require "active_record/database_configurations/url_config" require "active_record/database_configurations/connection_url_resolver" module ActiveRecord...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/structured_event_subscriber.rb
activerecord/lib/active_record/structured_event_subscriber.rb
# frozen_string_literal: true require "active_support/structured_event_subscriber" module ActiveRecord class StructuredEventSubscriber < ActiveSupport::StructuredEventSubscriber # :nodoc: IGNORE_PAYLOAD_NAMES = ["SCHEMA", "EXPLAIN"] def strict_loading_violation(event) owner = event.payload[:owner] ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/aggregations.rb
activerecord/lib/active_record/aggregations.rb
# frozen_string_literal: true module ActiveRecord # See ActiveRecord::Aggregations::ClassMethods for documentation module Aggregations def initialize_dup(*) # :nodoc: @aggregation_cache = @aggregation_cache.dup super end def reload(*) # :nodoc: clear_aggregation_cache super ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/dynamic_matchers.rb
activerecord/lib/active_record/dynamic_matchers.rb
# frozen_string_literal: true module ActiveRecord module DynamicMatchers # :nodoc: private def respond_to_missing?(name, _) if self == Base super else super || begin match = Method.match(name) match && match.valid?(self, name) end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/railtie.rb
activerecord/lib/active_record/railtie.rb
# frozen_string_literal: true require "rails" require "active_record" require "active_support/core_ext/object/try" require "active_model/railtie" # For now, action_controller must always be present with # Rails, so let's make sure that it gets required before # here. This is needed for correctly setting up the middle...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/reflection.rb
activerecord/lib/active_record/reflection.rb
# frozen_string_literal: true require "active_support/core_ext/string/filters" module ActiveRecord # = Active Record Reflection module Reflection # :nodoc: extend ActiveSupport::Concern included do class_attribute :_reflections, instance_writer: false, default: {} class_attribute :aggregate_r...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/no_touching.rb
activerecord/lib/active_record/no_touching.rb
# frozen_string_literal: true module ActiveRecord # = Active Record No Touching module NoTouching extend ActiveSupport::Concern module ClassMethods # Lets you selectively disable calls to +touch+ for the # duration of a block. # # ==== Examples # ActiveRecord::Base.no_touch...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/asynchronous_queries_tracker.rb
activerecord/lib/active_record/asynchronous_queries_tracker.rb
# frozen_string_literal: true require "concurrent/atomic/atomic_boolean" require "concurrent/atomic/read_write_lock" module ActiveRecord class AsynchronousQueriesTracker # :nodoc: class Session # :nodoc: def initialize @active = Concurrent::AtomicBoolean.new(true) @lock = Concurrent::ReadW...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/association_relation.rb
activerecord/lib/active_record/association_relation.rb
# frozen_string_literal: true module ActiveRecord class AssociationRelation < Relation # :nodoc: def initialize(klass, association, **) super(klass) @association = association end def proxy_association @association end def ==(other) other == records end %w(inser...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/type_caster.rb
activerecord/lib/active_record/type_caster.rb
# frozen_string_literal: true require "active_record/type_caster/map" require "active_record/type_caster/connection" module ActiveRecord module TypeCaster # :nodoc: end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/base.rb
activerecord/lib/active_record/base.rb
# frozen_string_literal: true require "active_support/benchmarkable" require "active_support/dependencies" require "active_support/descendants_tracker" require "active_support/time" require "active_support/core_ext/class/subclasses" require "active_record/log_subscriber" require "active_record/structured_event_subscri...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/suppressor.rb
activerecord/lib/active_record/suppressor.rb
# frozen_string_literal: true module ActiveRecord # = Active Record \Suppressor # # ActiveRecord::Suppressor prevents the receiver from being saved during # a given block. # # For example, here's a pattern of creating notifications when new comments # are posted. (The notification may in turn trigger an ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/touch_later.rb
activerecord/lib/active_record/touch_later.rb
# frozen_string_literal: true module ActiveRecord # = Active Record Touch Later module TouchLater # :nodoc: def before_committed! touch_deferred_attributes if has_defer_touch_attrs? && persisted? super end def touch_later(*names) # :nodoc: _raise_record_not_touched_error unless persi...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/schema_dumper.rb
activerecord/lib/active_record/schema_dumper.rb
# frozen_string_literal: true require "stringio" module ActiveRecord # = Active Record Schema Dumper # # This class is used to dump the database schema for some connection to some # output format (i.e., ActiveRecord::Schema). class SchemaDumper # :nodoc: private_class_method :new ## # :singleto...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/sanitization.rb
activerecord/lib/active_record/sanitization.rb
# frozen_string_literal: true module ActiveRecord module Sanitization extend ActiveSupport::Concern module ClassMethods # Accepts an array of SQL conditions and sanitizes them into a valid # SQL fragment for a WHERE clause. # # sanitize_sql_for_conditions(["name=? and group_id=?", ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/readonly_attributes.rb
activerecord/lib/active_record/readonly_attributes.rb
# frozen_string_literal: true module ActiveRecord class ReadonlyAttributeError < ActiveRecordError end module ReadonlyAttributes extend ActiveSupport::Concern included do class_attribute :_attr_readonly, instance_accessor: false, default: [] end module ClassMethods # Attributes lis...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/schema_migration.rb
activerecord/lib/active_record/schema_migration.rb
# frozen_string_literal: true module ActiveRecord # This class is used to create a table that keeps track of which migrations # have been applied to a given database. When a migration is run, its schema # number is inserted in to the schema migrations table so it doesn't need # to be executed the next time. ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/statement_cache.rb
activerecord/lib/active_record/statement_cache.rb
# frozen_string_literal: true module ActiveRecord # Statement cache is used to cache a single statement in order to avoid creating the AST again. # Initializing the cache is done by passing the statement in the create block: # # cache = StatementCache.create(ClothingItem.lease_connection) do |params| # ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/activerecord/lib/active_record/integration.rb
activerecord/lib/active_record/integration.rb
# frozen_string_literal: true require "active_support/core_ext/string/filters" module ActiveRecord module Integration extend ActiveSupport::Concern included do ## # :singleton-method: # Indicates the format used to generate the timestamp in the cache key, if # versioning is off. Acc...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false