func (q contentUnitQuery) AllP() ContentUnitSlice {
	o, err := q.All()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}
AllP returns all ContentUnit records from the query, and 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"
	"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
}