Module: Ronin::Code::SQL::Literals
- Included in:
- Clause, Injection, InjectionExpr, Statement
- Defined in:
- lib/ronin/code/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.
64 65 66 |
# File 'lib/ronin/code/sql/literals.rb', line 64 def float(value) Literal.new(value.to_f) end |
#int(value) ⇒ Literal<Integer>
Creates an Integer literal.
51 52 53 |
# File 'lib/ronin/code/sql/literals.rb', line 51 def int(value) Literal.new(value.to_i) end |