-
Notifications
You must be signed in to change notification settings - Fork 0
/
queries.json
86 lines (86 loc) · 1.88 KB
/
queries.json
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
"queries": [
{
"name": "basic_add",
"parts": [ "1+1" ]
},
{
"name": "compute_heavy",
"parts": [ "Set.sequence(1,10000).forEach(x => Time.now().add(x, \"minutes\"))" ]
},
{
"name": "composited_add",
"parts": [
"let x = 1; ",
"let y = 2; ",
"let z = 3; ",
"x+y+z"
]
},
{
"name": "get_all_collections",
"parts": [ "Collection.all()" ]
},
{
"name": "paginate_all_docs",
"parts": [ "Product.all()" ],
"response": {
"typed": true,
"page": true
}
},
{
"name": "paginate_index",
"parts": [ "Product.byCategory(\"category0\")" ],
"response": {
"typed": true,
"page": true
}
},
{
"name": "paginate_index_with_ref",
"parts": [
"let m = Manufacturer.all().first()!; ",
"Product.byCategoryAndManufacturer(\"category1\", m)"
],
"response": {
"typed": true,
"page": true
}
},
{
"name": "create_product",
"parts": [ "Product.create({\"name\":\"created by query\"})" ],
"response": {
"typed": true
}
},
{
"name": "create_product_with_id",
"parts": [
"let x = newId(); ",
"let p = Product.create({\"id\":x}); ",
"p.update({\"name\":\"Updated Product\"})"
],
"response": {
"typed": true
}
},
{
"name": "create_many_products",
"parts": [
"Set.sequence(1,100).toArray().map(x => Product.create({",
"name: \"New Product #{x}\", ",
"category: \"category#{x % 5}\", ",
"price: x, ",
"quantity: x % 10, ",
"manufacturer: Manufacturer.all().toArray()[x % 3]",
"})).toSet().paginate(10)"
],
"response": {
"typed": true,
"page": true
}
}
]
}