func (o *ContentUnit) ContentUnitI18ns(exec boil.Executor, mods ...qm.QueryMod) contentUnitI18nQuery {
	var queryMods []qm.QueryMod
	if len(mods) != 0 {
		queryMods = append(queryMods, mods...)
	}
	queryMods = append(queryMods,
		qm.Where("\"content_unit_i18n\".\"content_unit_id\"=?", o.ID),
	)
	query := ContentUnitI18ns(exec, queryMods...)
	queries.SetFrom(query.Query, "\"content_unit_i18n\"")
	if len(queries.GetSelect(query.Query)) == 0 {
		queries.SetSelect(query.Query, []string{"\"content_unit_i18n\".*"})
	}
	return query
}
ContentUnitI18ns retrieves all the content_unit_i18n's content unit i18n with an executor.
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"
	"gopkg.in/volatiletech/null.v6"
)
type ContentUnit struct {
	ID         int64     `boil:"id" json:"id" toml:"id" yaml:"id"`
	UID        string    `boil:"uid" json:"uid" toml:"uid" yaml:"uid"`
	TypeID     int64     `boil:"type_id" json:"type_id" toml:"type_id" yaml:"type_id"`
	CreatedAt  time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	Properties null.JSON `boil:"properties" json:"properties,omitempty" toml:"properties" yaml:"properties,omitempty"`
	Secure     int16     `boil:"secure" json:"secure" toml:"secure" yaml:"secure"`
	Published  bool      `boil:"published" json:"published" toml:"published" yaml:"published"`
	R *contentUnitR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L contentUnitL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}
var ContentUnitColumns = struct {
	ID         string
	UID        string
	TypeID     string
	CreatedAt  string
	Properties string
	Secure     string
	Published  string
}{
	ID:         "id",
	UID:        "uid",
	TypeID:     "type_id",
	CreatedAt:  "created_at",
	Properties: "properties",
	Secure:     "secure",
	Published:  "published",
}
type contentUnitR struct {
	Type                          *ContentType
	CollectionsContentUnits       CollectionsContentUnitSlice
	DerivedContentUnitDerivations ContentUnitDerivationSlice
	SourceContentUnitDerivations  ContentUnitDerivationSlice
	ContentUnitI18ns              ContentUnitI18nSlice
	ContentUnitsPersons           ContentUnitsPersonSlice
	Publishers                    PublisherSlice
	Sources                       SourceSlice
	Tags                          TagSlice
	Files                         FileSlice
}
type contentUnitL struct{}
var (
	contentUnitColumns               = []string{"id", "uid", "type_id", "created_at", "properties", "secure", "published"}
	contentUnitColumnsWithoutDefault = []string{"uid", "type_id", "properties"}
	contentUnitColumnsWithDefault    = []string{"id", "created_at", "secure", "published"}
	contentUnitPrimaryKeyColumns     = []string{"id"}
)
type (
	ContentUnitSlice []*ContentUnit
	contentUnitQuery struct {
		*queries.Query
	}
)
var (
	contentUnitType                 = reflect.TypeOf(&ContentUnit{})
	contentUnitMapping              = queries.MakeStructMapping(contentUnitType)
	contentUnitPrimaryKeyMapping, _ = queries.BindMapping(contentUnitType, contentUnitMapping, contentUnitPrimaryKeyColumns)
	contentUnitInsertCacheMut       sync.RWMutex
	contentUnitInsertCache          = make(map[string]insertCache)
	contentUnitUpdateCacheMut       sync.RWMutex
	contentUnitUpdateCache          = make(map[string]updateCache)
	contentUnitUpsertCacheMut       sync.RWMutex
	contentUnitUpsertCache          = make(map[string]insertCache)
)
var (
	_ = time.Second
	_ = bytes.MinRead
)
func (q contentUnitQuery) OneP() *ContentUnit {
	o, err := q.One()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q contentUnitQuery) One() (*ContentUnit, error) {
	o := &ContentUnit{}
	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 content_units")
	}
	return o, nil
}
func (q contentUnitQuery) AllP() ContentUnitSlice {
	o, err := q.All()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
func (q contentUnitQuery) All() (ContentUnitSlice, error) {
	var o []*ContentUnit
	err := q.Bind(&o)
	if err != nil {
		return nil, errors.Wrap(err, "mdbmodels: failed to assign all query results to ContentUnit slice")
	}
	return o, nil
}
func (q contentUnitQuery) CountP() int64 {
	c, err := q.Count()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return c
}
func (q contentUnitQuery) 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 content_units rows")
	}
	return count, nil
}
func (q contentUnitQuery) ExistsP() bool {
	e, err := q.Exists()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return e
}
func (q contentUnitQuery) 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 content_units exists")
	}
	return count > 0, nil
}
func (o *ContentUnit) TypeG(mods ...qm.QueryMod) contentTypeQuery {
	return o.Type(boil.GetDB(), mods...)
}
func (o *ContentUnit) Type(exec boil.Executor, mods ...qm.QueryMod) contentTypeQuery {
	queryMods := []qm.QueryMod{
		qm.Where("id=?", o.TypeID),
	}
	queryMods = append(queryMods, mods...)
	query := ContentTypes(exec, queryMods...)
	queries.SetFrom(query.Query, "\"content_types\"")
	return query
}
func (o *ContentUnit) CollectionsContentUnitsG(mods ...qm.QueryMod) collectionsContentUnitQuery {
	return o.CollectionsContentUnits(boil.GetDB(), mods...)
}
func (o *ContentUnit) CollectionsContentUnits(exec boil.Executor, mods ...qm.QueryMod) collectionsContentUnitQuery {
	var queryMods []qm.QueryMod
	if len(mods) != 0 {
		queryMods = append(queryMods, mods...)
	}
	queryMods = append(queryMods,
		qm.Where("\"collections_content_units\".\"content_unit_id\"=?", o.ID),
	)
	query := CollectionsContentUnits(exec, queryMods...)
	queries.SetFrom(query.Query, "\"collections_content_units\"")
	if len(queries.GetSelect(query.Query)) == 0 {
		queries.SetSelect(query.Query, []string{"\"collections_content_units\".*"})
	}
	return query
}
func (o *ContentUnit) DerivedContentUnitDerivationsG(mods ...qm.QueryMod) contentUnitDerivationQuery {
	return o.DerivedContentUnitDerivations(boil.GetDB(), mods...)
}
func (o *ContentUnit) DerivedContentUnitDerivations(exec boil.Executor, mods ...qm.QueryMod) contentUnitDerivationQuery {
	var queryMods []qm.QueryMod
	if len(mods) != 0 {
		queryMods = append(queryMods, mods...)
	}
	queryMods = append(queryMods,
		qm.Where("\"content_unit_derivations\".\"derived_id\"=?", o.ID),
	)
	query := ContentUnitDerivations(exec, queryMods...)
	queries.SetFrom(query.Query, "\"content_unit_derivations\"")
	if len(queries.GetSelect(query.Query)) == 0 {
		queries.SetSelect(query.Query, []string{"\"content_unit_derivations\".*"})
	}
	return query
}
func (o *ContentUnit) SourceContentUnitDerivationsG(mods ...qm.QueryMod) contentUnitDerivationQuery {
	return o.SourceContentUnitDerivations(boil.GetDB(), mods...)
}
func (o *ContentUnit) SourceContentUnitDerivations(exec boil.Executor, mods ...qm.QueryMod) contentUnitDerivationQuery {
	var queryMods []qm.QueryMod
	if len(mods) != 0 {
		queryMods = append(queryMods, mods...)
	}
	queryMods = append(queryMods,
		qm.Where("\"content_unit_derivations\".\"source_id\"=?", o.ID),
	)
	query := ContentUnitDerivations(exec, queryMods...)
	queries.SetFrom(query.Query, "\"content_unit_derivations\"")
	if len(queries.GetSelect(query.Query)) == 0 {
		queries.SetSelect(query.Query, []string{"\"content_unit_derivations\".*"})
	}
	return query
}
func (o *ContentUnit) ContentUnitI18nsG(mods ...qm.QueryMod) contentUnitI18nQuery {
	return o.ContentUnitI18ns(boil.GetDB(), mods...)
}