-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommand_types.txt
More file actions
73 lines (62 loc) · 1.97 KB
/
command_types.txt
File metadata and controls
73 lines (62 loc) · 1.97 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
- adds columns to each row such that the names and value of the columns are a function of other columns in each row and user input
-- operates: one row at a time
-- input: row, specific column, user input/function
-- output: same row with new column or columns
-- examples:
~ addtotals:
new column name = sum
new column values = sum other columns
~ extract (kv)
new columns names = keys in other column
new columns values = values in other columns
~ kvform
~ outputtext *this is a confusing name since it doesn't do what outputcsv does
~ rangemap
~ reltime
~ rex
~ strcat
~ tag
~ typer
~ xmlkv
~ xpath
~ eval
~ spath
TYPES:
commands that operate on one row at a time, adding/transforming columns
- input=in:row
output=out:row
~ addtotals row=true sumfield=f fieldlist=I
in = (...,(i:numerical)+,...) for i in I
out = in + (f:numerical=sum_i(i.value))
~~ extract (kv)
~~ kvform
~ outputtext *this is a confusing name since it doesn't do what outputcsv does
~ rangemap
~ reltime
~ rex field=i R
in = (...,(i:string),...)
out = in + ((s:string)+) for s in R
~ strcat S d
in = (...,(i:string)+,...) for i in S
out = in + (d:string=concat_i(i.value))
~ tag
~ typer
~ xmlkv
~ xpath
~ eval d=f:s->t(g1:s,...gk:s)
in = (...,(g1:s),...,(gk:s),...)
out = in + (d:t)
~ spath
commands that operate on a set of rows, adding a row with the same columns as the other rows the end
- input=in:set_of_rows
output=out:set_of_rows + row
~ addcoltotals
~ addtotals col=true:
in_types: (,...,(numerical,)+...,) fieldlist
out_types: ()
commands that operate on one row at a time, either returning that row or returning nothing
- input=in:row
output=out:row|None
~ search
commands that operate on all rows, returning fields specified in the command, optionally grouped by field(s)
-