many changes
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user