MemberOverJustOrNothingWithNulls.yqls 410 B

123456789101112
  1. (
  2. (let config (DataSource 'config))
  3. (let res_sink (DataSink 'result))
  4. (let myStruct (AsStruct '('a (String 'z)) '('b (Null))))
  5. (let typeOfMyStruct (TypeOf myStruct))
  6. (let world (Write! world res_sink (Key) (Member (Just myStruct) 'b) '('('type))))
  7. (let world (Write! world res_sink (Key) (Member (Nothing (OptionalType typeOfMyStruct)) 'b) '('('type))))
  8. (let world (Commit! world res_sink))
  9. (return world)
  10. )