postgres-mumu 0.1.2

postgrtes-mumu is a plugin for the mumu ecosystem
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extend("flow")
extend("postgres")

conn = pg:connect("postgres://tom:12345678@localhost/tom")

stream = pg:query(conn, `
  SELECT (random() * 1000000)::integer AS random_number
  FROM generate_series(1, 2000000);
`)

flow:compose(
  slog,
  flow:throttle(1000),
  flow:slice(1,4),
  flow:trans(row => row["random_number"])
)(stream)