mirror of
https://gitea.invidious.io/iv-org/shard-crystal-db.git
synced 2024-08-15 00:53:32 +00:00
Updates for crystal 0.24.0
This commit is contained in:
parent
790b587e3f
commit
ac083f430a
6 changed files with 16 additions and 10 deletions
|
@ -99,7 +99,7 @@ class DummyDriver < DB::Driver
|
|||
def initialize(connection, @query : String, @prepared : Bool)
|
||||
@params = Hash(Int32 | String, DB::Any).new
|
||||
super(connection)
|
||||
raise query if query == "syntax error"
|
||||
raise DB::Error.new(query) if query == "syntax error"
|
||||
end
|
||||
|
||||
protected def perform_query(args : Enumerable)
|
||||
|
@ -111,7 +111,7 @@ class DummyDriver < DB::Driver
|
|||
protected def perform_exec(args : Enumerable)
|
||||
@connection.as(DummyConnection).check
|
||||
set_params args
|
||||
raise "forced exception due to query" if @query == "raise"
|
||||
raise DB::Error.new("forced exception due to query") if @query == "raise"
|
||||
DB::ExecResult.new 0i64, 0_i64
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue