many changes

This commit is contained in:
2026-02-04 13:38:36 +03:00
parent 2db7d2a813
commit 62d91dfe07
9 changed files with 43 additions and 94 deletions

View File

@@ -3,6 +3,7 @@ package psql
import (
"database/sql"
"git.nix13.pw/scuroneko/extypes"
"git.nix13.pw/scuroneko/laniakea"
"github.com/shopspring/decimal"
"github.com/vinovest/sqlx"
@@ -30,7 +31,7 @@ func NewWaifuRepository(db *laniakea.DatabaseContext) *WaifuRepository {
return &WaifuRepository{db: db.PostgresSQL}
}
func (rep *WaifuRepository) GetAll() ([]*Waifu, error) {
func (rep *WaifuRepository) GetAll() (extypes.Slice[*Waifu], error) {
waifus, err := sqlx.List[*Waifu](rep.db, "SELECT waifus.* FROM waifus;")
if err != nil {
return nil, err