Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何插入动态数据 #48

Open
yuanhuihai opened this issue Aug 16, 2020 · 1 comment
Open

如何插入动态数据 #48

yuanhuihai opened this issue Aug 16, 2020 · 1 comment

Comments

@yuanhuihai
Copy link

cloud_api.db_add()指令中,data数据是写死的,如何传递动态数据[](url)
resp = cloud_api.db_add( json_body={"env": env, "query": 'db.collection("example").add({data: [{age: 12}]})'} )
如何修改data数据

@gusibi
Copy link
Owner

gusibi commented Aug 17, 2020

这里 'db.collection("example").add({data: [{age: 12}]})' 是query 参数的值,需要整体替换掉,语法类似于mongodb,可以参考小程序的文档

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants