| Class | SQLite3::Value |
| In: |
lib/sqlite3/value.rb
|
| Parent: | Object |
| handle | [R] |
# File lib/sqlite3/value.rb, line 40
40: def initialize( db, handle )
41: @driver = db.driver
42: @handle = handle
43: end
# File lib/sqlite3/value.rb, line 53
53: def length( utf16=false )
54: if utf16
55: @driver.value_bytes16( @handle )
56: else
57: @driver.value_bytes( @handle )
58: end
59: end
# File lib/sqlite3/value.rb, line 73
73: def to_s( utf16=false )
74: @driver.value_text( @handle, utf16 )
75: end
# File lib/sqlite3/value.rb, line 77
77: def type
78: case @driver.value_type( @handle )
79: when Constants::ColumnType::INTEGER then :int
80: when Constants::ColumnType::FLOAT then :float
81: when Constants::ColumnType::TEXT then :text
82: when Constants::ColumnType::BLOB then :blob
83: when Constants::ColumnType::NULL then :null
84: end
85: end