【发布时间】:2019-05-21 23:50:25
【问题描述】:
您好 :) 我正在开发一个链接到 mongo DB 的 golang 应用程序(我使用官方驱动程序:mongo-go),这是我的问题,我想执行此功能
db.rmTickets.find().forEach(function(doc) {
doc.created=new Date(doc.created)
doc.updated=new Date(doc.updated)
doc.deadline=new Date(doc.deadline)
doc.dateEstimationDelivery=new Date(doc.dateEstimationDelivery)
doc.dateTransmitDemand=new Date(doc.dateTransmitDemand)
doc.dateTransmitQuotation=new Date(doc.dateTransmitQuotation)
doc.dateValidationQuotation=new Date(doc.dateValidationQuotation)
doc.dateDeliveryCS=new Date(doc.dateDeliveryCS)
db.rmTickets.save(doc)
})
我在 godoc 上看到 Database.RunCommand() 存在,但我不确定如何使用它。
如果有人可以帮助:)
谢谢
【问题讨论】:
-
嗨。您是否已经尝试过,分享一些代码。您有具体问题吗?