func (o *ClaimTag) Claim(mods ...qm.QueryMod) claimQuery {
	queryMods := []qm.QueryMod{
		qm.Where("claim_id=?", o.ClaimID),
	}
	queryMods = append(queryMods, mods...)
	query := Claims(queryMods...)
	queries.SetFrom(query.Query, "`claim`")
	return query
}
Claim pointed to by the foreign key.
package model
import (
	"database/sql"
	"fmt"
	"reflect"
	"strconv"
	"strings"
	"sync"
	"time"
	"github.com/pkg/errors"
	"github.com/volatiletech/null"
	"github.com/volatiletech/sqlboiler/boil"
	"github.com/volatiletech/sqlboiler/queries"
	"github.com/volatiletech/sqlboiler/queries/qm"
	"github.com/volatiletech/sqlboiler/queries/qmhelper"
	"github.com/volatiletech/sqlboiler/strmangle"
)
type ClaimTag struct {
	ID         uint64      `boil:"id" json:"id" toml:"id" yaml:"id"`
	TagID      null.Uint64 `boil:"tag_id" json:"tag_id,omitempty" toml:"tag_id" yaml:"tag_id,omitempty"`
	ClaimID    string      `boil:"claim_id" json:"claim_id" toml:"claim_id" yaml:"claim_id"`
	CreatedAt  time.Time   `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	ModifiedAt time.Time   `boil:"modified_at" json:"modified_at" toml:"modified_at" yaml:"modified_at"`
	R *claimTagR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L claimTagL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}
var ClaimTagColumns = struct {
	ID         string
	TagID      string
	ClaimID    string
	CreatedAt  string
	ModifiedAt string
}{
	ID:         "id",
	TagID:      "tag_id",
	ClaimID:    "claim_id",
	CreatedAt:  "created_at",
	ModifiedAt: "modified_at",
}
var ClaimTagWhere = struct {
	ID         whereHelperuint64
	TagID      whereHelpernull_Uint64
	ClaimID    whereHelperstring
	CreatedAt  whereHelpertime_Time
	ModifiedAt whereHelpertime_Time
}{
	ID:         whereHelperuint64{field: "`claim_tag`.`id`"},
	TagID:      whereHelpernull_Uint64{field: "`claim_tag`.`tag_id`"},
	ClaimID:    whereHelperstring{field: "`claim_tag`.`claim_id`"},
	CreatedAt:  whereHelpertime_Time{field: "`claim_tag`.`created_at`"},
	ModifiedAt: whereHelpertime_Time{field: "`claim_tag`.`modified_at`"},
}
var ClaimTagRels = struct {
	Claim string
	Tag   string
}{
	Claim: "Claim",
	Tag:   "Tag",
}
type claimTagR struct {
	Claim *Claim
	Tag   *Tag
}
func (*claimTagR) NewStruct() *claimTagR {
	return &claimTagR{}
}
type claimTagL struct{}
var (
	claimTagAllColumns            = []string{"id", "tag_id", "claim_id", "created_at", "modified_at"}
	claimTagColumnsWithoutDefault = []string{"tag_id", "claim_id"}
	claimTagColumnsWithDefault    = []string{"id", "created_at", "modified_at"}
	claimTagPrimaryKeyColumns     = []string{"id"}
)
type (
	ClaimTagSlice []*ClaimTag
	claimTagQuery struct {
		*queries.Query
	}
)
var (
	claimTagType                 = reflect.TypeOf(&ClaimTag{})
	claimTagMapping              = queries.MakeStructMapping(claimTagType)
	claimTagPrimaryKeyMapping, _ = queries.BindMapping(claimTagType, claimTagMapping, claimTagPrimaryKeyColumns)
	claimTagInsertCacheMut       sync.RWMutex
	claimTagInsertCache          = make(map[string]insertCache)
	claimTagUpdateCacheMut       sync.RWMutex
	claimTagUpdateCache          = make(map[string]updateCache)
	claimTagUpsertCacheMut       sync.RWMutex
	claimTagUpsertCache          = make(map[string]insertCache)
)
var (
	_ = time.Second
	_ = qmhelper.Where
)
func (q claimTagQuery) OneG() (*ClaimTag, error) {
	return q.One(boil.GetDB())
}
func (q claimTagQuery) OneGP() *ClaimTag {
	o, err := q.One(boil.GetDB())
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q claimTagQuery) OneP(exec boil.Executor) *ClaimTag {
	o, err := q.One(exec)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q claimTagQuery) One(exec boil.Executor) (*ClaimTag, error) {
	o := &ClaimTag{}
	queries.SetLimit(q.Query, 1)
	err := q.Bind(nil, exec, o)
	if err != nil {
		if errors.Cause(err) == sql.ErrNoRows {
			return nil, sql.ErrNoRows
		}
		return nil, errors.Wrap(err, "model: failed to execute a one query for claim_tag")
	}
	return o, nil
}
func (q claimTagQuery) AllG() (ClaimTagSlice, error) {
	return q.All(boil.GetDB())
}
func (q claimTagQuery) AllGP() ClaimTagSlice {
	o, err := q.All(boil.GetDB())
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q claimTagQuery) AllP(exec boil.Executor) ClaimTagSlice {
	o, err := q.All(exec)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q claimTagQuery) All(exec boil.Executor) (ClaimTagSlice, error) {
	var o []*ClaimTag
	err := q.Bind(nil, exec, &o)
	if err != nil {
		return nil, errors.Wrap(err, "model: failed to assign all query results to ClaimTag slice")
	}
	return o, nil
}
func (q claimTagQuery) CountG() (int64, error) {
	return q.Count(boil.GetDB())
}
func (q claimTagQuery) CountGP() int64 {
	c, err := q.Count(boil.GetDB())
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return c
}
func (q claimTagQuery) CountP(exec boil.Executor) int64 {
	c, err := q.Count(exec)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return c
}
func (q claimTagQuery) Count(exec boil.Executor) (int64, error) {
	var count int64
	queries.SetSelect(q.Query, nil)
	queries.SetCount(q.Query)
	err := q.Query.QueryRow(exec).Scan(&count)
	if err != nil {
		return 0, errors.Wrap(err, "model: failed to count claim_tag rows")
	}
	return count, nil
}
func (q claimTagQuery) ExistsG() (bool, error) {
	return q.Exists(boil.GetDB())
}
func (q claimTagQuery) ExistsGP() bool {
	e, err := q.Exists(boil.GetDB())
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return e
}
func (q claimTagQuery) ExistsP(exec boil.Executor) bool {
	e, err := q.Exists(exec)
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return e
}
func (q claimTagQuery) Exists(exec boil.Executor) (bool, error) {
	var count int64
	queries.SetSelect(q.Query, nil)
	queries.SetCount(q.Query)
	queries.SetLimit(q.Query, 1)
	err := q.Query.QueryRow(exec).Scan(&count)
	if err != nil {
		return false, errors.Wrap(err, "model: failed to check if claim_tag exists")
	}
	return count > 0, nil
}