feat(db): enable sqlite for storing users
This commit is contained in:
parent
f95a611204
commit
59a39efc4a
10 changed files with 791 additions and 59 deletions
|
@ -2,6 +2,7 @@ package sqlite
|
|||
|
||||
import (
|
||||
"database/sql"
|
||||
"fmt"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
|
||||
"github.com/ihexxa/quickshare/src/db/rdb"
|
||||
|
@ -13,7 +14,7 @@ type SQLite struct {
|
|||
}
|
||||
|
||||
func NewSQLite(dbPath string) (*SQLite, error) {
|
||||
db, err := sql.Open("sqlite3", dbPath)
|
||||
db, err := sql.Open("sqlite3", fmt.Sprintf("%s?_synchronous=FULL", dbPath))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue