2021-11-23 09:45:38 +00:00
|
|
|
package storage
|
|
|
|
|
|
|
|
import (
|
|
|
|
_ "github.com/mattn/go-sqlite3" // Load the SQLite Driver used in the connection string.
|
|
|
|
)
|
|
|
|
|
|
|
|
// SQLiteProvider is a SQLite3 provider.
|
|
|
|
type SQLiteProvider struct {
|
|
|
|
SQLProvider
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewSQLiteProvider constructs a SQLite provider.
|
2021-11-25 01:56:58 +00:00
|
|
|
func NewSQLiteProvider(path, encryptionKey string) (provider *SQLiteProvider) {
|
2021-11-23 09:45:38 +00:00
|
|
|
provider = &SQLiteProvider{
|
2021-11-25 01:56:58 +00:00
|
|
|
SQLProvider: NewSQLProvider(providerSQLite, "sqlite3", path, encryptionKey),
|
2021-11-23 09:45:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// All providers have differing SELECT existing table statements.
|
|
|
|
provider.sqlSelectExistingTables = querySQLiteSelectExistingTables
|
|
|
|
|
|
|
|
return provider
|
|
|
|
}
|