refactoring, fixes and laniakea v0.8
This commit is contained in:
@@ -2,8 +2,8 @@ package psql
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"ymgb/database"
|
||||
|
||||
"git.nix13.pw/scuroneko/laniakea"
|
||||
"github.com/shopspring/decimal"
|
||||
"github.com/vinovest/sqlx"
|
||||
)
|
||||
@@ -26,8 +26,9 @@ type WaifuRepository struct {
|
||||
db *sqlx.DB
|
||||
}
|
||||
|
||||
func NewWaifuRepository(db *laniakea.DatabaseContext) *WaifuRepository {
|
||||
return &WaifuRepository{db: db.PostgresSQL}
|
||||
func newWaifuRepository(db *sqlx.DB) *WaifuRepository { return &WaifuRepository{db} }
|
||||
func NewWaifuRepository(db *database.Context) *WaifuRepository {
|
||||
return newWaifuRepository(db.Postgres)
|
||||
}
|
||||
|
||||
func (rep *WaifuRepository) GetAll() ([]*Waifu, error) {
|
||||
|
||||
Reference in New Issue
Block a user