AutoConvertCoalesce.yqls 694 B

123456789101112131415
  1. (
  2. (let config (DataSource 'config))
  3. (let res_sink (DataSink 'result))
  4. (let data (Coalesce (Nothing (OptionalType (DataType 'Uint32))) (Uint64 '1)))
  5. (let world (Write! world res_sink (Key) data '('('type))))
  6. (let data (Coalesce (Nothing (OptionalType (DataType 'Uint64))) (Int64 '2)))
  7. (let world (Write! world res_sink (Key) data '('('type))))
  8. (let data (Coalesce (Nothing (OptionalType (DataType 'Int64))) (+ (Uint32 '1) (Uint32 '2))))
  9. (let world (Write! world res_sink (Key) data '('('type))))
  10. (let data (Coalesce (Nothing (OptionalType (DataType 'Uint32))) (Just (Uint32 '4))))
  11. (let world (Write! world res_sink (Key) data '('('type))))
  12. (let world (Commit! world res_sink))
  13. (return world)
  14. )