inline_call.sql 479 B

12345678910111213141516171819202122232425262728
  1. /* postgres can not */
  2. /* syntax version 1 */
  3. use plato;
  4. $x = AsStruct(1 as a);
  5. select $x.a;
  6. $y = AsTuple(2,3);
  7. select $y.1;
  8. select length("foo");
  9. select Math::Pi();
  10. $f = () -> {
  11. return () -> {
  12. return AsDict(AsTuple("foo",AsList(AsStruct(AsTuple(1) as bar))));
  13. }
  14. };
  15. select $f()()["foo"][0].bar.0;
  16. select ()->{return 1}();
  17. $type = Callable<()->List<Int32>>;
  18. $g = AsStruct(Yql::Callable($type, ()->{return AsList(1,2,3)}) as foo);
  19. select $g.foo()[0];