SQueryL 波浪线运算符有什么作用?
我正在阅读有关更新的 SQueryL 文档,我发现:
update(songs)(s =>
where(s.title === "Watermelon Man")
set(s.title := "The Watermelon Man",
s.year := s.year.~ + 1)
)
我很难找到SQueryL 源代码和链接文档中的 ~ 方法显然也没有告诉我它的作用。有人愿意解释一下吗?
I was reading the SQueryL documentation on updating and I saw:
update(songs)(s =>
where(s.title === "Watermelon Man")
set(s.title := "The Watermelon Man",
s.year := s.year.~ + 1)
)
I had a hard time finding the ~ method from the SQueryL source code and the linked documentation obviously doesn't tell me what it does either. Does anyone care to explain?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我记得不久前在架构定义页面上读到过有关波形符运算符的内容。
它是关于消除原始类型和自定义类型之间的歧义,尽管(因为我刚刚开始学习 Scala)它对我来说仍然有点模糊;)。引用一小段
希望有帮助。
I recall reading about the tilde operator not too long ago on the Schema Definition Page.
It is about disambiguating between a primitive and a custom type, although (as I am just beginning to learn Scala) it still sounds a bit vague to me ;). To quote a little piece
Hope that helps.