mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
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
This commit is contained in:
10
store/driver.go
Normal file
10
store/driver.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package store
|
||||
|
||||
import "context"
|
||||
|
||||
type Driver interface {
|
||||
CreateActivity(ctx context.Context, create *Activity) (*Activity, error)
|
||||
|
||||
UpsertSystemSetting(ctx context.Context, upsert *SystemSetting) (*SystemSetting, error)
|
||||
ListSystemSettings(ctx context.Context, find *FindSystemSetting) ([]*SystemSetting, error)
|
||||
}
|
Reference in New Issue
Block a user