lib/motion-sqlite3/statement.rb in motion-sqlite3-0.4.0 vs lib/motion-sqlite3/statement.rb in motion-sqlite3-0.4.1
- old
+ new
@@ -36,9 +36,12 @@
case params
when Hash
params.each { |name, value| bind_parameter(name, value) }
when Array
params.each_with_index { |value, i| bind_parameter(i+1, value) }
+ when NilClass
+ else
+ raise ArgumentError, "params must be either a Hash or an Array"
end
end
def bind_parameter(name, value)
index = column_index(name)