update to crystal-db ~> 0.3.1
This commit is contained in:
parent
c7e3e2dc3d
commit
bda4b8e184
|
@ -4,7 +4,7 @@ version: 0.8.0
|
||||||
dependencies:
|
dependencies:
|
||||||
db:
|
db:
|
||||||
github: crystal-lang/crystal-db
|
github: crystal-lang/crystal-db
|
||||||
version: ~> 0.3.0
|
version: ~> 0.3.1
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Ary Borenszweig <aborenszweig@manas.com.ar>
|
- Ary Borenszweig <aborenszweig@manas.com.ar>
|
||||||
|
|
|
@ -4,6 +4,8 @@ class SQLite3::Connection < DB::Connection
|
||||||
filename = self.class.filename(database.uri)
|
filename = self.class.filename(database.uri)
|
||||||
# TODO maybe enable Flag::URI to parse query string in the uri as additional flags
|
# 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)
|
check LibSQLite3.open_v2(filename, out @db, (Flag::READWRITE | Flag::CREATE), nil)
|
||||||
|
rescue
|
||||||
|
raise DB::ConnectionRefused.new
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.filename(uri : URI)
|
def self.filename(uri : URI)
|
||||||
|
|
Loading…
Reference in New Issue