move structs to model

This commit is contained in:
nkanaev
2026-06-09 16:04:13 +01:00
parent dc836ed4fd
commit dee386b586
8 changed files with 210 additions and 207 deletions

View File

@@ -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"