list_takeskipwhileinclusive.sql 500 B

1234567891011
  1. /* postgres can not */
  2. /* syntax version 1 */
  3. $a = AsList(1,2,3,1,2,3);
  4. select
  5. ListTakeWhileInclusive($a,($x)->{return $x<3}),
  6. ListSkipWhileInclusive($a,($x)->{return $x<3}),
  7. Yql::Collect(YQL::TakeWhileInclusive(Yql::Iterator($a,Yql::DependsOn(1)),($x)->{return $x<3})),
  8. Yql::Collect(YQL::SkipWhileInclusive(Yql::Iterator($a,Yql::DependsOn(2)),($x)->{return $x<3})),
  9. Yql::TakeWhileInclusive(Just(1),($x)->{return $x<3}),
  10. Yql::SkipWhileInclusive(Just(1),($x)->{return $x<3});