Skip to content

Commit db73ee7

Browse files
author
Vijay Ramesh
committed
type_hints should be a Cassandra::Type rather than a symbol that we convert
1 parent 773951f commit db73ee7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cassandra/statements/simple.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def initialize(cql, params = nil, type_hints = nil)
7575

7676
@cql = cql
7777
@params = params
78-
@params_types = params.each_with_index.map {|value, index| (!type_hints.empty? && type_hints[index]) ? Types::Simple.new(type_hints[index]) : Util.guess_type(value)}
78+
@params_types = params.each_with_index.map {|value, index| (!type_hints.empty? && type_hints[index] && type_hints[index].is_a?(Type)) ? type_hints[index] : Util.guess_type(value)}
7979
@params_names = params_names
8080
end
8181

0 commit comments

Comments
 (0)