update to crystal-db ~> 0.3.1

This commit is contained in:
Brian J. Cardiff 2016-12-15 14:49:39 -03:00
parent c7e3e2dc3d
commit bda4b8e184
2 changed files with 3 additions and 1 deletions

View file

@ -4,7 +4,7 @@ version: 0.8.0
dependencies:
db:
github: crystal-lang/crystal-db
version: ~> 0.3.0
version: ~> 0.3.1
authors:
- Ary Borenszweig <aborenszweig@manas.com.ar>

View file

@ -4,6 +4,8 @@ class SQLite3::Connection < DB::Connection
filename = self.class.filename(database.uri)
# TODO maybe enable Flag::URI to parse query string in the uri as additional flags
check LibSQLite3.open_v2(filename, out @db, (Flag::READWRITE | Flag::CREATE), nil)
rescue
raise DB::ConnectionRefused.new
end
def self.filename(uri : URI)