diff options
| author | mattn <mattn.jp@gmail.com> | 2013-08-23 13:58:54 +0900 |
|---|---|---|
| committer | mattn <mattn.jp@gmail.com> | 2013-08-23 13:58:54 +0900 |
| commit | e6850435ffb1700c672f08d73ea6ccb7f7b78287 (patch) | |
| tree | 33ee113ffadb120f25db3b8ff235c4bd089e90f2 /example | |
| parent | Add example for sqlite3 extension (diff) | |
| download | golite-e6850435ffb1700c672f08d73ea6ccb7f7b78287.tar.gz golite-e6850435ffb1700c672f08d73ea6ccb7f7b78287.tar.xz | |
Possible to register custom driver
Diffstat (limited to 'example')
| -rw-r--r-- | example/extension/extension.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/example/extension/extension.go b/example/extension/extension.go index 3ec145a..95f2f70 100644 --- a/example/extension/extension.go +++ b/example/extension/extension.go @@ -3,11 +3,13 @@ package main import ( "database/sql" "fmt" - _ "github.com/mattn/go-sqlite3" + "github.com/mattn/go-sqlite3" "log" ) func main() { + sql.Register("sqlite3_with_extensions", &sqlite3.SQLiteDriver{true, nil}) + db, err := sql.Open("sqlite3_with_extensions", ":memory:") if err != nil { log.Fatal(err) |
