aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/s-expressions/suites/Result/WorldIf.yql
blob: a634dbecb25f5cbb12f9d2fa9aa3c763eb1e2ea5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(
#comment
(let mr_source (DataSource 'yt 'plato))
(let x (Read! world mr_source (Key '('table (String 'Input))) '('key 'subkey 'value) '()))
(let world (Left! x))
(let table1 (Right! x))
(let tresh (String '100))
(let table1low (Filter table1 (lambda '(item) (< (Member item 'key) tresh))))
(let res_sink (DataSink 'result))

(let world (Write! world res_sink (Key) (String '1) '()))
(let world (If! world (Bool 'false) (Write! world res_sink (Key) table1low '()) world))
(let world (Commit! world res_sink))

(let world (Write! world res_sink (Key) (String '2) '()))
(let world (If! world (Bool 'true) (Write! world res_sink (Key) table1low '()) world))
(let world (Commit! world res_sink))

(let world (Write! world res_sink (Key) (String '3) '()))
(let world (If! world (<= (Length table1low) (Uint64 '1))
   (Write! world res_sink (Key) table1low '()) 
   (Write! world res_sink (Key) table1 '())))
(let world (Commit! world res_sink))

(return world)
)