mirror of
https://github.com/miniflux/v2.git
synced 2025-09-30 19:22:11 +00:00
feat: multi db support
This commit is contained in:
parent
10b2b36895
commit
fe6c000897
25 changed files with 2612 additions and 1433 deletions
|
@ -7,16 +7,19 @@ import (
|
|||
"context"
|
||||
"database/sql"
|
||||
"time"
|
||||
|
||||
"miniflux.app/v2/internal/database"
|
||||
)
|
||||
|
||||
// Storage handles all operations related to the database.
|
||||
type Storage struct {
|
||||
db *sql.DB
|
||||
kind database.DBKind
|
||||
db *sql.DB
|
||||
}
|
||||
|
||||
// NewStorage returns a new Storage.
|
||||
func NewStorage(db *sql.DB) *Storage {
|
||||
return &Storage{db}
|
||||
func NewStorage(kind database.DBKind, db *sql.DB) *Storage {
|
||||
return &Storage{kind, db}
|
||||
}
|
||||
|
||||
// DatabaseVersion returns the version of the database which is in use.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue