mirror of
https://github.com/nkanaev/yarr.git
synced 2026-06-24 17:15:17 +00:00
move structs to model
This commit is contained in:
@@ -21,15 +21,6 @@ type SQLiteStorage struct {
|
||||
db *sql.DB
|
||||
}
|
||||
|
||||
type Nullable[T any] struct {
|
||||
Set bool
|
||||
Value *T
|
||||
}
|
||||
|
||||
func SetNullable[T any](v *T) Nullable[T] {
|
||||
return Nullable[T]{Set: true, Value: v}
|
||||
}
|
||||
|
||||
func New(path string) (*SQLiteStorage, error) {
|
||||
if pos := strings.IndexRune(path, '?'); pos == -1 {
|
||||
params := "_journal=WAL&_sync=NORMAL&_busy_timeout=5000&cache=shared"
|
||||
|
||||
Reference in New Issue
Block a user