本文整理匯總了Golang中github.com/vattle/sqlboiler/queries.MakeStructMapping函數的典型用法代碼示例。如果您正苦於以下問題:Golang MakeStructMapping函數的具體用法?Golang MakeStructMapping怎麽用?Golang MakeStructMapping使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了MakeStructMapping函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
type (
// StockPubSlice is an alias for a slice of pointers to StockPub.
// This should generally be used opposed to []StockPub.
StockPubSlice []*StockPub
// StockPubHook is the signature for custom StockPub hook methods
StockPubHook func(boil.Executor, *StockPub) error
stockPubQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
stockPubType = reflect.TypeOf(&StockPub{})
stockPubMapping = queries.MakeStructMapping(stockPubType)
stockPubPrimaryKeyMapping, _ = queries.BindMapping(stockPubType, stockPubMapping, stockPubPrimaryKeyColumns)
stockPubInsertCacheMut sync.RWMutex
stockPubInsertCache = make(map[string]insertCache)
stockPubUpdateCacheMut sync.RWMutex
stockPubUpdateCache = make(map[string]updateCache)
stockPubUpsertCacheMut sync.RWMutex
stockPubUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例2:
type (
// FeaturepropSlice is an alias for a slice of pointers to Featureprop.
// This should generally be used opposed to []Featureprop.
FeaturepropSlice []*Featureprop
// FeaturepropHook is the signature for custom Featureprop hook methods
FeaturepropHook func(boil.Executor, *Featureprop) error
featurepropQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
featurepropType = reflect.TypeOf(&Featureprop{})
featurepropMapping = queries.MakeStructMapping(featurepropType)
featurepropPrimaryKeyMapping, _ = queries.BindMapping(featurepropType, featurepropMapping, featurepropPrimaryKeyColumns)
featurepropInsertCacheMut sync.RWMutex
featurepropInsertCache = make(map[string]insertCache)
featurepropUpdateCacheMut sync.RWMutex
featurepropUpdateCache = make(map[string]updateCache)
featurepropUpsertCacheMut sync.RWMutex
featurepropUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例3:
type (
// FeatureDbxrefSlice is an alias for a slice of pointers to FeatureDbxref.
// This should generally be used opposed to []FeatureDbxref.
FeatureDbxrefSlice []*FeatureDbxref
// FeatureDbxrefHook is the signature for custom FeatureDbxref hook methods
FeatureDbxrefHook func(boil.Executor, *FeatureDbxref) error
featureDbxrefQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
featureDbxrefType = reflect.TypeOf(&FeatureDbxref{})
featureDbxrefMapping = queries.MakeStructMapping(featureDbxrefType)
featureDbxrefPrimaryKeyMapping, _ = queries.BindMapping(featureDbxrefType, featureDbxrefMapping, featureDbxrefPrimaryKeyColumns)
featureDbxrefInsertCacheMut sync.RWMutex
featureDbxrefInsertCache = make(map[string]insertCache)
featureDbxrefUpdateCacheMut sync.RWMutex
featureDbxrefUpdateCache = make(map[string]updateCache)
featureDbxrefUpsertCacheMut sync.RWMutex
featureDbxrefUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例4:
type (
// AnalysisfeatureSlice is an alias for a slice of pointers to Analysisfeature.
// This should generally be used opposed to []Analysisfeature.
AnalysisfeatureSlice []*Analysisfeature
// AnalysisfeatureHook is the signature for custom Analysisfeature hook methods
AnalysisfeatureHook func(boil.Executor, *Analysisfeature) error
analysisfeatureQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
analysisfeatureType = reflect.TypeOf(&Analysisfeature{})
analysisfeatureMapping = queries.MakeStructMapping(analysisfeatureType)
analysisfeaturePrimaryKeyMapping, _ = queries.BindMapping(analysisfeatureType, analysisfeatureMapping, analysisfeaturePrimaryKeyColumns)
analysisfeatureInsertCacheMut sync.RWMutex
analysisfeatureInsertCache = make(map[string]insertCache)
analysisfeatureUpdateCacheMut sync.RWMutex
analysisfeatureUpdateCache = make(map[string]updateCache)
analysisfeatureUpsertCacheMut sync.RWMutex
analysisfeatureUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例5:
type (
// FeatureRelationshippropPubSlice is an alias for a slice of pointers to FeatureRelationshippropPub.
// This should generally be used opposed to []FeatureRelationshippropPub.
FeatureRelationshippropPubSlice []*FeatureRelationshippropPub
// FeatureRelationshippropPubHook is the signature for custom FeatureRelationshippropPub hook methods
FeatureRelationshippropPubHook func(boil.Executor, *FeatureRelationshippropPub) error
featureRelationshippropPubQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
featureRelationshippropPubType = reflect.TypeOf(&FeatureRelationshippropPub{})
featureRelationshippropPubMapping = queries.MakeStructMapping(featureRelationshippropPubType)
featureRelationshippropPubPrimaryKeyMapping, _ = queries.BindMapping(featureRelationshippropPubType, featureRelationshippropPubMapping, featureRelationshippropPubPrimaryKeyColumns)
featureRelationshippropPubInsertCacheMut sync.RWMutex
featureRelationshippropPubInsertCache = make(map[string]insertCache)
featureRelationshippropPubUpdateCacheMut sync.RWMutex
featureRelationshippropPubUpdateCache = make(map[string]updateCache)
featureRelationshippropPubUpsertCacheMut sync.RWMutex
featureRelationshippropPubUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例6:
type (
// StockRelationshipCvtermSlice is an alias for a slice of pointers to StockRelationshipCvterm.
// This should generally be used opposed to []StockRelationshipCvterm.
StockRelationshipCvtermSlice []*StockRelationshipCvterm
// StockRelationshipCvtermHook is the signature for custom StockRelationshipCvterm hook methods
StockRelationshipCvtermHook func(boil.Executor, *StockRelationshipCvterm) error
stockRelationshipCvtermQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
stockRelationshipCvtermType = reflect.TypeOf(&StockRelationshipCvterm{})
stockRelationshipCvtermMapping = queries.MakeStructMapping(stockRelationshipCvtermType)
stockRelationshipCvtermPrimaryKeyMapping, _ = queries.BindMapping(stockRelationshipCvtermType, stockRelationshipCvtermMapping, stockRelationshipCvtermPrimaryKeyColumns)
stockRelationshipCvtermInsertCacheMut sync.RWMutex
stockRelationshipCvtermInsertCache = make(map[string]insertCache)
stockRelationshipCvtermUpdateCacheMut sync.RWMutex
stockRelationshipCvtermUpdateCache = make(map[string]updateCache)
stockRelationshipCvtermUpsertCacheMut sync.RWMutex
stockRelationshipCvtermUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例7:
type (
// StockcollectionSlice is an alias for a slice of pointers to Stockcollection.
// This should generally be used opposed to []Stockcollection.
StockcollectionSlice []*Stockcollection
// StockcollectionHook is the signature for custom Stockcollection hook methods
StockcollectionHook func(boil.Executor, *Stockcollection) error
stockcollectionQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
stockcollectionType = reflect.TypeOf(&Stockcollection{})
stockcollectionMapping = queries.MakeStructMapping(stockcollectionType)
stockcollectionPrimaryKeyMapping, _ = queries.BindMapping(stockcollectionType, stockcollectionMapping, stockcollectionPrimaryKeyColumns)
stockcollectionInsertCacheMut sync.RWMutex
stockcollectionInsertCache = make(map[string]insertCache)
stockcollectionUpdateCacheMut sync.RWMutex
stockcollectionUpdateCache = make(map[string]updateCache)
stockcollectionUpsertCacheMut sync.RWMutex
stockcollectionUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例8:
type (
// PhenotypepropSlice is an alias for a slice of pointers to Phenotypeprop.
// This should generally be used opposed to []Phenotypeprop.
PhenotypepropSlice []*Phenotypeprop
// PhenotypepropHook is the signature for custom Phenotypeprop hook methods
PhenotypepropHook func(boil.Executor, *Phenotypeprop) error
phenotypepropQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
phenotypepropType = reflect.TypeOf(&Phenotypeprop{})
phenotypepropMapping = queries.MakeStructMapping(phenotypepropType)
phenotypepropPrimaryKeyMapping, _ = queries.BindMapping(phenotypepropType, phenotypepropMapping, phenotypepropPrimaryKeyColumns)
phenotypepropInsertCacheMut sync.RWMutex
phenotypepropInsertCache = make(map[string]insertCache)
phenotypepropUpdateCacheMut sync.RWMutex
phenotypepropUpdateCache = make(map[string]updateCache)
phenotypepropUpsertCacheMut sync.RWMutex
phenotypepropUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例9:
type (
// CvtermpropSlice is an alias for a slice of pointers to Cvtermprop.
// This should generally be used opposed to []Cvtermprop.
CvtermpropSlice []*Cvtermprop
// CvtermpropHook is the signature for custom Cvtermprop hook methods
CvtermpropHook func(boil.Executor, *Cvtermprop) error
cvtermpropQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
cvtermpropType = reflect.TypeOf(&Cvtermprop{})
cvtermpropMapping = queries.MakeStructMapping(cvtermpropType)
cvtermpropPrimaryKeyMapping, _ = queries.BindMapping(cvtermpropType, cvtermpropMapping, cvtermpropPrimaryKeyColumns)
cvtermpropInsertCacheMut sync.RWMutex
cvtermpropInsertCache = make(map[string]insertCache)
cvtermpropUpdateCacheMut sync.RWMutex
cvtermpropUpdateCache = make(map[string]updateCache)
cvtermpropUpsertCacheMut sync.RWMutex
cvtermpropUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例10:
type (
// PhendescSlice is an alias for a slice of pointers to Phendesc.
// This should generally be used opposed to []Phendesc.
PhendescSlice []*Phendesc
// PhendescHook is the signature for custom Phendesc hook methods
PhendescHook func(boil.Executor, *Phendesc) error
phendescQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
phendescType = reflect.TypeOf(&Phendesc{})
phendescMapping = queries.MakeStructMapping(phendescType)
phendescPrimaryKeyMapping, _ = queries.BindMapping(phendescType, phendescMapping, phendescPrimaryKeyColumns)
phendescInsertCacheMut sync.RWMutex
phendescInsertCache = make(map[string]insertCache)
phendescUpdateCacheMut sync.RWMutex
phendescUpdateCache = make(map[string]updateCache)
phendescUpsertCacheMut sync.RWMutex
phendescUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例11:
type (
// StockcollectionpropSlice is an alias for a slice of pointers to Stockcollectionprop.
// This should generally be used opposed to []Stockcollectionprop.
StockcollectionpropSlice []*Stockcollectionprop
// StockcollectionpropHook is the signature for custom Stockcollectionprop hook methods
StockcollectionpropHook func(boil.Executor, *Stockcollectionprop) error
stockcollectionpropQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
stockcollectionpropType = reflect.TypeOf(&Stockcollectionprop{})
stockcollectionpropMapping = queries.MakeStructMapping(stockcollectionpropType)
stockcollectionpropPrimaryKeyMapping, _ = queries.BindMapping(stockcollectionpropType, stockcollectionpropMapping, stockcollectionpropPrimaryKeyColumns)
stockcollectionpropInsertCacheMut sync.RWMutex
stockcollectionpropInsertCache = make(map[string]insertCache)
stockcollectionpropUpdateCacheMut sync.RWMutex
stockcollectionpropUpdateCache = make(map[string]updateCache)
stockcollectionpropUpsertCacheMut sync.RWMutex
stockcollectionpropUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例12:
type (
// JbrowseOrganismSlice is an alias for a slice of pointers to JbrowseOrganism.
// This should generally be used opposed to []JbrowseOrganism.
JbrowseOrganismSlice []*JbrowseOrganism
// JbrowseOrganismHook is the signature for custom JbrowseOrganism hook methods
JbrowseOrganismHook func(boil.Executor, *JbrowseOrganism) error
jbrowseOrganismQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
jbrowseOrganismType = reflect.TypeOf(&JbrowseOrganism{})
jbrowseOrganismMapping = queries.MakeStructMapping(jbrowseOrganismType)
jbrowseOrganismPrimaryKeyMapping, _ = queries.BindMapping(jbrowseOrganismType, jbrowseOrganismMapping, jbrowseOrganismPrimaryKeyColumns)
jbrowseOrganismInsertCacheMut sync.RWMutex
jbrowseOrganismInsertCache = make(map[string]insertCache)
jbrowseOrganismUpdateCacheMut sync.RWMutex
jbrowseOrganismUpdateCache = make(map[string]updateCache)
jbrowseOrganismUpsertCacheMut sync.RWMutex
jbrowseOrganismUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例13:
type (
// StockCvtermpropSlice is an alias for a slice of pointers to StockCvtermprop.
// This should generally be used opposed to []StockCvtermprop.
StockCvtermpropSlice []*StockCvtermprop
// StockCvtermpropHook is the signature for custom StockCvtermprop hook methods
StockCvtermpropHook func(boil.Executor, *StockCvtermprop) error
stockCvtermpropQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
stockCvtermpropType = reflect.TypeOf(&StockCvtermprop{})
stockCvtermpropMapping = queries.MakeStructMapping(stockCvtermpropType)
stockCvtermpropPrimaryKeyMapping, _ = queries.BindMapping(stockCvtermpropType, stockCvtermpropMapping, stockCvtermpropPrimaryKeyColumns)
stockCvtermpropInsertCacheMut sync.RWMutex
stockCvtermpropInsertCache = make(map[string]insertCache)
stockCvtermpropUpdateCacheMut sync.RWMutex
stockCvtermpropUpdateCache = make(map[string]updateCache)
stockCvtermpropUpsertCacheMut sync.RWMutex
stockCvtermpropUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例14:
type (
// StockDbxrefSlice is an alias for a slice of pointers to StockDbxref.
// This should generally be used opposed to []StockDbxref.
StockDbxrefSlice []*StockDbxref
// StockDbxrefHook is the signature for custom StockDbxref hook methods
StockDbxrefHook func(boil.Executor, *StockDbxref) error
stockDbxrefQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
stockDbxrefType = reflect.TypeOf(&StockDbxref{})
stockDbxrefMapping = queries.MakeStructMapping(stockDbxrefType)
stockDbxrefPrimaryKeyMapping, _ = queries.BindMapping(stockDbxrefType, stockDbxrefMapping, stockDbxrefPrimaryKeyColumns)
stockDbxrefInsertCacheMut sync.RWMutex
stockDbxrefInsertCache = make(map[string]insertCache)
stockDbxrefUpdateCacheMut sync.RWMutex
stockDbxrefUpdateCache = make(map[string]updateCache)
stockDbxrefUpsertCacheMut sync.RWMutex
stockDbxrefUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)
示例15:
type (
// DbxrefpropSlice is an alias for a slice of pointers to Dbxrefprop.
// This should generally be used opposed to []Dbxrefprop.
DbxrefpropSlice []*Dbxrefprop
// DbxrefpropHook is the signature for custom Dbxrefprop hook methods
DbxrefpropHook func(boil.Executor, *Dbxrefprop) error
dbxrefpropQuery struct {
*queries.Query
}
)
// Cache for insert, update and upsert
var (
dbxrefpropType = reflect.TypeOf(&Dbxrefprop{})
dbxrefpropMapping = queries.MakeStructMapping(dbxrefpropType)
dbxrefpropPrimaryKeyMapping, _ = queries.BindMapping(dbxrefpropType, dbxrefpropMapping, dbxrefpropPrimaryKeyColumns)
dbxrefpropInsertCacheMut sync.RWMutex
dbxrefpropInsertCache = make(map[string]insertCache)
dbxrefpropUpdateCacheMut sync.RWMutex
dbxrefpropUpdateCache = make(map[string]updateCache)
dbxrefpropUpsertCacheMut sync.RWMutex
dbxrefpropUpsertCache = make(map[string]insertCache)
)
var (
// Force time package dependency for automated UpdatedAt/CreatedAt.
_ = time.Second
// Force bytes in case of primary key column that uses []byte (for relationship compares)
_ = bytes.MinRead
)