mirror of
https://github.com/usememos/memos.git
synced 2025-01-17 18:11:48 +08:00
41eba71f0f
* 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
15 lines
185 B
Go
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}
|
|
}
|