mirror of https://github.com/mattn/go-sqlite3.git
add flag SQLITE_OPEN_URI to open. closes #38
This commit is contained in:
parent
b8adf7d8c1
commit
ae4b60773a
|
@ -111,7 +111,8 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
|
||||||
rv := C.sqlite3_open_v2(name, &db,
|
rv := C.sqlite3_open_v2(name, &db,
|
||||||
C.SQLITE_OPEN_FULLMUTEX|
|
C.SQLITE_OPEN_FULLMUTEX|
|
||||||
C.SQLITE_OPEN_READWRITE|
|
C.SQLITE_OPEN_READWRITE|
|
||||||
C.SQLITE_OPEN_CREATE,
|
C.SQLITE_OPEN_CREATE |
|
||||||
|
C.SQLITE_OPEN_URI,
|
||||||
nil)
|
nil)
|
||||||
if rv != 0 {
|
if rv != 0 {
|
||||||
return nil, errors.New(C.GoString(C.sqlite3_errmsg(db)))
|
return nil, errors.New(C.GoString(C.sqlite3_errmsg(db)))
|
||||||
|
|
Loading…
Reference in New Issue