Release connection when unprepared statements can't be built

Add specs
Fix typo in docs
This commit is contained in:
Brian J. Cardiff 2017-09-07 19:21:36 -03:00
parent 4fe3884898
commit 9b03aa6535
4 changed files with 31 additions and 2 deletions

View file

@ -99,6 +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"
end
protected def perform_query(args : Enumerable)