How to define a _find query in couchdb mango with field names that start with dollar sign ($)

后端 未结 2 1053
独厮守ぢ
独厮守ぢ 2020-12-21 05:49

Many years ago we launched a project to manage semi-structured information for research projects. We used CouchDB, and at that time it was convenient for us to call the mand

相关标签:
2条回答
  • 2020-12-21 06:22

    As mentioned in this duplicate question, as well as on this CouchDB GitHub issue, this is possible by escaping the $ character:

    ... you can escape the dollar sign with \\$keyname.

    0 讨论(0)
  • 2020-12-21 06:23

    From the github issue, I got this answer, and I confirm it works.

    Looks like you can escape the dollar sign with \\$keyname.

    In my case, {"\\$type": "entry"}

    0 讨论(0)
提交回复
热议问题