Documentation
¶
Overview ¶
generated by forge -type=ExampleType; DO NOT EDIT
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExampleTypeInvalid = errors.New("ExampleType is invalid")
Functions ¶
func CreateCustomDocumentQ ¶
func CreateCustomDocumentQ() (*customDocumentQ, error)
Types ¶
type BuzzFeed ¶
type BuzzFeed struct {
ID int64 `db:"id" json:"id"`
Name string `db:"name" json:"name"`
BuzzType ExampleType `db:"buzz_type" json:"buzzType"`
Description string `db:"description" json:"description"`
Details Feed `db:"details" json:"details"`
CreatedAt int64 `db:"created_at" json:"createdAt"`
UpdatedAt int64 `db:"updated_at" json:"updatedAt"`
}
type BuzzFeedQI ¶
type BuzzFeedQI interface {
// Insert adds new `BuzzFeed` record to `buzzFeeds` table.
Insert(buzzFeed *BuzzFeed) error
// Update updates row with passed `uid`.
Update(id int64, buzzFeed *BuzzFeed) error
// UpdateBuzzDescription sets new value of
// `description` column for row with passed `uid`.
UpdateBuzzDescription(id int64, description string) error
// DeleteByID deletes row with passed `id`.
DeleteByID(id int64) error
// WithID adds filter by `ID` column.
WithID(ID int64) BuzzFeedQI
// WithName adds filter by `Name` column.
WithName(Name string) BuzzFeedQI
// WithBuzzType adds filter by `BuzzType` column.
WithBuzzType(BuzzType ExampleType) BuzzFeedQI
// WithDescription adds filter by `Description` column.
WithDescription(Description string) BuzzFeedQI
// WithDetails adds filter by `Details` column.
WithDetails(Details Feed) BuzzFeedQI
// WithCreatedAt adds filter by `CreatedAt` column.
WithCreatedAt(CreatedAt int64) BuzzFeedQI
// WithUpdatedAt adds filter by `UpdatedAt` column.
WithUpdatedAt(UpdatedAt int64) BuzzFeedQI
// Get returns first row of the result of query execution.
Get() (*BuzzFeed, error)
// Select returns all records of the result of query execution.
Select() ([]BuzzFeed, error)
// GetByID returns one row with passed `id`.
GetByID(id int64) (*BuzzFeed, error)
// Until sets lower time bound.
Since(timestamp int64) BuzzFeedQI
// Until sets upper time bound.
Until(timestamp int64) BuzzFeedQI
// SetPage applies pagination parameters.
SetPage(pq *db.PageQuery) BuzzFeedQI
}
type CustomDocument ¶
type ExampleType ¶
type ExampleType int
func (ExampleType) MarshalJSON ¶
func (r ExampleType) MarshalJSON() ([]byte, error)
MarshalJSON is generated so ExampleType satisfies json.Marshaler.
func (*ExampleType) Scan ¶
func (r *ExampleType) Scan(src interface{}) error
Value is generated so ExampleType satisfies db row driver.Scanner.
func (ExampleType) String ¶
func (r ExampleType) String() string
String is generated so ExampleType satisfies fmt.Stringer.
func (*ExampleType) UnmarshalJSON ¶
func (r *ExampleType) UnmarshalJSON(data []byte) error
UnmarshalJSON is generated so ExampleType satisfies json.Unmarshaler.
func (ExampleType) Validate ¶
func (r ExampleType) Validate() error
Validate verifies that value is predefined for ExampleType.
type Q ¶
Q implementation of the `QI` interface.
func (*Q) BuzzFeed ¶
func (q *Q) BuzzFeed() BuzzFeedQI
type QI ¶
type QI interface {
db.Transactional
BuzzFeed() BuzzFeedQI
}
QI is a top level interface for interaction with database.
Click to show internal directories.
Click to hide internal directories.