Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrExists appears exists a record. ErrExists = errors.New("sql: a record exists") // AscOrder defines ORDER BY query as ascending AscOrder = qm.OrderBy("id ASC") // DescOrder defines ORDER BY query as descending DescOrder = qm.OrderBy("id DESC") // ProductPublic defines WHERE query ProductPublic = qm.Where("product_status_id = ?", 1) // ProductPrivate defines WHERE query ProductPrivate = qm.Where("product_status_id = ?", 2) )
Functions ¶
Types ¶
type DTBProducts ¶
type DTBProducts interface { // Find ... Find(context.Context, uint) (*model.DTBProduct, error) FindBy(context.Context, []qm.QueryMod, ...string) (*model.DTBProduct, error) FindPreload(context.Context, uint, ...string) (*model.DTBProduct, error) // List ... ListBy(ctx context.Context, where []qm.QueryMod, loads ...string) (model.DTBProductSlice, error) ListPublic(ctx context.Context, loads ...string) (model.DTBProductSlice, error) ListPrivate(ctx context.Context, loads ...string) (model.DTBProductSlice, error) // All returns sort ordered records All(context.Context) (model.DTBProductSlice, error) AllPreload(context.Context, ...string) (model.DTBProductSlice, error) Exists(context.Context, uint) (bool, error) }
DTBProducts manifests api interface
Click to show internal directories.
Click to hide internal directories.