go-sqlite3/driver/connector.go

35 lines
708 B
Go
Raw Normal View History

2018-06-15 18:53:32 +03:00
// Copyright (C) 2018 The Go-SQLite3 Authors.
//
// Use of this source code is governed by an MIT-style
// license that can be found in the LICENSE file.
2018-06-19 18:53:53 +03:00
// +build cgo
2018-06-15 18:53:32 +03:00
// +build go1.10
package sqlite3
import (
"context"
"database/sql/driver"
)
2018-06-19 18:53:53 +03:00
var (
_ driver.Connector = (*Connector)(nil)
)
2018-06-15 18:53:32 +03:00
// Connector is a driver in a fixed configuration.
type Connector struct {
}
// Connect implements driver.Connector interface.
// Connect returns a connection to the database.
func (c Connector) Connect(ctx context.Context) (driver.Conn, error) {
return nil, nil
}
// Driver implements driver.Connector interface.
// Driver returns &MySQLDriver{}.
func (c Connector) Driver() driver.Driver {
return nil
}