Class: Expr

Inherits:
Object
  • Object
show all
Defined in:
lib/lilit_sql.rb

Direct Known Subclasses

BinaryOperation, Column, Literal, UnaryOperation

Instance Method Summary collapse

Instance Method Details

#*(other) ⇒ Object



36
37
38
# File 'lib/lilit_sql.rb', line 36

def *(other)
  BinaryOperation.new(self, :*, other)
end

#+(other) ⇒ Object



40
41
42
# File 'lib/lilit_sql.rb', line 40

def +(other)
  BinaryOperation.new(self, :+, other)
end

#<(other) ⇒ Object



56
57
58
# File 'lib/lilit_sql.rb', line 56

def <(other)
  BinaryOperation.new(self, :<, other)
end

#<=(other) ⇒ Object



48
49
50
# File 'lib/lilit_sql.rb', line 48

def <=(other)
  BinaryOperation.new(self, :<=, other)
end

#>(other) ⇒ Object



52
53
54
# File 'lib/lilit_sql.rb', line 52

def >(other)
  BinaryOperation.new(self, :'>', other)
end

#>=(other) ⇒ Object



44
45
46
# File 'lib/lilit_sql.rb', line 44

def >=(other)
  BinaryOperation.new(self, :'>=', other)
end

#and(other) ⇒ Object



8
9
10
# File 'lib/lilit_sql.rb', line 8

def and(other)
  BinaryOperation.new(self, :and, other)
end

#ascObject



60
61
62
# File 'lib/lilit_sql.rb', line 60

def asc
  OrderedByExpr.new(self, :asc)
end

#descObject



64
65
66
# File 'lib/lilit_sql.rb', line 64

def desc
  OrderedByExpr.new(self, :desc)
end

#eq(other) ⇒ Object



12
13
14
# File 'lib/lilit_sql.rb', line 12

def eq(other)
  BinaryOperation.new(self, :'=', other)
end

#in(list) ⇒ Object



32
33
34
# File 'lib/lilit_sql.rb', line 32

def in(list)
  BinaryOperation.new(self, :in, list)
end

#minusObject



20
21
22
# File 'lib/lilit_sql.rb', line 20

def minus
  UnaryOperation.new(:-, self)
end

#ne(other) ⇒ Object



28
29
30
# File 'lib/lilit_sql.rb', line 28

def ne(other)
  BinaryOperation.new(self, :'!=', other)
end

#notObject



16
17
18
# File 'lib/lilit_sql.rb', line 16

def not
  UnaryOperation.new(:not, self)
end

#plusObject



24
25
26
# File 'lib/lilit_sql.rb', line 24

def plus
  UnaryOperation.new(:+, self)
end