fix(db): open sqlite with correct driver

This commit is contained in:
hexxa 2023-03-05 10:17:55 +08:00 committed by Hexxa
parent b0c8aa284e
commit 3b320cd7d3

View file

@ -3,7 +3,6 @@ package sqlite
import (
"context"
"database/sql"
"fmt"
"sync"
"github.com/ihexxa/quickshare/src/db"
@ -17,7 +16,7 @@ type SQLite struct {
}
func NewSQLite(dbPath string) (*SQLite, error) {
db, err := sql.Open("sqlite3", fmt.Sprintf("%s?_sync=FULL&_vacuum=incremental", dbPath))
db, err := sql.Open("sqlite", dbPath)
if err != nil {
return nil, err
}