func (o *TwitterUserSlice) ReloadAllP(exec boil.Executor) {
	if err := o.ReloadAll(exec); err != nil {
		panic(boil.WrapErr(err))
	}
}
ReloadAllP refetches every row with matching primary key column values
and overwrites the original object slice with the newly updated slice.
Panics on error.
package mdbmodels
import (
	"bytes"
	"database/sql"
	"fmt"
	"reflect"
	"strings"
	"sync"
	"time"
	"github.com/Bnei-Baruch/sqlboiler/boil"
	"github.com/Bnei-Baruch/sqlboiler/queries"
	"github.com/Bnei-Baruch/sqlboiler/queries/qm"
	"github.com/Bnei-Baruch/sqlboiler/strmangle"
	"github.com/pkg/errors"
)
type TwitterUser struct {
	ID          int64  `boil:"id" json:"id" toml:"id" yaml:"id"`
	Username    string `boil:"username" json:"username" toml:"username" yaml:"username"`
	AccountID   string `boil:"account_id" json:"account_id" toml:"account_id" yaml:"account_id"`
	DisplayName string `boil:"display_name" json:"display_name" toml:"display_name" yaml:"display_name"`
	R *twitterUserR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L twitterUserL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}
var TwitterUserColumns = struct {
	ID          string
	Username    string
	AccountID   string
	DisplayName string
}{
	ID:          "id",
	Username:    "username",
	AccountID:   "account_id",
	DisplayName: "display_name",
}
type twitterUserR struct {
	UserTwitterTweets TwitterTweetSlice
}
type twitterUserL struct{}
var (
	twitterUserColumns               = []string{"id", "username", "account_id", "display_name"}
	twitterUserColumnsWithoutDefault = []string{"username", "account_id", "display_name"}
	twitterUserColumnsWithDefault    = []string{"id"}
	twitterUserPrimaryKeyColumns     = []string{"id"}
)
type (
	TwitterUserSlice []*TwitterUser
	twitterUserQuery struct {
		*queries.Query
	}
)
var (
	twitterUserType                 = reflect.TypeOf(&TwitterUser{})
	twitterUserMapping              = queries.MakeStructMapping(twitterUserType)
	twitterUserPrimaryKeyMapping, _ = queries.BindMapping(twitterUserType, twitterUserMapping, twitterUserPrimaryKeyColumns)
	twitterUserInsertCacheMut       sync.RWMutex
	twitterUserInsertCache          = make(map[string]insertCache)
	twitterUserUpdateCacheMut       sync.RWMutex
	twitterUserUpdateCache          = make(map[string]updateCache)
	twitterUserUpsertCacheMut       sync.RWMutex
	twitterUserUpsertCache          = make(map[string]insertCache)
)
var (
	_ = time.Second
	_ = bytes.MinRead
)
func (q twitterUserQuery) OneP() *TwitterUser {
	o, err := q.One()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q twitterUserQuery) One() (*TwitterUser, error) {
	o := &TwitterUser{}
	queries.SetLimit(q.Query, 1)
	err := q.Bind(o)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "mdbmodels: failed to execute a one query for twitter_users")
	}
	return o, nil
}
func (q twitterUserQuery) AllP() TwitterUserSlice {
	o, err := q.All()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q twitterUserQuery) All() (TwitterUserSlice, error) {
	var o []*TwitterUser
	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "mdbmodels: failed to assign all query results to TwitterUser slice")
	}
	return o, nil
}
func (q twitterUserQuery) CountP() int64 {
	c, err := q.Count()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return c
}
func (q twitterUserQuery) Count() (int64, error) {
	var count int64
	queries.SetSelect(q.Query, nil)
	queries.SetCount(q.Query)
	err := q.Query.QueryRow().Scan(&count)
	if err != nil {
		return 0, errors.Wrap(err, "mdbmodels: failed to count twitter_users rows")
	}
	return count, nil
}
func (q twitterUserQuery) ExistsP() bool {
	e, err := q.Exists()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return e
}
func (q twitterUserQuery) Exists() (bool, error) {
	var count int64
	queries.SetCount(q.Query)
	queries.SetLimit(q.Query, 1)
	err := q.Query.QueryRow().Scan(&count)
	if err != nil {
		return false, errors.Wrap(err, "mdbmodels: failed to check if twitter_users exists")
	}
	return count > 0, nil
}
func (o *TwitterUser) UserTwitterTweetsG(mods ...qm.QueryMod) twitterTweetQuery {
	return o.UserTwitterTweets(boil.GetDB(), mods...)
}
func (o *TwitterUser) UserTwitterTweets(exec boil.Executor, mods ...qm.QueryMod) twitterTweetQuery {
	var queryMods []qm.QueryMod
	if len(mods) != 0 {
		queryMods = append(queryMods, mods...)
	}
	queryMods = append(queryMods,
		qm.Where("\"twitter_tweets\".\"user_id\"=?", o.ID),
	)
	query := TwitterTweets(exec, queryMods...)
	queries.SetFrom(query.Query, "\"twitter_tweets\"")
	if len(queries.GetSelect(query.Query)) == 0 {
		queries.SetSelect(query.Query, []string{"\"twitter_tweets\".*"})
	}
	return query
}
func (twitterUserL) LoadUserTwitterTweets(e boil.Executor, singular bool, maybeTwitterUser interface{}) error {
	var slice []*TwitterUser
	var object *TwitterUser
	count := 1
	if singular {
		object = maybeTwitterUser.(*TwitterUser)
	} else {
		slice = *maybeTwitterUser.(*[]*TwitterUser)
		count = len(slice)
	}
	args := make([]interface{}, count)
	if singular {
		if object.R == nil {
			object.R = &twitterUserR{}
		}
		args[0] = object.ID
	} else {
		for i, obj := range slice {
			if obj.R == nil {
				obj.R = &twitterUserR{}
			}
			args[i] = obj.ID
		}
	}
	query := fmt.Sprintf(
		"select * from \"twitter_tweets\" where \"user_id\" in (%s)",
		strmangle.Placeholders(dialect.IndexPlaceholders, count, 1, 1),
	)
	if boil.DebugMode {
		fmt.Fprintf(boil.DebugWriter, "%s\n%v\n", query, args)
	}
	results, err := e.Query(query, args...)
	if err != nil {
		return errors.Wrap(err, "failed to eager load twitter_tweets")
	}
	defer results.Close()
	var resultSlice []*TwitterTweet
	if err = queries.Bind(results, &resultSlice); err != nil {
		return errors.Wrap(err, "failed to bind eager loaded slice twitter_tweets")
	}
	if singular {
		object.R.UserTwitterTweets = resultSlice
		return nil
	}
	for _, foreign := range resultSlice {
		for _, local := range slice {
			if local.ID == foreign.UserID {
				local.R.UserTwitterTweets = append(local.R.UserTwitterTweets, foreign)
				break
			}
		}
	}
	return nil
}
func (o *TwitterUser) AddUserTwitterTweetsG(insert bool, related ...*TwitterTweet) error {
	return o.AddUserTwitterTweets(boil.GetDB(), insert, related...)
}
func (o *TwitterUser) AddUserTwitterTweetsP(exec boil.Executor, insert bool, related ...*TwitterTweet) {
	if err := o.AddUserTwitterTweets(exec, insert, related...); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *TwitterUser) AddUserTwitterTweetsGP(insert bool, related ...*TwitterTweet) {
	if err := o.AddUserTwitterTweets(boil.GetDB(), insert, related...); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *TwitterUser) AddUserTwitterTweets(exec boil.Executor, insert bool, related ...*TwitterTweet) error {
	var err error
	for _, rel := range related {
		if insert {
			rel.UserID = o.ID
			if err = rel.Insert(exec); err != nil {
				return errors.Wrap(err, "failed to insert into foreign table")
			}
		} else {
			updateQuery := fmt.Sprintf(
				"UPDATE \"twitter_tweets\" SET %s WHERE %s",
				strmangle.SetParamNames("\"", "\"", 1, []string{"user_id"}),
				strmangle.WhereClause("\"", "\"", 2, twitterTweetPrimaryKeyColumns),
			)
			values := []interface{}{o.ID, rel.ID}
			if boil.DebugMode {
				fmt.Fprintln(boil.DebugWriter, updateQuery)
				fmt.Fprintln(boil.DebugWriter, values)
			}
			if _, err = exec.Exec(updateQuery, values...); err != nil {
				return errors.Wrap(err, "failed to update foreign table")
			}
			rel.UserID = o.ID
		}
	}
	if o.R == nil {
		o.R = &twitterUserR{
			UserTwitterTweets: related,
		}
	} else {
		o.R.UserTwitterTweets = append(o.R.UserTwitterTweets, related...)
	}
	for _, rel := range related {
		if rel.R == nil {
			rel.R = &twitterTweetR{
				User: o,
			}
		} else {
			rel.R.User = o
		}
	}
	return nil
}
func TwitterUsersG(mods ...qm.QueryMod) twitterUserQuery {
	return TwitterUsers(boil.GetDB(), mods...)
}
func TwitterUsers(exec boil.Executor, mods ...qm.QueryMod) twitterUserQuery {
	mods = append(mods, qm.From("\"twitter_users\""))
	return twitterUserQuery{NewQuery(exec, mods...)}
}
func FindTwitterUserG(id int64, selectCols ...string) (*TwitterUser, error) {
	return FindTwitterUser(boil.GetDB(), id, selectCols...)
}
func FindTwitterUserGP(id int64, selectCols ...string) *TwitterUser {
	retobj, err := FindTwitterUser(boil.GetDB(), id, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return retobj
}
func FindTwitterUser(exec boil.Executor, id int64, selectCols ...string) (*TwitterUser, error) {
	twitterUserObj := &TwitterUser{}
	sel := "*"
	if len(selectCols) > 0 {
		sel = strings.Join(strmangle.IdentQuoteSlice(dialect.LQ, dialect.RQ, selectCols), ",")
	}
	query := fmt.Sprintf(
		"select %s from \"twitter_users\" where \"id\"=$1", sel,
	)
	q := queries.Raw(exec, query, id)
	err := q.Bind(twitterUserObj)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "mdbmodels: unable to select from twitter_users")
	}
	return twitterUserObj, nil
}
func FindTwitterUserP(exec boil.Executor, id int64, selectCols ...string) *TwitterUser {
	retobj, err := FindTwitterUser(exec, id, selectCols...)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return retobj
}
func (o *TwitterUser) InsertG(whitelist ...string) error {
	return o.Insert(boil.GetDB(), whitelist...)
}
func (o *TwitterUser) InsertGP(whitelist ...string) {
	if err := o.Insert(boil.GetDB(), whitelist...); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *TwitterUser) InsertP(exec boil.Executor, whitelist ...string) {
	if err := o.Insert(exec, whitelist...); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *TwitterUser) Insert(exec boil.Executor, whitelist ...string) error {
	if o == nil {
		return errors.New("mdbmodels: no twitter_users provided for insertion")
	}
	var err error
	nzDefaults := queries.NonZeroDefaultSet(twitterUserColumnsWithDefault, o)
	key := makeCacheKey(whitelist, nzDefaults)
	twitterUserInsertCacheMut.RLock()
	cache, cached := twitterUserInsertCache[key]
	twitterUserInsertCacheMut.RUnlock()
	if !cached {
		wl, returnColumns := strmangle.InsertColumnSet(
			twitterUserColumns,
			twitterUserColumnsWithDefault,
			twitterUserColumnsWithoutDefault,
			nzDefaults,
			whitelist,
		)
		cache.valueMapping, err = queries.BindMapping(twitterUserType, twitterUserMapping, wl)
		if err != nil {
			return err
		}
		cache.retMapping, err = queries.BindMapping(twitterUserType, twitterUserMapping, returnColumns)
		if err != nil {
			return err
		}
		if len(wl) != 0 {
			cache.query = fmt.Sprintf("INSERT INTO \"twitter_users\" (\"%s\") %%sVALUES (%s)%%s", strings.Join(wl, "\",\""), strmangle.Placeholders(dialect.IndexPlaceholders, len(wl), 1, 1))
		} else {
			cache.query = "INSERT INTO \"twitter_users\" DEFAULT VALUES"
		}
		var queryOutput, queryReturning string
		if len(cache.retMapping) != 0 {
			queryReturning = fmt.Sprintf(" RETURNING \"%s\"", strings.Join(returnColumns, "\",\""))
		}
		if len(wl) != 0 {
			cache.query = fmt.Sprintf(cache.query, queryOutput, queryReturning)
		}
	}
	value := reflect.Indirect(reflect.ValueOf(o))
	vals := queries.ValuesFromMapping(value, cache.valueMapping)
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, cache.query)
		fmt.Fprintln(boil.DebugWriter, vals)
	}
	if len(cache.retMapping) != 0 {
		err = exec.QueryRow(cache.query, vals...).Scan(queries.PtrsFromMapping(value, cache.retMapping)...)
	} else {
		_, err = exec.Exec(cache.query, vals...)
	}
	if err != nil {
		return errors.Wrap(err, "mdbmodels: unable to insert into twitter_users")
	}
	if !cached {
		twitterUserInsertCacheMut.Lock()
		twitterUserInsertCache[key] = cache
		twitterUserInsertCacheMut.Unlock()
	}
	return nil
}
func (o *TwitterUser) UpdateG(whitelist ...string) error {
	return o.Update(boil.GetDB(), whitelist...)
}
func (o *TwitterUser) UpdateGP(whitelist ...string) {
	if err := o.Update(boil.GetDB(), whitelist...); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *TwitterUser) UpdateP(exec boil.Executor, whitelist ...string) {
	err := o.Update(exec, whitelist...)
	if err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *TwitterUser) Update(exec boil.Executor, whitelist ...string) error {
	var err error
	key := makeCacheKey(whitelist, nil)
	twitterUserUpdateCacheMut.RLock()
	cache, cached := twitterUserUpdateCache[key]
	twitterUserUpdateCacheMut.RUnlock()
	if !cached {
		wl := strmangle.UpdateColumnSet(
			twitterUserColumns,
			twitterUserPrimaryKeyColumns,
			whitelist,
		)
		if len(wl) == 0 {
			return errors.New("mdbmodels: unable to update twitter_users, could not build whitelist")
		}
		cache.query = fmt.Sprintf("UPDATE \"twitter_users\" SET %s WHERE %s",
			strmangle.SetParamNames("\"", "\"", 1, wl),
			strmangle.WhereClause("\"", "\"", len(wl)+1, twitterUserPrimaryKeyColumns),
		)
		cache.valueMapping, err = queries.BindMapping(twitterUserType, twitterUserMapping, append(wl, twitterUserPrimaryKeyColumns...))
		if err != nil {
			return err
		}
	}
	values := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), cache.valueMapping)
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, cache.query)
		fmt.Fprintln(boil.DebugWriter, values)
	}
	_, err = exec.Exec(cache.query, values...)
	if err != nil {
		return errors.Wrap(err, "mdbmodels: unable to update twitter_users row")
	}
	if !cached {
		twitterUserUpdateCacheMut.Lock()
		twitterUserUpdateCache[key] = cache
		twitterUserUpdateCacheMut.Unlock()
	}
	return nil
}
func (q twitterUserQuery) UpdateAllP(cols M) {
	if err := q.UpdateAll(cols); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (q twitterUserQuery) UpdateAll(cols M) error {
	queries.SetUpdate(q.Query, cols)
	_, err := q.Query.Exec()
	if err != nil {
		return errors.Wrap(err, "mdbmodels: unable to update all for twitter_users")
	}
	return nil
}
func (o TwitterUserSlice) UpdateAllG(cols M) error {
	return o.UpdateAll(boil.GetDB(), cols)
}
func (o TwitterUserSlice) UpdateAllGP(cols M) {
	if err := o.UpdateAll(boil.GetDB(), cols); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o TwitterUserSlice) UpdateAllP(exec boil.Executor, cols M) {
	if err := o.UpdateAll(exec, cols); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o TwitterUserSlice) UpdateAll(exec boil.Executor, cols M) error {
	ln := int64(len(o))
	if ln == 0 {
		return nil
	}
	if len(cols) == 0 {
		return errors.New("mdbmodels: update all requires at least one column argument")
	}
	colNames := make([]string, len(cols))
	args := make([]interface{}, len(cols))
	i := 0
	for name, value := range cols {
		colNames[i] = name
		args[i] = value
		i++
	}
	for _, obj := range o {
		pkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), twitterUserPrimaryKeyMapping)
		args = append(args, pkeyArgs...)
	}
	sql := fmt.Sprintf("UPDATE \"twitter_users\" SET %s WHERE %s",
		strmangle.SetParamNames("\"", "\"", 1, colNames),
		strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), len(colNames)+1, twitterUserPrimaryKeyColumns, len(o)))
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, sql)
		fmt.Fprintln(boil.DebugWriter, args...)
	}
	_, err := exec.Exec(sql, args...)
	if err != nil {
		return errors.Wrap(err, "mdbmodels: unable to update all in twitterUser slice")
	}
	return nil
}
func (o *TwitterUser) UpsertG(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {
	return o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...)
}
func (o *TwitterUser) UpsertGP(updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) {
	if err := o.Upsert(boil.GetDB(), updateOnConflict, conflictColumns, updateColumns, whitelist...); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *TwitterUser) UpsertP(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) {
	if err := o.Upsert(exec, updateOnConflict, conflictColumns, updateColumns, whitelist...); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *TwitterUser) Upsert(exec boil.Executor, updateOnConflict bool, conflictColumns []string, updateColumns []string, whitelist ...string) error {
	if o == nil {
		return errors.New("mdbmodels: no twitter_users provided for upsert")
	}
	nzDefaults := queries.NonZeroDefaultSet(twitterUserColumnsWithDefault, o)
	buf := strmangle.GetBuffer()
	if updateOnConflict {
		buf.WriteByte('t')
	} else {
		buf.WriteByte('f')
	}
	buf.WriteByte('.')
	for _, c := range conflictColumns {
		buf.WriteString(c)
	}
	buf.WriteByte('.')
	for _, c := range updateColumns {
		buf.WriteString(c)
	}
	buf.WriteByte('.')
	for _, c := range whitelist {
		buf.WriteString(c)
	}
	buf.WriteByte('.')
	for _, c := range nzDefaults {
		buf.WriteString(c)
	}
	key := buf.String()
	strmangle.PutBuffer(buf)
	twitterUserUpsertCacheMut.RLock()
	cache, cached := twitterUserUpsertCache[key]
	twitterUserUpsertCacheMut.RUnlock()
	var err error
	if !cached {
		insert, ret := strmangle.InsertColumnSet(
			twitterUserColumns,
			twitterUserColumnsWithDefault,
			twitterUserColumnsWithoutDefault,
			nzDefaults,
			whitelist,
		)
		update := strmangle.UpdateColumnSet(
			twitterUserColumns,
			twitterUserPrimaryKeyColumns,
			updateColumns,
		)
		if len(update) == 0 {
			return errors.New("mdbmodels: unable to upsert twitter_users, could not build update column list")
		}
		conflict := conflictColumns
		if len(conflict) == 0 {
			conflict = make([]string, len(twitterUserPrimaryKeyColumns))
			copy(conflict, twitterUserPrimaryKeyColumns)
		}
		cache.query = queries.BuildUpsertQueryPostgres(dialect, "\"twitter_users\"", updateOnConflict, ret, update, conflict, insert)
		cache.valueMapping, err = queries.BindMapping(twitterUserType, twitterUserMapping, insert)
		if err != nil {
			return err
		}
		if len(ret) != 0 {
			cache.retMapping, err = queries.BindMapping(twitterUserType, twitterUserMapping, ret)
			if err != nil {
				return err
			}
		}
	}
	value := reflect.Indirect(reflect.ValueOf(o))
	vals := queries.ValuesFromMapping(value, cache.valueMapping)
	var returns []interface{}
	if len(cache.retMapping) != 0 {
		returns = queries.PtrsFromMapping(value, cache.retMapping)
	}
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, cache.query)
		fmt.Fprintln(boil.DebugWriter, vals)
	}
	if len(cache.retMapping) != 0 {
		err = exec.QueryRow(cache.query, vals...).Scan(returns...)
		if err == sql.ErrNoRows {
			err = nil  
		}
	} else {
		_, err = exec.Exec(cache.query, vals...)
	}
	if err != nil {
		return errors.Wrap(err, "mdbmodels: unable to upsert twitter_users")
	}
	if !cached {
		twitterUserUpsertCacheMut.Lock()
		twitterUserUpsertCache[key] = cache
		twitterUserUpsertCacheMut.Unlock()
	}
	return nil
}
func (o *TwitterUser) DeleteP(exec boil.Executor) {
	if err := o.Delete(exec); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *TwitterUser) DeleteG() error {
	if o == nil {
		return errors.New("mdbmodels: no TwitterUser provided for deletion")
	}
	return o.Delete(boil.GetDB())
}
func (o *TwitterUser) DeleteGP() {
	if err := o.DeleteG(); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *TwitterUser) Delete(exec boil.Executor) error {
	if o == nil {
		return errors.New("mdbmodels: no TwitterUser provided for delete")
	}
	args := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(o)), twitterUserPrimaryKeyMapping)
	sql := "DELETE FROM \"twitter_users\" WHERE \"id\"=$1"
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, sql)
		fmt.Fprintln(boil.DebugWriter, args...)
	}
	_, err := exec.Exec(sql, args...)
	if err != nil {
		return errors.Wrap(err, "mdbmodels: unable to delete from twitter_users")
	}
	return nil
}
func (q twitterUserQuery) DeleteAllP() {
	if err := q.DeleteAll(); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (q twitterUserQuery) DeleteAll() error {
	if q.Query == nil {
		return errors.New("mdbmodels: no twitterUserQuery provided for delete all")
	}
	queries.SetDelete(q.Query)
	_, err := q.Query.Exec()
	if err != nil {
		return errors.Wrap(err, "mdbmodels: unable to delete all from twitter_users")
	}
	return nil
}
func (o TwitterUserSlice) DeleteAllGP() {
	if err := o.DeleteAllG(); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o TwitterUserSlice) DeleteAllG() error {
	if o == nil {
		return errors.New("mdbmodels: no TwitterUser slice provided for delete all")
	}
	return o.DeleteAll(boil.GetDB())
}
func (o TwitterUserSlice) DeleteAllP(exec boil.Executor) {
	if err := o.DeleteAll(exec); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o TwitterUserSlice) DeleteAll(exec boil.Executor) error {
	if o == nil {
		return errors.New("mdbmodels: no TwitterUser slice provided for delete all")
	}
	if len(o) == 0 {
		return nil
	}
	var args []interface{}
	for _, obj := range o {
		pkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), twitterUserPrimaryKeyMapping)
		args = append(args, pkeyArgs...)
	}
	sql := "DELETE FROM \"twitter_users\" WHERE " +
		strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 1, twitterUserPrimaryKeyColumns, len(o))
	if boil.DebugMode {
		fmt.Fprintln(boil.DebugWriter, sql)
		fmt.Fprintln(boil.DebugWriter, args)
	}
	_, err := exec.Exec(sql, args...)
	if err != nil {
		return errors.Wrap(err, "mdbmodels: unable to delete all from twitterUser slice")
	}
	return nil
}
func (o *TwitterUser) ReloadGP() {
	if err := o.ReloadG(); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *TwitterUser) ReloadP(exec boil.Executor) {
	if err := o.Reload(exec); err != nil {
		panic(boil.WrapErr(err))
	}
}
func (o *TwitterUser) ReloadG() error {
	if o == nil {
		return errors.New("mdbmodels: no TwitterUser provided for reload")
	}
	return o.Reload(boil.GetDB())
}
func (o *TwitterUser) Reload(exec boil.Executor) error {
	ret, err := FindTwitterUser(exec, o.ID)
	if err != nil {
		return err
	}
	*o = *ret
	return nil
}
func (o *TwitterUserSlice) ReloadAllGP() {
	if err := o.ReloadAllG(); err != nil {
		panic(boil.WrapErr(err))
	}
}