Class: ActiveRecord::ConnectionAdapters::SQLite3Column
Instance Attribute Summary
Attributes inherited from JdbcColumn
#limit, #precision
Class Method Summary
collapse
Instance Method Summary
collapse
#init_column, #type_cast
Methods inherited from JdbcColumn
column_types, #default_value, driver_constants, #init_column
Constructor Details
#initialize(name, *args) ⇒ SQLite3Column
Returns a new instance of SQLite3Column.
330
331
332
333
334
335
336
|
# File 'lib/arjdbc/sqlite3/adapter.rb', line 330
def initialize(name, *args)
if Hash === name
super
else
super(nil, name, *args)
end
end
|
Class Method Details
.binary_to_string(value) ⇒ Object
345
346
347
348
349
350
351
352
353
354
355
|
# File 'lib/arjdbc/sqlite3/adapter.rb', line 345
def self.binary_to_string(value)
if value.respond_to?(:force_encoding) && value.encoding != Encoding::ASCII_8BIT
value = value.force_encoding(Encoding::ASCII_8BIT)
end
if value[0..3] == "\000b64"
value[4..-1].unpack('m*').first
else
value
end
end
|
.string_to_binary(value) ⇒ Object
341
342
343
|
# File 'lib/arjdbc/sqlite3/adapter.rb', line 341
def self.string_to_binary(value)
"\000b64" + [value].pack('m*').split("\n").join('')
end
|
Instance Method Details
#call_discovered_column_callbacks ⇒ Object
338
339
|
# File 'lib/arjdbc/sqlite3/adapter.rb', line 338
def call_discovered_column_callbacks(*)
end
|