我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

如何使用mgo构建$ setIsSubset的聚合

I tried to construct a pipeline with mgo, but I have no idea about how to use $setIsSubset operator.

Here is the example from mongodb doc shows the usage of $setIsSubSet. Is there anyone who can give me some tips? :-)

<code>

db.experiments.aggregate(
   [
       {$project: {A:1, B:1,AisSubset: {$setIsSubset: ["$A", "$B"]}, _id:0 }}
   ]
)

</code>

mongodb doc

近期文章

  • 我可以在AppEngineTokenSource中设置Subject(又名Prn)吗?
  • 如何在Golang程序中导入和使用.so文件
  • 在App Engine上返回Gzip版本的响应正文
  • 如何使用mgo从文档中解组命名类型别名?
  • SIGTRAP:Golang包装C库中的跟踪陷阱错误,但仅在运行go测试时
  • Go中的AppEngine不会从urlfetch.Head返回Content-Length
  • 成功删除stringutil.a,但会自动返回
  • lib / pq连接,但连接失败查询失败
  • 从emacs调用时,goimports的行为有所不同
  • golang和godep:使用godep时,在golang依赖项更新后进行Build \ install?
  • Go smtp.SendMail的X509证书问题
  • go-couchbase客户端更新功能
  • Golang-为什么在ServeHTTP函数中发生此错误:反射:调用reflect.Value.Call对零值
  • 生成go文件时出现未定义的错误
  • 在ubuntu上重新安装后无法运行go命令
  • GO:作为Fprintf参数传递的不正确的表单值类型
  • Golang:自定义模板功能“捕获”
  • 无法使gdb适用于Go 1.3程序
  • ql golang数据库(ql / cznic)
  • 在Go模板中使用{{}}原始表达式

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华