func (q contentUnitDerivationQuery) One() (*ContentUnitDerivation, error) {
	o := &ContentUnitDerivation{}
	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_unit_derivations")
	}
	return o, nil
}
One returns a single contentUnitDerivation record from the query.
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 ContentUnitDerivation struct {
	SourceID  int64  `boil:"source_id" json:"source_id" toml:"source_id" yaml:"source_id"`
	DerivedID int64  `boil:"derived_id" json:"derived_id" toml:"derived_id" yaml:"derived_id"`
	Name      string `boil:"name" json:"name" toml:"name" yaml:"name"`
	R *contentUnitDerivationR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L contentUnitDerivationL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}
var ContentUnitDerivationColumns = struct {
	SourceID  string
	DerivedID string
	Name      string
}{
	SourceID:  "source_id",
	DerivedID: "derived_id",
	Name:      "name",
}
type contentUnitDerivationR struct {
	Derived *ContentUnit
	Source  *ContentUnit
}
type contentUnitDerivationL struct{}
var (
	contentUnitDerivationColumns               = []string{"source_id", "derived_id", "name"}
	contentUnitDerivationColumnsWithoutDefault = []string{"source_id", "derived_id", "name"}
	contentUnitDerivationColumnsWithDefault    = []string{}
	contentUnitDerivationPrimaryKeyColumns     = []string{"source_id", "derived_id"}
)
type (
	ContentUnitDerivationSlice []*ContentUnitDerivation
	contentUnitDerivationQuery struct {
		*queries.Query
	}
)
var (
	contentUnitDerivationType                 = reflect.TypeOf(&ContentUnitDerivation{})
	contentUnitDerivationMapping              = queries.MakeStructMapping(contentUnitDerivationType)
	contentUnitDerivationPrimaryKeyMapping, _ = queries.BindMapping(contentUnitDerivationType, contentUnitDerivationMapping, contentUnitDerivationPrimaryKeyColumns)
	contentUnitDerivationInsertCacheMut       sync.RWMutex
	contentUnitDerivationInsertCache          = make(map[string]insertCache)
	contentUnitDerivationUpdateCacheMut       sync.RWMutex
	contentUnitDerivationUpdateCache          = make(map[string]updateCache)
	contentUnitDerivationUpsertCacheMut       sync.RWMutex
	contentUnitDerivationUpsertCache          = make(map[string]insertCache)
)
var (
	_ = time.Second
	_ = bytes.MinRead
)
func (q contentUnitDerivationQuery) OneP() *ContentUnitDerivation {
	o, err := q.One()
	if err != nil {
		panic(boil.WrapErr(err))
	}
	return o
}