What does the SQueryL tilde operator do?

I read the SQueryL update documentation and I saw:

update(songs)(s =>
  where(s.title === "Watermelon Man")
  set(s.title := "The Watermelon Man",
      s.year  := s.year.~ + 1)
)

It was hard for me to find the ~ method from SQueryL source code, and the related documentation obviously doesn't tell me what it does. Anyone want to explain?

+3
source share
1 answer

I remember how recently I read about the tilde operation on the Schema Page page. It's about the ambiguity between the primitive and the regular type, though (since I'm just starting to learn Scala), this still sounds a bit vague to me;). To quote a small part

...

important: in PrimitiveTypes mode, there may be ambiguities between numeric operators

org.squeryl.PrimitiveTypeMode , . . ~ , , - node TypedExpressionNode [Int], , LogicalBoolean - , where:

...

, .

+4

Source: https://habr.com/ru/post/1780996/


All Articles