Documentation ¶
Overview ¶
Package model contains the types for schema 'amamonitor'.
Package model contains the types for schema 'amamonitor'.
Package model contains the types for schema 'amamonitor'.
Package model contains the types for schema 'amamonitor'.
Index ¶
Constants ¶
const ( // ProviderAmaten is the 'amaten' Provider. ProviderAmaten = Provider(1) // ProviderGiftissue is the 'giftissue' Provider. ProviderGiftissue = Provider(2) )
Variables ¶
var XOLog = func(string, ...interface{}) {}
XOLog provides the log func used by generated queries.
Functions ¶
func ReplaceToTestDBURL ¶
Types ¶
type FetchResult ¶
type FetchResult struct { ID uint `json:"id"` // id CreatedAt time.Time `json:"created_at"` // created_at UpdatedAt time.Time `json:"updated_at"` // updated_at // contains filtered or unexported fields }
FetchResult represents a row from 'fetch_result'.
func FetchResultByID ¶
func FetchResultByID(db XODB, id uint) (*FetchResult, error)
FetchResultByID retrieves a row from 'amamonitor.fetch_result' as a FetchResult.
Generated from index 'fetch_result_id_pkey'.
func (*FetchResult) Delete ¶
func (fr *FetchResult) Delete(db XODB) error
Delete deletes the FetchResult from the database.
func (*FetchResult) Deleted ¶
func (fr *FetchResult) Deleted() bool
Deleted provides information if the FetchResult has been deleted from the database.
func (*FetchResult) Exists ¶
func (fr *FetchResult) Exists() bool
Exists determines if the FetchResult exists in the database.
func (*FetchResult) Insert ¶
func (fr *FetchResult) Insert(db XODB) error
Insert inserts the FetchResult to the database.
func (*FetchResult) Save ¶
func (fr *FetchResult) Save(db XODB) error
Save saves the FetchResult to the database.
func (*FetchResult) Update ¶
func (fr *FetchResult) Update(db XODB) error
Update updates the FetchResult in the database.
type GiftItem ¶
type GiftItem struct { ID uint `json:"id"` // id FetchResultID uint `json:"fetch_result_id"` // fetch_result_id Provider Provider `json:"provider"` // provider SalesPrice uint `json:"sales_price"` // sales_price CataloguePrice uint `json:"catalogue_price"` // catalogue_price DiscountRate float64 `json:"discount_rate"` // discount_rate CreatedAt time.Time `json:"created_at"` // created_at UpdatedAt time.Time `json:"updated_at"` // updated_at // contains filtered or unexported fields }
GiftItem represents a row from 'gift_item'.
func GiftItemByID ¶
GiftItemByID retrieves a row from 'amamonitor.gift_item' as a GiftItem.
Generated from index 'gift_item_id_pkey'.
func GiftItemsByFetchResultID ¶
GiftItemsByFetchResultID retrieves a row from 'amamonitor.gift_item' as a GiftItem.
Generated from index 'fetch_result_id'.
func (*GiftItem) Deleted ¶
Deleted provides information if the GiftItem has been deleted from the database.
type Provider ¶
type Provider uint16
Provider is the 'provider' enum type from schema 'amamonitor'.
func (Provider) MarshalText ¶
MarshalText marshals Provider into text.
func (*Provider) UnmarshalText ¶
UnmarshalText unmarshals Provider from text.
type ScannerValuer ¶
ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings.
func (*StringSlice) Scan ¶
func (ss *StringSlice) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface for StringSlice.
type XODB ¶
type XODB interface { Exec(string, ...interface{}) (sql.Result, error) Query(string, ...interface{}) (*sql.Rows, error) QueryRow(string, ...interface{}) *sql.Row }
XODB is the common interface for database operations that can be used with types from schema 'amamonitor'.
This should work with database/sql.DB and database/sql.Tx.