Merge pull request #13617 from Microsoft/10662-sql
Windows: Statically linkable SQLite3
This commit is contained in:
commit
9511b53907
3 changed files with 11 additions and 8 deletions
|
@ -1,12 +1,6 @@
|
||||||
// +build cgo
|
|
||||||
|
|
||||||
package graphdb
|
package graphdb
|
||||||
|
|
||||||
import (
|
import "database/sql"
|
||||||
"database/sql"
|
|
||||||
|
|
||||||
_ "code.google.com/p/gosqlite/sqlite3" // registers sqlite
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewSqliteConn opens a connection to a sqlite
|
// NewSqliteConn opens a connection to a sqlite
|
||||||
// database.
|
// database.
|
||||||
|
@ -15,6 +9,5 @@ func NewSqliteConn(root string) (*Database, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return NewDatabase(conn)
|
return NewDatabase(conn)
|
||||||
}
|
}
|
||||||
|
|
5
graphdb/conn_sqlite3_unix.go
Normal file
5
graphdb/conn_sqlite3_unix.go
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
// +build cgo,!windows
|
||||||
|
|
||||||
|
package graphdb
|
||||||
|
|
||||||
|
import _ "code.google.com/p/gosqlite/sqlite3" // registers sqlite
|
5
graphdb/conn_sqlite3_windows.go
Normal file
5
graphdb/conn_sqlite3_windows.go
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
// +build cgo,windows
|
||||||
|
|
||||||
|
package graphdb
|
||||||
|
|
||||||
|
import _ "github.com/mattn/go-sqlite3" // registers sqlite
|
Loading…
Reference in a new issue