mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
#5 Make sure queries (insert and query) work with any type
This commit is contained in:
parent
c5d7778a0d
commit
11e24e1c65
2 changed files with 42 additions and 2 deletions
|
@ -55,10 +55,18 @@ class DummyDriver < DB::Driver
|
|||
private def set_params(args)
|
||||
@params.clear
|
||||
args.each_with_index do |arg, index|
|
||||
@params[index] = arg.as(DB::Any)
|
||||
set_param(index, arg)
|
||||
end
|
||||
end
|
||||
|
||||
private def set_param(index, value : DB::Any)
|
||||
@params[index] = value
|
||||
end
|
||||
|
||||
private def set_param(index, value)
|
||||
raise "not implemented for #{value.class}"
|
||||
end
|
||||
|
||||
protected def do_close
|
||||
super
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue