models

package
v5.0.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2018 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrSyncFail = errors.New("models: failed to synchronize data after insert")

ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.

View Source
var ImageColumns = struct {
	ID         string
	Suffix     string
	Visibility string
	TruckID    string
	Menu       string
}{
	ID:         "id",
	Suffix:     "suffix",
	Visibility: "visibility",
	TruckID:    "truck_id",
	Menu:       "menu",
}
View Source
var LocationColumns = struct {
	ID      string
	Display string
	Matcher string
	Lat     string
	Long    string
	Zone    string
	Site    string
}{
	ID:      "id",
	Display: "display",
	Matcher: "matcher",
	Lat:     "lat",
	Long:    "long",
	Zone:    "zone",
	Site:    "site",
}
View Source
var SiteColumns = struct {
	Name        string
	Title       string
	Description string
	Lat         string
	Long        string
}{
	Name:        "name",
	Title:       "title",
	Description: "description",
	Lat:         "lat",
	Long:        "long",
}
View Source
var SpotColumns = struct {
	TruckID    string
	LocationID string
	TweetID    string
}{
	TruckID:    "truck_id",
	LocationID: "location_id",
	TweetID:    "tweet_id",
}
View Source
var SubColumns = struct {
	ID          string
	Regex       string
	Replacement string
}{
	ID:          "id",
	Regex:       "regex",
	Replacement: "replacement",
}
View Source
var TableNames = struct {
	Images    string
	Locations string
	Sites     string
	Spots     string
	Subs      string
	Trucks    string
	Tweets    string
	Users     string
}{
	Images:    "images",
	Locations: "locations",
	Sites:     "sites",
	Spots:     "spots",
	Subs:      "subs",
	Trucks:    "trucks",
	Tweets:    "tweets",
	Users:     "users",
}
View Source
var TruckColumns = struct {
	ID         string
	Name       string
	Twitname   string
	Weburl     string
	Tweet      string
	Retweeted  string
	Lastupdate string
	Type       string
	About      string
	Foursquare string
	Site       string
	Locs       string
	Archive    string
}{
	ID:         "id",
	Name:       "name",
	Twitname:   "twitname",
	Weburl:     "weburl",
	Tweet:      "tweet",
	Retweeted:  "retweeted",
	Lastupdate: "lastupdate",
	Type:       "type",
	About:      "about",
	Foursquare: "foursquare",
	Site:       "site",
	Locs:       "locs",
	Archive:    "archive",
}
View Source
var TweetColumns = struct {
	Text      string
	Time      string
	ID        string
	Retweeted string
	TruckID   string
	Done      string
}{
	Text:      "text",
	Time:      "time",
	ID:        "id",
	Retweeted: "retweeted",
	TruckID:   "truck_id",
	Done:      "done",
}
View Source
var UserColumns = struct {
	ID       string
	Email    string
	Password string
	Admin    string
}{
	ID:       "id",
	Email:    "email",
	Password: "password",
	Admin:    "admin",
}

Functions

func AddImageHook

func AddImageHook(hookPoint boil.HookPoint, imageHook ImageHook)

AddImageHook registers your hook function for all future operations.

func AddLocationHook

func AddLocationHook(hookPoint boil.HookPoint, locationHook LocationHook)

AddLocationHook registers your hook function for all future operations.

func AddSiteHook

func AddSiteHook(hookPoint boil.HookPoint, siteHook SiteHook)

AddSiteHook registers your hook function for all future operations.

func AddSpotHook

func AddSpotHook(hookPoint boil.HookPoint, spotHook SpotHook)

AddSpotHook registers your hook function for all future operations.

func AddSubHook

func AddSubHook(hookPoint boil.HookPoint, subHook SubHook)

AddSubHook registers your hook function for all future operations.

func AddTruckHook

func AddTruckHook(hookPoint boil.HookPoint, truckHook TruckHook)

AddTruckHook registers your hook function for all future operations.

func AddTweetHook

func AddTweetHook(hookPoint boil.HookPoint, tweetHook TweetHook)

AddTweetHook registers your hook function for all future operations.

func AddUserHook

func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)

AddUserHook registers your hook function for all future operations.

func ImageExists

func ImageExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

ImageExists checks if the Image row exists.

func Images

func Images(mods ...qm.QueryMod) imageQuery

Images retrieves all the records using an executor.

func LocationExists

func LocationExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

LocationExists checks if the Location row exists.

func Locations

func Locations(mods ...qm.QueryMod) locationQuery

Locations retrieves all the records using an executor.

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

func SiteExists

func SiteExists(ctx context.Context, exec boil.ContextExecutor, name string) (bool, error)

SiteExists checks if the Site row exists.

func Sites

func Sites(mods ...qm.QueryMod) siteQuery

Sites retrieves all the records using an executor.

func SpotExists

func SpotExists(ctx context.Context, exec boil.ContextExecutor, locationID int64, tweetID string) (bool, error)

SpotExists checks if the Spot row exists.

func Spots

func Spots(mods ...qm.QueryMod) spotQuery

Spots retrieves all the records using an executor.

func SubExists

func SubExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

SubExists checks if the Sub row exists.

func Subs

func Subs(mods ...qm.QueryMod) subQuery

Subs retrieves all the records using an executor.

func TruckExists

func TruckExists(ctx context.Context, exec boil.ContextExecutor, twitname string) (bool, error)

TruckExists checks if the Truck row exists.

func Trucks

func Trucks(mods ...qm.QueryMod) truckQuery

Trucks retrieves all the records using an executor.

func TweetExists

func TweetExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

TweetExists checks if the Tweet row exists.

func Tweets

func Tweets(mods ...qm.QueryMod) tweetQuery

Tweets retrieves all the records using an executor.

func UserExists

func UserExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

UserExists checks if the User row exists.

func Users

func Users(mods ...qm.QueryMod) userQuery

Users retrieves all the records using an executor.

Types

type Image

type Image struct {
	ID         string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	Suffix     string    `boil:"suffix" json:"suffix" toml:"suffix" yaml:"suffix"`
	Visibility string    `boil:"visibility" json:"visibility" toml:"visibility" yaml:"visibility"`
	TruckID    string    `boil:"truck_id" json:"truck_id" toml:"truck_id" yaml:"truck_id"`
	Menu       null.Bool `boil:"menu" json:"menu,omitempty" toml:"menu" yaml:"menu,omitempty"`

	R *imageR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L imageL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Image is an object representing the database table.

func FindImage

func FindImage(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Image, error)

FindImage retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Image) Delete

func (o *Image) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Image record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Image) Insert

func (o *Image) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Image) Reload

func (o *Image) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Image) SetTruck

func (o *Image) SetTruck(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Truck) error

SetTruck of the image to the related item. Sets o.R.Truck to related. Adds o to related.R.Images.

func (*Image) Truck

func (o *Image) Truck(mods ...qm.QueryMod) truckQuery

Truck pointed to by the foreign key.

func (*Image) Update

func (o *Image) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Image. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Image) Upsert

func (o *Image) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type ImageHook

type ImageHook func(context.Context, boil.ContextExecutor, *Image) error

ImageHook is the signature for custom Image hook methods

type ImageSlice

type ImageSlice []*Image

ImageSlice is an alias for a slice of pointers to Image. This should generally be used opposed to []Image.

func (ImageSlice) DeleteAll

func (o ImageSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*ImageSlice) ReloadAll

func (o *ImageSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (ImageSlice) UpdateAll

func (o ImageSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type Location

type Location struct {
	ID      int64   `boil:"id" json:"id" toml:"id" yaml:"id"`
	Display string  `boil:"display" json:"display" toml:"display" yaml:"display"`
	Matcher string  `boil:"matcher" json:"matcher" toml:"matcher" yaml:"matcher"`
	Lat     float64 `boil:"lat" json:"lat" toml:"lat" yaml:"lat"`
	Long    float64 `boil:"long" json:"long" toml:"long" yaml:"long"`
	Zone    string  `boil:"zone" json:"zone" toml:"zone" yaml:"zone"`
	Site    string  `boil:"site" json:"site" toml:"site" yaml:"site"`

	R *locationR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L locationL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Location is an object representing the database table.

func FindLocation

func FindLocation(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Location, error)

FindLocation retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Location) AddSpots

func (o *Location) AddSpots(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Spot) error

AddSpots adds the given related objects to the existing relationships of the location, optionally inserting them as new records. Appends related to o.R.Spots. Sets related.R.Location appropriately.

func (*Location) Delete

func (o *Location) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Location record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Location) Insert

func (o *Location) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Location) Reload

func (o *Location) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Location) Spots

func (o *Location) Spots(mods ...qm.QueryMod) spotQuery

Spots retrieves all the spot's Spots with an executor.

func (*Location) Update

func (o *Location) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Location. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Location) Upsert

func (o *Location) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type LocationHook

type LocationHook func(context.Context, boil.ContextExecutor, *Location) error

LocationHook is the signature for custom Location hook methods

type LocationSlice

type LocationSlice []*Location

LocationSlice is an alias for a slice of pointers to Location. This should generally be used opposed to []Location.

func (LocationSlice) DeleteAll

func (o LocationSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*LocationSlice) ReloadAll

func (o *LocationSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (LocationSlice) UpdateAll

func (o LocationSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

type Site

type Site struct {
	Name        string  `boil:"name" json:"name" toml:"name" yaml:"name"`
	Title       string  `boil:"title" json:"title" toml:"title" yaml:"title"`
	Description string  `boil:"description" json:"description" toml:"description" yaml:"description"`
	Lat         float64 `boil:"lat" json:"lat" toml:"lat" yaml:"lat"`
	Long        float64 `boil:"long" json:"long" toml:"long" yaml:"long"`

	R *siteR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L siteL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Site is an object representing the database table.

func FindSite

func FindSite(ctx context.Context, exec boil.ContextExecutor, name string, selectCols ...string) (*Site, error)

FindSite retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Site) Delete

func (o *Site) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Site record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Site) Insert

func (o *Site) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Site) Reload

func (o *Site) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Site) Update

func (o *Site) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Site. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Site) Upsert

func (o *Site) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type SiteHook

type SiteHook func(context.Context, boil.ContextExecutor, *Site) error

SiteHook is the signature for custom Site hook methods

type SiteSlice

type SiteSlice []*Site

SiteSlice is an alias for a slice of pointers to Site. This should generally be used opposed to []Site.

func (SiteSlice) DeleteAll

func (o SiteSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*SiteSlice) ReloadAll

func (o *SiteSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (SiteSlice) UpdateAll

func (o SiteSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type Spot

type Spot struct {
	TruckID    string `boil:"truck_id" json:"truck_id" toml:"truck_id" yaml:"truck_id"`
	LocationID int64  `boil:"location_id" json:"location_id" toml:"location_id" yaml:"location_id"`
	TweetID    string `boil:"tweet_id" json:"tweet_id" toml:"tweet_id" yaml:"tweet_id"`

	R *spotR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L spotL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Spot is an object representing the database table.

func FindSpot

func FindSpot(ctx context.Context, exec boil.ContextExecutor, locationID int64, tweetID string, selectCols ...string) (*Spot, error)

FindSpot retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Spot) Delete

func (o *Spot) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Spot record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Spot) Insert

func (o *Spot) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Spot) Location

func (o *Spot) Location(mods ...qm.QueryMod) locationQuery

Location pointed to by the foreign key.

func (*Spot) Reload

func (o *Spot) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Spot) SetLocation

func (o *Spot) SetLocation(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Location) error

SetLocation of the spot to the related item. Sets o.R.Location to related. Adds o to related.R.Spots.

func (*Spot) SetTruck

func (o *Spot) SetTruck(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Truck) error

SetTruck of the spot to the related item. Sets o.R.Truck to related. Adds o to related.R.Spots.

func (*Spot) SetTweet

func (o *Spot) SetTweet(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Tweet) error

SetTweet of the spot to the related item. Sets o.R.Tweet to related. Adds o to related.R.Spots.

func (*Spot) Truck

func (o *Spot) Truck(mods ...qm.QueryMod) truckQuery

Truck pointed to by the foreign key.

func (*Spot) Tweet

func (o *Spot) Tweet(mods ...qm.QueryMod) tweetQuery

Tweet pointed to by the foreign key.

func (*Spot) Update

func (o *Spot) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Spot. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Spot) Upsert

func (o *Spot) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type SpotHook

type SpotHook func(context.Context, boil.ContextExecutor, *Spot) error

SpotHook is the signature for custom Spot hook methods

type SpotSlice

type SpotSlice []*Spot

SpotSlice is an alias for a slice of pointers to Spot. This should generally be used opposed to []Spot.

func (SpotSlice) DeleteAll

func (o SpotSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*SpotSlice) ReloadAll

func (o *SpotSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (SpotSlice) UpdateAll

func (o SpotSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type Sub

type Sub struct {
	ID          int64  `boil:"id" json:"id" toml:"id" yaml:"id"`
	Regex       string `boil:"regex" json:"regex" toml:"regex" yaml:"regex"`
	Replacement string `boil:"replacement" json:"replacement" toml:"replacement" yaml:"replacement"`

	R *subR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L subL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Sub is an object representing the database table.

func FindSub

func FindSub(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Sub, error)

FindSub retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Sub) Delete

func (o *Sub) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Sub record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Sub) Insert

func (o *Sub) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Sub) Reload

func (o *Sub) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Sub) Update

func (o *Sub) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Sub. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Sub) Upsert

func (o *Sub) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type SubHook

type SubHook func(context.Context, boil.ContextExecutor, *Sub) error

SubHook is the signature for custom Sub hook methods

type SubSlice

type SubSlice []*Sub

SubSlice is an alias for a slice of pointers to Sub. This should generally be used opposed to []Sub.

func (SubSlice) DeleteAll

func (o SubSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*SubSlice) ReloadAll

func (o *SubSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (SubSlice) UpdateAll

func (o SubSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type Truck

type Truck struct {
	ID         string           `boil:"id" json:"id" toml:"id" yaml:"id"`
	Name       string           `boil:"name" json:"name" toml:"name" yaml:"name"`
	Twitname   string           `boil:"twitname" json:"twitname" toml:"twitname" yaml:"twitname"`
	Weburl     string           `boil:"weburl" json:"weburl" toml:"weburl" yaml:"weburl"`
	Tweet      string           `boil:"tweet" json:"tweet" toml:"tweet" yaml:"tweet"`
	Retweeted  bool             `boil:"retweeted" json:"retweeted" toml:"retweeted" yaml:"retweeted"`
	Lastupdate int64            `boil:"lastupdate" json:"lastupdate" toml:"lastupdate" yaml:"lastupdate"`
	Type       string           `boil:"type" json:"type" toml:"type" yaml:"type"`
	About      string           `boil:"about" json:"about" toml:"about" yaml:"about"`
	Foursquare string           `boil:"foursquare" json:"foursquare" toml:"foursquare" yaml:"foursquare"`
	Site       string           `boil:"site" json:"site" toml:"site" yaml:"site"`
	Locs       types.Int64Array `boil:"locs" json:"locs,omitempty" toml:"locs" yaml:"locs,omitempty"`
	Archive    bool             `boil:"archive" json:"archive" toml:"archive" yaml:"archive"`

	R *truckR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L truckL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Truck is an object representing the database table.

func FindTruck

func FindTruck(ctx context.Context, exec boil.ContextExecutor, twitname string, selectCols ...string) (*Truck, error)

FindTruck retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Truck) AddImages

func (o *Truck) AddImages(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Image) error

AddImages adds the given related objects to the existing relationships of the truck, optionally inserting them as new records. Appends related to o.R.Images. Sets related.R.Truck appropriately.

func (*Truck) AddSpots

func (o *Truck) AddSpots(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Spot) error

AddSpots adds the given related objects to the existing relationships of the truck, optionally inserting them as new records. Appends related to o.R.Spots. Sets related.R.Truck appropriately.

func (*Truck) AddTweets

func (o *Truck) AddTweets(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Tweet) error

AddTweets adds the given related objects to the existing relationships of the truck, optionally inserting them as new records. Appends related to o.R.Tweets. Sets related.R.Truck appropriately.

func (*Truck) Delete

func (o *Truck) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Truck record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Truck) Images

func (o *Truck) Images(mods ...qm.QueryMod) imageQuery

Images retrieves all the image's Images with an executor.

func (*Truck) Insert

func (o *Truck) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Truck) Reload

func (o *Truck) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Truck) Spots

func (o *Truck) Spots(mods ...qm.QueryMod) spotQuery

Spots retrieves all the spot's Spots with an executor.

func (*Truck) Tweets

func (o *Truck) Tweets(mods ...qm.QueryMod) tweetQuery

Tweets retrieves all the tweet's Tweets with an executor.

func (*Truck) Update

func (o *Truck) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Truck. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Truck) Upsert

func (o *Truck) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type TruckHook

type TruckHook func(context.Context, boil.ContextExecutor, *Truck) error

TruckHook is the signature for custom Truck hook methods

type TruckSlice

type TruckSlice []*Truck

TruckSlice is an alias for a slice of pointers to Truck. This should generally be used opposed to []Truck.

func (TruckSlice) DeleteAll

func (o TruckSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*TruckSlice) ReloadAll

func (o *TruckSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (TruckSlice) UpdateAll

func (o TruckSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type Tweet

type Tweet struct {
	Text      string `boil:"text" json:"text" toml:"text" yaml:"text"`
	Time      int64  `boil:"time" json:"time" toml:"time" yaml:"time"`
	ID        string `boil:"id" json:"id" toml:"id" yaml:"id"`
	Retweeted bool   `boil:"retweeted" json:"retweeted" toml:"retweeted" yaml:"retweeted"`
	TruckID   string `boil:"truck_id" json:"truck_id" toml:"truck_id" yaml:"truck_id"`
	Done      bool   `boil:"done" json:"done" toml:"done" yaml:"done"`

	R *tweetR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L tweetL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Tweet is an object representing the database table.

func FindTweet

func FindTweet(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Tweet, error)

FindTweet retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Tweet) AddSpots

func (o *Tweet) AddSpots(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Spot) error

AddSpots adds the given related objects to the existing relationships of the tweet, optionally inserting them as new records. Appends related to o.R.Spots. Sets related.R.Tweet appropriately.

func (*Tweet) Delete

func (o *Tweet) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Tweet record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Tweet) Insert

func (o *Tweet) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Tweet) Reload

func (o *Tweet) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Tweet) SetTruck

func (o *Tweet) SetTruck(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Truck) error

SetTruck of the tweet to the related item. Sets o.R.Truck to related. Adds o to related.R.Tweets.

func (*Tweet) Spots

func (o *Tweet) Spots(mods ...qm.QueryMod) spotQuery

Spots retrieves all the spot's Spots with an executor.

func (*Tweet) Truck

func (o *Tweet) Truck(mods ...qm.QueryMod) truckQuery

Truck pointed to by the foreign key.

func (*Tweet) Update

func (o *Tweet) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Tweet. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Tweet) Upsert

func (o *Tweet) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type TweetHook

type TweetHook func(context.Context, boil.ContextExecutor, *Tweet) error

TweetHook is the signature for custom Tweet hook methods

type TweetSlice

type TweetSlice []*Tweet

TweetSlice is an alias for a slice of pointers to Tweet. This should generally be used opposed to []Tweet.

func (TweetSlice) DeleteAll

func (o TweetSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*TweetSlice) ReloadAll

func (o *TweetSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (TweetSlice) UpdateAll

func (o TweetSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type User

type User struct {
	ID       int64     `boil:"id" json:"id" toml:"id" yaml:"id"`
	Email    string    `boil:"email" json:"email" toml:"email" yaml:"email"`
	Password string    `boil:"password" json:"password" toml:"password" yaml:"password"`
	Admin    null.Bool `boil:"admin" json:"admin,omitempty" toml:"admin" yaml:"admin,omitempty"`

	R *userR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L userL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

User is an object representing the database table.

func FindUser

func FindUser(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*User, error)

FindUser retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*User) Delete

func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single User record with an executor. Delete will match against the primary key column to find the record to delete.

func (*User) Insert

func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*User) Reload

func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*User) Update

func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the User. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*User) Upsert

func (o *User) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type UserHook

type UserHook func(context.Context, boil.ContextExecutor, *User) error

UserHook is the signature for custom User hook methods

type UserSlice

type UserSlice []*User

UserSlice is an alias for a slice of pointers to User. This should generally be used opposed to []User.

func (UserSlice) DeleteAll

func (o UserSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*UserSlice) ReloadAll

func (o *UserSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (UserSlice) UpdateAll

func (o UserSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL