refactoring, fixes and laniakea v0.8
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
package psql
|
||||
|
||||
import (
|
||||
"git.nix13.pw/scuroneko/laniakea"
|
||||
"ymgb/database"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
"github.com/vinovest/sqlx"
|
||||
)
|
||||
@@ -37,10 +38,10 @@ type ShopRepository struct {
|
||||
db *sqlx.DB
|
||||
}
|
||||
|
||||
func NewShopRepository(db *laniakea.DatabaseContext) ShopRepository {
|
||||
return newShopRepository(db.PostgresSQL)
|
||||
}
|
||||
func newShopRepository(db *sqlx.DB) ShopRepository { return ShopRepository{db} }
|
||||
func NewShopRepository(db *database.Context) ShopRepository {
|
||||
return newShopRepository(db.Postgres)
|
||||
}
|
||||
|
||||
func (rep ShopRepository) GetAllAuto() ([]ShopAuto, error) {
|
||||
auto := make([]ShopAuto, 0)
|
||||
|
||||
Reference in New Issue
Block a user