Public repository: timo / feel

Reader

An interpreter of FEEL, written in Rust, with integrations for PostgreSQL, WASM, Lua, and Python.

1
[
2
  {
3
    "id": "0013-sort:001:sort1",
4
    "expression": "sort(listA, function(x,y) x>y)",
5
    "expected": [
6
      5.0,
7
      4.0,
8
      3.0,
9
      1.0
10
    ],
11
    "expected_type": "list",
12
    "comparison": "exact",
13
    "deviation": null,
14
    "context": {
15
      "listA": [
16
        3.0,
17
        1.0,
18
        5.0,
19
        4.0
20
      ],
21
      "stringList": [
22
        "a",
23
        "8",
24
        "Aa",
25
        "A",
26
        "10",
27
        "9"
28
      ],
29
      "tableB": [
30
        {
31
          "col1": 16.0,
32
          "col2": 4.0,
33
          "col3": 25.0,
34
          "col4": 1.0
35
        },
36
        {
37
          "col1": 16.0,
38
          "col2": 43.0,
39
          "col3": 2.0,
40
          "col4": 10.0
41
        },
42
        {
43
          "col1": 1.0,
44
          "col2": 0.0,
45
          "col3": 1.0,
46
          "col4": 1.0
47
        }
48
      ]
49
    }
50
  },
51
  {
52
    "id": "0013-sort:001:sort2",
53
    "expression": "sort(tableB, function(x,y) x.col2<y.col2)",
54
    "expected": [
55
      {
56
        "col1": 1.0,
57
        "col2": 0.0,
58
        "col3": 1.0,
59
        "col4": 1.0
60
      },
61
      {
62
        "col1": 16.0,
63
        "col2": 4.0,
64
        "col3": 25.0,
65
        "col4": 1.0
66
      },
67
      {
68
        "col1": 16.0,
69
        "col2": 43.0,
70
        "col3": 2.0,
71
        "col4": 10.0
72
      }
73
    ],
74
    "expected_type": "list",
75
    "comparison": "exact",
76
    "deviation": null,
77
    "context": {
78
      "listA": [
79
        3.0,
80
        1.0,
81
        5.0,
82
        4.0
83
      ],
84
      "stringList": [
85
        "a",
86
        "8",
87
        "Aa",
88
        "A",
89
        "10",
90
        "9"
91
      ],
92
      "tableB": [
93
        {
94
          "col1": 16.0,
95
          "col2": 4.0,
96
          "col3": 25.0,
97
          "col4": 1.0
98
        },
99
        {
100
          "col1": 16.0,
101
          "col2": 43.0,
102
          "col3": 2.0,
103
          "col4": 10.0
104
        },
105
        {
106
          "col1": 1.0,
107
          "col2": 0.0,
108
          "col3": 1.0,
109
          "col4": 1.0
110
        }
111
      ]
112
    }
113
  },
114
  {
115
    "id": "0013-sort:001:sort3",
116
    "expression": "sort(stringList, function(x,y) x<y)",
117
    "expected": [
118
      "10",
119
      "8",
120
      "9",
121
      "A",
122
      "Aa",
123
      "a"
124
    ],
125
    "expected_type": "list",
126
    "comparison": "exact",
127
    "deviation": null,
128
    "context": {
129
      "listA": [
130
        3.0,
131
        1.0,
132
        5.0,
133
        4.0
134
      ],
135
      "stringList": [
136
        "a",
137
        "8",
138
        "Aa",
139
        "A",
140
        "10",
141
        "9"
142
      ],
143
      "tableB": [
144
        {
145
          "col1": 16.0,
146
          "col2": 4.0,
147
          "col3": 25.0,
148
          "col4": 1.0
149
        },
150
        {
151
          "col1": 16.0,
152
          "col2": 43.0,
153
          "col3": 2.0,
154
          "col4": 10.0
155
        },
156
        {
157
          "col1": 1.0,
158
          "col2": 0.0,
159
          "col3": 1.0,
160
          "col4": 1.0
161
        }
162
      ]
163
    }
164
  }
165
]