Class: DBI::Binary
- Inherits:
-
Object
- Object
- DBI::Binary
- Defined in:
- lib/dbi/binary.rb
Overview
Encapsulates the concept of a CLOB/BLOB, which can then be passed as a bind via BaseStatement#bind_param.
This is similar to a DBI::Type class and will eventually find its way there.
See #new for usage.
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(data) ⇒ Binary
constructor
Construct a new DBI::Binary object with the data supplied as string.
-
#to_s ⇒ Object
Return the string representation of the DBI::Binary object.
Constructor Details
#initialize(data) ⇒ Binary
Construct a new DBI::Binary object with the data supplied as string. This object can then be used in bound variables to represent a CLOB or BLOB type.
16 17 18 |
# File 'lib/dbi/binary.rb', line 16 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
11 12 13 |
# File 'lib/dbi/binary.rb', line 11 def data @data end |
Instance Method Details
#to_s ⇒ Object
Return the string representation of the DBI::Binary object.
21 22 23 |
# File 'lib/dbi/binary.rb', line 21 def to_s @data end |