Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringifyOrders ¶
StringifyOrders travers sort orders into a slice of strings in the following of "prop1 ASC, prop2 DESC".
Types ¶
type Direction ¶
type Direction string
Direction can be ASC, DESC, ASC_NULLS_FIRST, DESC_NULLS_FIRST, ASC_NULLS_LAST or DESC_NULLS_LAST.
type Entity ¶
type Entity struct { ID uuid.UUID `bun:",pk,autoincrement"` CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"` UpdatedAt time.Time `bun:"updated_at,notnull,default:current_timestamp"` }
Entity represents base for every persistent entity like User.
type OrderOption ¶
type OrderOption func(*Order)
OrderOption function is used for creating new Order object.
func WithDirection ¶
func WithDirection(d Direction) OrderOption
func WithProperty ¶
func WithProperty(p string) OrderOption
Click to show internal directories.
Click to hide internal directories.