func (o *PollsStateSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error {
	if o == nil || len(*o) == 0 {
		return nil
	}

	slice := PollsStateSlice{}
	var args []interface{}
	for _, obj := range *o {
		pkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), pollsStatePrimaryKeyMapping)
		args = append(args, pkeyArgs...)
	}

	sql := "SELECT \"polls_state\".* FROM \"polls_state\" WHERE " +
		strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 1, pollsStatePrimaryKeyColumns, len(*o))

	q := queries.Raw(sql, args...)

	err := q.Bind(ctx, exec, &slice)
	if err != nil {
		return errors.Wrap(err, "models: unable to reload all in PollsStateSlice")
	}

	*o = slice

	return nil
}
// ReloadAll refetches every row with matching primary key column values
// and overwrites the original object slice with the newly updated slice.
ReloadAll refetches every row with matching primary key column values
and overwrites the original object slice with the newly updated slice.
// ReloadAll refetches every row with matching primary key column values // and overwrites the original object slice with the newly updated slice .
func (o *PollsStateSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error {
	if o == nil || len(*o) == 0 {
		return nil
	}
	slice := PollsStateSlice{}
	var args []interface{}
	for _, obj := range *o {
		pkeyArgs := queries.ValuesFromMapping(reflect.Indirect(reflect.ValueOf(obj)), pollsStatePrimaryKeyMapping)
		args = append(args, pkeyArgs...)
	}
	sql := "SELECT \"polls_state\".* FROM \"polls_state\" WHERE " +
		strmangle.WhereClauseRepeated(string(dialect.LQ), string(dialect.RQ), 1, pollsStatePrimaryKeyColumns, len(*o))
	q := queries.Raw(sql, args...)
	err := q.Bind(ctx, exec, &slice)
	if err != nil {
		return errors.Wrap(err, "models: unable to reload all in PollsStateSlice")
	}
	*o = slice
	return nil
}
func ( o * PollsStateSlice ) ReloadAll ( ctx context . Context , exec boil . ContextExecutor ) error { if o == nil || len ( * o ) == 0 { return nil } slice := PollsStateSlice { } var args [ ] interface { } for _ , obj := range * o { pkeyArgs := queries . ValuesFromMapping ( reflect . Indirect ( reflect . ValueOf ( obj ) ) , pollsStatePrimaryKeyMapping ) args = append ( args , pkeyArgs ... ) } sql := " \" \" \" \" " + strmangle . WhereClauseRepeated ( string ( dialect . LQ ) , string ( dialect . RQ ) , 1 , pollsStatePrimaryKeyColumns , len ( * o ) ) q := queries . Raw ( sql , args ... ) err := q . Bind ( ctx , exec , & slice ) if err != nil { return errors . Wrap ( err , " " ) } * o = slice return nil }
ReloadAll refetches every row with matching primary key column values
and overwrites the original object slice with the newly updated slice.
ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice .