Skip to content

Commit 1770e3c

Browse files
author
Erik Bryn
committed
Add binary timestamp datatype handling.
1 parent 2a08923 commit 1770e3c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,8 @@ def binary_to_string(value)
8787
def type_cast(value)
8888
if value && type == :string && is_utf8?
8989
self.class.string_to_utf8_encoding(value)
90+
elsif value && type == :timestamp
91+
"0x#{value}"
9092
else
9193
super
9294
end

0 commit comments

Comments
 (0)