1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Arel: :nodoc: all

This commit is contained in:
Matthew Draper 2018-02-24 18:11:47 +10:30
parent 4c0a3d4880
commit 354f1c28e8
81 changed files with 81 additions and 81 deletions

View file

@ -25,7 +25,7 @@ require "arel/update_manager"
require "arel/delete_manager"
require "arel/nodes"
module Arel
module Arel # :nodoc: all
VERSION = "10.0.0"
def self.sql(raw_sql)

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module AliasPredication
def as(other)
Nodes::As.new self, Nodes::SqlLiteral.new(other)

View file

@ -2,7 +2,7 @@
require "arel/attributes/attribute"
module Arel
module Arel # :nodoc: all
module Attributes
###
# Factory method to wrap a raw database +column+ to an Arel Attribute.

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Attributes
class Attribute < Struct.new :relation, :name
include Arel::Expressions

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Collectors
class Bind
def initialize

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Collectors
class Composite
def initialize(left, right)

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Collectors
class PlainString
def initialize

View file

@ -2,7 +2,7 @@
require "arel/collectors/plain_string"
module Arel
module Arel # :nodoc: all
module Collectors
class SQLString < PlainString
def initialize(*)

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Collectors
class SubstituteBinds
def initialize(quoter, delegate_collector)

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Compatibility # :nodoc:
class Wheres # :nodoc:
include Enumerable

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
###
# FIXME hopefully we can remove this
module Crud

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
class DeleteManager < Arel::TreeManager
def initialize
super

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
class ArelError < StandardError
end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Expressions
def count(distinct = false)
Nodes::Count.new [self], distinct

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
###
# Methods for creating various nodes
module FactoryMethods

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
class InsertManager < Arel::TreeManager
def initialize
super

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Math
def *(other)
Arel::Nodes::Multiplication.new(self, other)

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class And < Arel::Nodes::Node
attr_reader :children

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Ascending < Ordering
def reverse

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Binary < Arel::Nodes::NodeExpression
attr_accessor :left, :right

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class BindParam < Node
attr_accessor :value

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Case < Arel::Nodes::Node
attr_accessor :case, :conditions, :default

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Casted < Arel::Nodes::NodeExpression # :nodoc:
attr_reader :val, :attribute

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Count < Arel::Nodes::Function
include Math

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class DeleteStatement < Arel::Nodes::Node
attr_accessor :left, :right

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Descending < Ordering
def reverse

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Equality < Arel::Nodes::Binary
def operator; :== end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Extract < Arel::Nodes::Unary
attr_accessor :field

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class False < Arel::Nodes::NodeExpression
def hash

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class FullOuterJoin < Arel::Nodes::Join
end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Function < Arel::Nodes::NodeExpression
include Arel::WindowPredications

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Grouping < Unary
end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class In < Equality
end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class InfixOperation < Binary
include Arel::Expressions

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class InnerJoin < Arel::Nodes::Join
end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class InsertStatement < Arel::Nodes::Node
attr_accessor :relation, :columns, :values, :select

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
###
# Class that represents a join source

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Matches < Binary
attr_reader :escape

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class NamedFunction < Arel::Nodes::Function
attr_accessor :name

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
###
# Abstract base class for all AST nodes

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class NodeExpression < Arel::Nodes::Node
include Arel::Expressions

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class OuterJoin < Arel::Nodes::Join
end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Over < Binary
include Arel::AliasPredication

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Regexp < Binary
attr_accessor :case_sensitive

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class RightOuterJoin < Arel::Nodes::Join
end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class SelectCore < Arel::Nodes::Node
attr_accessor :top, :projections, :wheres, :groups, :windows

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class SelectStatement < Arel::Nodes::NodeExpression
attr_reader :cores

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class SqlLiteral < String
include Arel::Expressions

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class StringJoin < Arel::Nodes::Join
def initialize(left, right = nil)

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class TableAlias < Arel::Nodes::Binary
alias :name :right

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Distinct < Arel::Nodes::NodeExpression
def hash

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class True < Arel::Nodes::NodeExpression
def hash

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Unary < Arel::Nodes::NodeExpression
attr_accessor :expr

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class UnaryOperation < Unary
attr_reader :operator

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class UnqualifiedColumn < Arel::Nodes::Unary
alias :attribute :expr

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class UpdateStatement < Arel::Nodes::Node
attr_accessor :relation, :wheres, :values, :orders, :limit

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Values < Arel::Nodes::Binary
alias :expressions :left

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class ValuesList < Node
attr_reader :rows

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class Window < Arel::Nodes::Node
attr_accessor :orders, :framing, :partitions

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Nodes
class With < Arel::Nodes::Unary
alias children expr

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module OrderPredications
def asc
Nodes::Ascending.new self

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Predications
def not_eq(other)
Nodes::NotEqual.new self, quoted_node(other)

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
class SelectManager < Arel::TreeManager
include Arel::Crud

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
class Table
include Arel::Crud
include Arel::FactoryMethods

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
class TreeManager
include Arel::FactoryMethods

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
class UpdateManager < Arel::TreeManager
def initialize
super

View file

@ -14,7 +14,7 @@ require "arel/visitors/dot"
require "arel/visitors/ibm_db"
require "arel/visitors/informix"
module Arel
module Arel # :nodoc: all
module Visitors
end
end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class DepthFirst < Arel::Visitors::Visitor
def initialize(block = nil)

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class Dot < Arel::Visitors::Visitor
class Node # :nodoc:

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class IBM_DB < Arel::Visitors::ToSql
private

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class Informix < Arel::Visitors::ToSql
private

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class MSSQL < Arel::Visitors::ToSql
RowNumber = Struct.new :children

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class MySQL < Arel::Visitors::ToSql
private

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class Oracle < Arel::Visitors::ToSql
private

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class Oracle12 < Arel::Visitors::ToSql
private

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class PostgreSQL < Arel::Visitors::ToSql
CUBE = "CUBE"

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class SQLite < Arel::Visitors::ToSql
private

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class UnsupportedVisitError < StandardError
def initialize(object)

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class Visitor
def initialize

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module Visitors
class WhereSql < Arel::Visitors::ToSql
def initialize(inner_visitor, *args, &block)

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
module Arel
module Arel # :nodoc: all
module WindowPredications
def over(expr = nil)
Nodes::Over.new(self, expr)