本文整理汇总了Golang中github.com/ziutek/mymysql/mysql.Row.Int方法的典型用法代码示例。如果您正苦于以下问题:Golang Row.Int方法的具体用法?Golang Row.Int怎么用?Golang Row.Int使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/ziutek/mymysql/mysql.Row
的用法示例。
在下文中一共展示了Row.Int方法的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: PopulateMenuItem
func PopulateMenuItem(row mysql.Row, res mysql.Result, ch chan MenuItem) {
var item MenuItem
mcid := res.Map("menuContentID")
menuID := res.Map("menuID")
contentID := res.Map("contentID")
menuSort := res.Map("menuSort")
menuTitle := res.Map("menuTitle")
menuLink := res.Map("menuLink")
parentID := res.Map("parentID")
linkTarget := res.Map("linkTarget")
id := row.Int(mcid)
if id > 0 {
cid := row.Int(contentID)
cch := make(chan Content)
go PopulateContent(row, res, cch)
item = MenuItem{
ID: id,
MenuID: row.Int(menuID),
ContentID: cid,
Sort: row.Int(menuSort),
Title: row.Str(menuTitle),
Link: row.Str(menuLink),
ParentID: row.Int(parentID),
LinkTarget: row.Bool(linkTarget),
Content: <-cch,
}
}
ch <- item
}
示例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: 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
}
示例5: 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
}
示例6: 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
}
示例7: 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
}
示例8: 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
}
示例9: 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
}
示例10: 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
}
示例11: 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
}
示例12: 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
}
示例13: 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
}
示例14: PopulateComment
func (c Comment) PopulateComment(row mysql.Row, res mysql.Result, ch chan Comment) {
comment := Comment{
ID: row.Int(res.Map("commentID")),
PostID: row.Int(res.Map("blogPostID")),
Name: row.Str(res.Map("name")),
Email: row.Str(res.Map("email")),
Comment: row.Str(res.Map("comment_text")),
Created: row.Time(res.Map("createdDate"), UTC),
Approved: row.Bool(res.Map("approved")),
Active: row.Bool(res.Map("active")),
}
ch <- comment
}
示例15: PopulateNewsItem
func (n NewsItem) PopulateNewsItem(row mysql.Row, res mysql.Result, ch chan NewsItem) {
item := NewsItem{
ID: row.Int(res.Map("newsItemID")),
Title: row.Str(res.Map("title")),
Lead: row.Str(res.Map("lead")),
Content: row.Str(res.Map("content")),
PublishStart: row.Time(res.Map("publishStart"), UTC),
PublishEnd: row.Time(res.Map("publishEnd"), UTC),
Active: row.Bool(res.Map("active")),
Slug: row.Str(res.Map("slug")),
}
ch <- item
}