Skip to content

Commit

Permalink
Fix the adapter to run through our seed file.
Browse files Browse the repository at this point in the history
Binary and decimal binds need to be handled specially.
  • Loading branch information
Chris Couzens committed Feb 29, 2012
1 parent c273c12 commit e650b8f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/active_record/connection_adapters/sqlanywhere_adapter.rb
Expand Up @@ -583,6 +583,10 @@ def exec_query(sql, name = 'SQL', binds = [])
bind_param.set_direction(1) # https://github.com/sqlanywhere/sqlanywhere/blob/master/ext/sacapi.h#L175
if bind_type == :datetime
bind_param.set_value(bind_value.to_datetime.to_s :db)
elsif bind_type == :boolean
bind_param.set_value(bind_value ? 1 : 0)
elsif bind_type == :decimal
bind_param.set_value(bind_value.to_s)
else
bind_param.set_value(bind_value)
end
Expand Down

0 comments on commit e650b8f

Please sign in to comment.