Module: Ronin::SQL::Literals
- Included in:
- Clause, Injection, InjectionExpr, Statement
- Defined in:
- lib/ronin/sql/literals.rb
Overview
Methods for creating SQL Literal.
Instance Method Summary collapse
-
#float(value) ⇒ Literal<Float>
Creates an Float literal.
-
#int(value) ⇒ Literal<Integer>
Creates an Integer literal.
-
#null ⇒ Literal
Creates a
NULL
literal. -
#string(value) ⇒ Literal<String>
Creates an String literal.
Instance Method Details
#float(value) ⇒ Literal<Float>
Creates an Float literal.
59 60 61 |
# File 'lib/ronin/sql/literals.rb', line 59 def float(value) Literal.new(value.to_f) end |
#int(value) ⇒ Literal<Integer>
Creates an Integer literal.
49 50 51 |
# File 'lib/ronin/sql/literals.rb', line 49 def int(value) Literal.new(value.to_i) end |