当前位置: 首页>>代码示例>>Golang>>正文


Golang Row.Int方法代码示例

本文整理汇总了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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:7,代码来源:contact_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:33,代码来源:sitecontent_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:8,代码来源:location_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:8,代码来源:customer_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:8,代码来源:customer_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:8,代码来源:faq_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:9,代码来源:customer_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:9,代码来源:location_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:9,代码来源:blog_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:9,代码来源:salesreps_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:9,代码来源:landingpage_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:10,代码来源:contact_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:10,代码来源:customer_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:13,代码来源:blog_mdl.go

示例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
}
开发者ID:janiukjf,项目名称:GoAdmin,代码行数:13,代码来源:news_mdl.go


注:本文中的github.com/ziutek/mymysql/mysql.Row.Int方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。