module Ronin::SQL::Operators

Methods for creating SQL expressions.

@api public

@see sqlite.org/lang_expr.html

Public Instance Methods

!() click to toggle source

Logical negate.

@return [UnaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 299
def !
  UnaryExpr.new(:!,self)
end
!=(other) click to toggle source

Not equal to.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 179
def !=(other)
  BinaryExpr.new(self,:!=,other)
end
%(other) click to toggle source

Modulus.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 59
def %(other)
  BinaryExpr.new(self,:%,other)
end
&(other) click to toggle source

Bit-wise ‘AND`.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 109
def &(other)
  BinaryExpr.new(self,:&,other)
end
*(other) click to toggle source

Multiplication.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 39
def *(other)
  BinaryExpr.new(self,:*,other)
end
+(other) click to toggle source

Addition.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 69
def +(other)
  BinaryExpr.new(self,:+,other)
end
+@() click to toggle source

Unary plus.

@return [UnaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 279
def +@
  UnaryExpr.new(:+,self)
end
-(other) click to toggle source

Subtraction.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 79
def -(other)
  BinaryExpr.new(self,:-,other)
end
-@() click to toggle source

Unary minus.

@return [UnaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 269
def -@
  UnaryExpr.new(:-,self)
end
/(other) click to toggle source

Division.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 49
def /(other)
  BinaryExpr.new(self,:/,other)
end
<(other) click to toggle source

Less than.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 129
def <(other)
  BinaryExpr.new(self,:<,other)
end
<<(other) click to toggle source

Bit-wise left shift.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 89
def <<(other)
  BinaryExpr.new(self,:<<,other)
end
<=(other) click to toggle source

Less than or equal to.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 139
def <=(other)
  BinaryExpr.new(self,:<=,other)
end
==(other) click to toggle source

Equal to.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 169
def ==(other)
  BinaryExpr.new(self,:"=",other)
end
>(other) click to toggle source

Greater than.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 149
def >(other)
  BinaryExpr.new(self,:>,other)
end
>=(other) click to toggle source

Greater than or equal to.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 159
def >=(other)
  BinaryExpr.new(self,:>=,other)
end
>>(other) click to toggle source

Bit-wise right shift.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 99
def >>(other)
  BinaryExpr.new(self,:>>,other)
end
and(other) click to toggle source

‘AND`.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 319
def and(other)
  BinaryExpr.new(self,:AND,other)
end
as(name) click to toggle source

Alias.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 189
def as(name)
  BinaryExpr.new(self,:AS,name)
end
glob(other) click to toggle source

‘GLOB` comparison.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 229
def glob(other)
  BinaryExpr.new(self,:GLOB,other)
end
in(other) click to toggle source

‘REGEXP` comparison.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 259
def in(other)
  BinaryExpr.new(self,:IN,other)
end
is(other) click to toggle source

‘IS` comparison.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 199
def is(other)
  BinaryExpr.new(self,:IS,other)
end
is_not(other) click to toggle source

‘IS NOT` comparison.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 209
def is_not(other)
  BinaryExpr.new(self,[:IS, :NOT],other)
end
like(other) click to toggle source

‘LIKE` comparison.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 219
def like(other)
  BinaryExpr.new(self,:LIKE,other)
end
match(other) click to toggle source

‘MATCH` comparison.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 239
def match(other)
  BinaryExpr.new(self,:MATCH,other)
end
not() click to toggle source

Logical ‘NOT`.

@return [UnaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 309
def not
  UnaryExpr.new(:NOT,self)
end
or(other) click to toggle source

‘OR`.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 329
def or(other)
  BinaryExpr.new(self,:OR,other)
end
regexp(other) click to toggle source

‘REGEXP` comparison.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 249
def regexp(other)
  BinaryExpr.new(self,:REGEXP,other)
end
|(other) click to toggle source

Bit-wise ‘OR`.

@return [BinaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 119
def |(other)
  BinaryExpr.new(self,:|,other)
end
~() click to toggle source

Bit-wise negate.

@return [UnaryExpr]

The new binary expression.
# File lib/ronin/sql/operators.rb, line 289
def ~
  UnaryExpr.new(:~,self)
end