Class: ActiveRecord::ConnectionAdapters::SQLite3WasmAdapter::JSBinary
- Inherits:
-
ActiveModel::Type::Binary
- Object
- ActiveModel::Type::Binary
- ActiveRecord::ConnectionAdapters::SQLite3WasmAdapter::JSBinary
- Defined in:
- lib/active_record/connection_adapters/sqlite3_wasm_adapter.rb
Overview
This type converts byte arrays represented as strings from JS to binaries in Ruby
Instance Method Summary collapse
Instance Method Details
#deserialize(value) ⇒ Object
165 166 167 168 169 170 171 172 |
# File 'lib/active_record/connection_adapters/sqlite3_wasm_adapter.rb', line 165 def deserialize(value) bvalue = value if value.is_a?(String) bvalue = value.split(",").map(&:to_i).pack("c*") end super(bvalue) end |