为 ReactiveMongo 1.xx 实现自定义命令
在commands.scala文件中
trait Command {
private[reactivemongo] def commandKind: CommandKind
}
这与以前的版本(0.20.x 及更早版本)有明显的区别。
通过更改此特征,可以使任何自定义命令实现都强制执行名为 commandKind 的 def 。
这是否意味着继续实现自定义 ReactiveMongo 命令必须始终通过将包 [reactivemongo] 引入到我们自己的项目中来完成?
这是相当令人困惑的,因为给出的示例中似乎不存在该要求 这里
In the commands.scala file here of the ReactiveMongo Github repo, we are seeing the following :
trait Command {
private[reactivemongo] def commandKind: CommandKind
}
This is a clear difference from previousl releases (0.20.x and earlier).
By changing this trait, one is making the implementation of a def named commandKind mandatory for any custom command implementation.
Does this mean that going forward implementing a custom ReactiveMongo command must always be done by introducing the package [reactivemongo] into our own projects ?
This is rather confusing, as that requirement appears to be absent in the examples given here
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论