Possible to register custom driver

This commit is contained in:
mattn
2013-08-23 13:58:54 +09:00
parent e6690f40af
commit e6850435ff
2 changed files with 14 additions and 6 deletions

View File

@@ -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)