Class: Sequel::SQL::PlaceholderLiteralString
- Inherits:
-
Expression
- Object
- Expression
- Sequel::SQL::PlaceholderLiteralString
- Defined in:
- lib/sequel/sql.rb
Overview
Represents a literal string with placeholders and arguments. This is necessary to ensure delayed literalization of the arguments required for the prepared statement support
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
The arguments that will be subsituted into the placeholders.
-
#parens ⇒ Object
readonly
Whether to surround the expression with parantheses.
-
#str ⇒ Object
readonly
The literal string containing placeholders.
Instance Method Summary collapse
-
#initialize(str, args, parens = false) ⇒ PlaceholderLiteralString
constructor
Create an object with the given string, placeholder arguments, and parens flag.
Methods inherited from Expression
Constructor Details
#initialize(str, args, parens = false) ⇒ PlaceholderLiteralString
Create an object with the given string, placeholder arguments, and parens flag.
641 642 643 644 645 |
# File 'lib/sequel/sql.rb', line 641 def initialize(str, args, parens=false) @str = str @args = args @parens = parens end |
Instance Attribute Details
#args ⇒ Object (readonly)
The arguments that will be subsituted into the placeholders.
632 633 634 |
# File 'lib/sequel/sql.rb', line 632 def args @args end |
#parens ⇒ Object (readonly)
Whether to surround the expression with parantheses
638 639 640 |
# File 'lib/sequel/sql.rb', line 638 def parens @parens end |
#str ⇒ Object (readonly)
The literal string containing placeholders
635 636 637 |
# File 'lib/sequel/sql.rb', line 635 def str @str end |