mysql:xdevapi'collection.modify;什么都不做

发布于 2025-01-29 17:58:13 字数 387 浏览 4 评论 0原文

我正在使用nodejs测试mySQL 8“ xdevapi”,并且我正在尝试在此处修改文档中的字段

是代码:

let vModifyOp=await vCollection.modify('_id = "000062817c620000000000000001"').set('wName','toto');

  • 我没有任何错误或异常
  • VCollections是“ MySQL XDEV集合”,“ VCollection.getOne”
  • 当然可以正常工作,该文档存在

我在做什么错?

I'm testing MySql 8 "XDevApi" with Nodejs, and I'm trying to modify a field in a document

Here is the code :

let vModifyOp=await vCollection.modify('_id = "000062817c620000000000000001"').set('wName','toto');

  • I don't have any errors or exceptions
  • vCollection is a "MySql xDev collection" , "vCollection.getOne" is working fine
  • Of course, the document exist

What Am I doing wrong ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

玉环 2025-02-05 17:58:13

终于我自己找到了解决方案。我们必须致电vmodifyop.ectute,因此代码将是:

let vModifyOp=await vCollection.modify('_id = "000062817c620000000000000001"').set('wName','toto');
vModifyOp.execute();

但是“执行”未在有关“ Collection.modify”的官方文档中指定。

Finally I found the solution by myself. We have to call vModifyOp.execute, so the code will be :

let vModifyOp=await vCollection.modify('_id = "000062817c620000000000000001"').set('wName','toto');
vModifyOp.execute();

But the "execute" is not specified in the official documentation concerning the "collection.modify"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文