You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# See also #execute2, #query, and #execute_batch for additional ways of
196
196
# executing statements.
197
197
defexecutesql,bind_vars=[], *args, &block
198
-
ifbind_vars.nil? || !args.empty?
199
-
bind_vars=ifargs.empty?
200
-
[]
201
-
else
202
-
[bind_vars] + args
203
-
end
204
-
205
-
warn(<<~EOWARN)if $VERBOSE
206
-
#{caller(1..1).first} is calling `SQLite3::Database#execute` with nil or multiple bind params without using an array. Please switch to passing bind parameters as an array. Support for bind parameters as *args will be removed in 2.0.0.
#{caller(1..1).first} is calling `SQLite3::Database#execute_batch` with bind parameters that are not a list of a hash. Please switch to passing bind parameters as an array or hash. Support for this behavior will be removed in version 2.0.0.
265
-
EOWARN
266
-
end
267
-
268
-
# FIXME: remove this stuff later
269
-
ifbind_vars.nil? || !args.empty?
270
-
bind_vars=ifargs.empty?
271
-
[]
272
-
else
273
-
[nil] + args
274
-
end
275
-
276
-
warn(<<~EOWARN)if $VERBOSE
277
-
#{caller(1..1).first} is calling `SQLite3::Database#execute_batch` with nil or multiple bind params without using an array. Please switch to passing bind parameters as an array. Support for this behavior will be removed in version 2.0.0.
# with a block, +close+ will be invoked implicitly when the block
333
300
# terminates.
334
301
defquery(sql,bind_vars=[], *args)
335
-
ifbind_vars.nil? || !args.empty?
336
-
bind_vars=ifargs.empty?
337
-
[]
338
-
else
339
-
[bind_vars] + args
340
-
end
341
-
342
-
warn(<<~EOWARN)if $VERBOSE
343
-
#{caller(1..1).first} is calling `SQLite3::Database#query` with nil or multiple bind params without using an array. Please switch to passing bind parameters as an array. Support for this will be removed in version 2.0.0.
0 commit comments