本文整理汇总了Golang中github.com/ziutek/mymysql/mysql.Row.Float方法的典型用法代码示例。如果您正苦于以下问题:Golang Row.Float方法的具体用法?Golang Row.Float怎么用?Golang Row.Float使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/ziutek/mymysql/mysql.Row
的用法示例。
在下文中一共展示了Row.Float方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: PopulateTestimonial
func (t Testimonial) PopulateTestimonial(row mysql.Row, res mysql.Result, ch chan Testimonial) {
testimonial := Testimonial{
ID: row.Int(res.Map("testimonialID")),
Rating: row.Float(res.Map("rating")),
Title: row.Str(res.Map("title")),
Content: row.Str(res.Map("testimonial")),
DateAdded: row.Time(res.Map("dateAdded"), UTC),
Approved: row.Bool(res.Map("approved")),
Active: row.Bool(res.Map("active")),
FirstName: row.Str(res.Map("first_name")),
LastName: row.Str(res.Map("last_name")),
Location: row.Str(res.Map("location")),
}
ch <- testimonial
}
示例2: PopulateLocation
func (c CustomerLocation) PopulateLocation(row mysql.Row, res mysql.Result, ch chan CustomerLocation) {
location := CustomerLocation{
ID: row.Int(res.Map("locationID")),
CustomerID: row.Int(res.Map("cust_id")),
Name: row.Str(res.Map("name")),
Address: row.Str(res.Map("address")),
City: row.Str(res.Map("city")),
StateID: row.Int(res.Map("stateID")),
PostalCode: row.Str(res.Map("postalCode")),
Email: row.Str(res.Map("email")),
Phone: row.Str(res.Map("phone")),
Fax: row.Str(res.Map("fax")),
Latitude: row.Float(res.Map("latitude")),
Longitude: row.Float(res.Map("longitude")),
ContactPerson: row.Str(res.Map("contact_person")),
IsPrimary: row.Bool(res.Map("isprimary")),
ShippingDefault: row.Bool(res.Map("ShippingDefault")),
}
ch <- location
}