本文整理汇总了Golang中github.com/ziutek/mymysql/mysql.Result.Map方法的典型用法代码示例。如果您正苦于以下问题:Golang Result.Map方法的具体用法?Golang Result.Map怎么用?Golang Result.Map使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/ziutek/mymysql/mysql.Result
的用法示例。
在下文中一共展示了Result.Map方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: PopulateContactType
func PopulateContactType(row mysql.Row, res mysql.Result, ch chan ContactType) {
ctype := ContactType{
ID: row.Int(res.Map("contactTypeID")),
Name: row.Str(res.Map("name")),
}
ch <- ctype
}
示例2: PopulateTier
func (d DealerTier) PopulateTier(row mysql.Row, res mysql.Result, ch chan DealerTier) {
tier := DealerTier{
ID: row.Int(res.Map("ID")),
Name: row.Str(res.Map("tier")),
Sort: row.Int(res.Map("sort")),
}
ch <- tier
}
示例3: PopulateCountry
func (c Country) PopulateCountry(row mysql.Row, res mysql.Result, ch chan Country) {
country := Country{
ID: row.Int(res.Map("countryID")),
Name: row.Str(res.Map("name")),
Abbr: row.Str(res.Map("abbr")),
}
ch <- country
}
示例4: PopulateIcon
func (m MapIcon) PopulateIcon(row mysql.Row, res mysql.Result, ch chan MapIcon) {
icon := MapIcon{
ID: row.Int(res.Map("ID")),
DealerTierID: row.Int(res.Map("tier")),
DealerTypeID: row.Int(res.Map("dealer_type")),
MapIcon: row.Str(res.Map("mapicon")),
MapIconShadow: row.Str(res.Map("mapiconshadow")),
}
ch <- icon
}
示例5: PopulateType
func (d DealerType) PopulateType(row mysql.Row, res mysql.Result, ch chan DealerType) {
dealertype := DealerType{
ID: row.Int(res.Map("dealer_type")),
Name: row.Str(res.Map("type")),
Online: row.Bool(res.Map("online")),
Show: row.Bool(res.Map("show")),
Label: row.Str(res.Map("label")),
}
ch <- dealertype
}
示例6: PopulateState
func (s State) PopulateState(row mysql.Row, res mysql.Result, ch chan State) {
state := State{
ID: row.Int(res.Map("stateID")),
CountryID: row.Int(res.Map("countryID")),
Name: row.Str(res.Map("state")),
Abbr: row.Str(res.Map("abbr")),
}
ch <- state
}
示例7: populateLandingPageData
func (l LandingPage) populateLandingPageData(row mysql.Row, res mysql.Result, ch chan LandingPageData) {
data := LandingPageData{
ID: row.Int(res.Map("id")),
LandingPageID: row.Int(res.Map("landingPageID")),
Key: row.Str(res.Map("dataKey")),
Value: row.Str(res.Map("dataValue")),
}
ch <- data
}
示例8: populateLandingPageImage
func (l LandingPage) populateLandingPageImage(row mysql.Row, res mysql.Result, ch chan LandingPageImage) {
image := LandingPageImage{
ID: row.Int(res.Map("id")),
LandingPageID: row.Int(res.Map("landingPageID")),
URL: row.Str(res.Map("url")),
Sort: row.Int(res.Map("sort")),
}
ch <- image
}
示例9: PopulateContactReceiver
func (r ContactReceiver) PopulateContactReceiver(row mysql.Row, res mysql.Result, ch chan ContactReceiver) {
receiver := ContactReceiver{
ID: row.Int(res.Map("contactReceiverID")),
FirstName: row.Str(res.Map("first_name")),
LastName: row.Str(res.Map("last_name")),
Email: row.Str(res.Map("email")),
}
receiver.GetTypes()
ch <- receiver
}
示例10: PopulateRevision
func PopulateRevision(row mysql.Row, res mysql.Result, ch chan ContentRevision) {
var revision ContentRevision
id := res.Map("revisionID")
contentID := res.Map("contentID")
contentText := res.Map("content_text")
createdOn := res.Map("createdOn")
active := res.Map("active")
revision = ContentRevision{
ID: row.Int(id),
ContentID: row.Int(contentID),
ContentText: row.Str(contentText),
CreatedOn: row.Time(createdOn, UTC),
Active: row.Bool(active),
}
ch <- revision
}
示例11: PopulateFAQ
func (f *FAQ) PopulateFAQ(row mysql.Row, res mysql.Result, ch chan FAQ) {
faq := FAQ{
ID: row.Int(res.Map("faqID")),
Question: row.Str(res.Map("question")),
Answer: row.Str(res.Map("answer")),
}
ch <- faq
}
示例12: PopulateCode
func (m MapicsCode) PopulateCode(row mysql.Row, res mysql.Result, ch chan MapicsCode) {
code := MapicsCode{
ID: row.Int(res.Map("mCodeID")),
Code: row.Str(res.Map("code")),
Description: row.Str(res.Map("description")),
}
ch <- code
}
示例13: PopulateSalesRep
func (s SalesRep) PopulateSalesRep(row mysql.Row, res mysql.Result, ch chan SalesRep) {
rep := SalesRep{
ID: row.Int(res.Map("salesRepID")),
Name: row.Str(res.Map("name")),
Code: row.Str(res.Map("code")),
CustomerCount: row.Int(res.Map("customercount")),
}
ch <- rep
}
示例14: PopulateSimpleCustomer
func (c Customer) PopulateSimpleCustomer(row mysql.Row, res mysql.Result, ch chan Customer) {
customer := Customer{
ID: row.Int(res.Map("cust_id")),
Name: row.Str(res.Map("name")),
CustomerID: row.Int(res.Map("customerID")),
}
ch <- customer
}
示例15: PopulateCategory
func (c BlogCategory) PopulateCategory(row mysql.Row, res mysql.Result, ch chan BlogCategory) {
category := BlogCategory{
ID: row.Int(res.Map("blogCategoryID")),
Name: row.Str(res.Map("name")),
Slug: row.Str(res.Map("slug")),
Active: row.Bool(res.Map("active")),
}
ch <- category
}