memos/store/sqlite3/driver.go
Athurg Gooth 41eba71f0f
chore: split sql to driver (#2279)
* Add new database interface for SQL operations

* Move SQL code of Activity into Database

* Rename `Database` into `Driver`

* Move SQL code of SystemSetting into Driver

* Fix store.New in text code

* Change database into driver in the variables

* Change sqlite3.New into sqlite3.NewDriver
2023-09-26 17:16:58 +08:00

15 lines
185 B
Go

package sqlite3
import (
"database/sql"
"github.com/usememos/memos/store"
)
type Driver struct {
db *sql.DB
}
func NewDriver(db *sql.DB) store.Driver {
return &Driver{db: db}
}