本文整理匯總了Golang中github.com/qgweb/new/lib/mongodb.MongodbQueryConf.Index方法的典型用法代碼示例。如果您正苦於以下問題:Golang MongodbQueryConf.Index方法的具體用法?Golang MongodbQueryConf.Index怎麽用?Golang MongodbQueryConf.Index使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/qgweb/new/lib/mongodb.MongodbQueryConf
的用法示例。
在下文中一共展示了MongodbQueryConf.Index方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: cleanPutTable
func (this *Domain) cleanPutTable() {
qconf := mongodb.MongodbQueryConf{}
qconf.Db = "data_source"
qconf.Table = "urltrack_put"
qconf.Index = []string{"cids.id"}
this.mg.Drop(qconf)
this.mg.Create(qconf)
this.mg.EnsureIndex(qconf)
qconf.Index = []string{"adua"}
this.mg.EnsureIndex(qconf)
}
示例2: cleanPutTable
func (this *UserTrack) cleanPutTable() {
qconf := mongodb.MongodbQueryConf{}
qconf.Db = "data_source"
qconf.Table = "useraction_put"
qconf.Index = []string{"tag.tagId"}
this.mg.Drop(qconf)
this.mg.Create(qconf)
this.mg.EnsureIndex(qconf)
qconf.Index = []string{"adua"}
this.mg.EnsureIndex(qconf)
qconf.Index = []string{"AD"}
this.mg.EnsureIndex(qconf)
qconf = mongodb.MongodbQueryConf{}
qconf.Db = "data_source"
qconf.Table = "useraction_put_big"
qconf.Index = []string{"tag.tagId"}
this.mg_big.Drop(qconf)
this.mg_big.Create(qconf)
this.mg_big.EnsureIndex(qconf)
qconf.Index = []string{"adua"}
this.mg_big.EnsureIndex(qconf)
qconf.Index = []string{"AD"}
this.mg_big.EnsureIndex(qconf)
}