@cynodia/axiom-server 0.9.0-alpha.2 → 0.11.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/conformance/migrations/add-optional-field.json +167 -0
- package/conformance/migrations/add-required-field-with-default.json +177 -0
- package/conformance/migrations/crash-and-resume.json +1945 -0
- package/conformance/migrations/destructive-removal-approved.json +142 -0
- package/conformance/migrations/destructive-removal-refused.json +126 -0
- package/conformance/migrations/idempotent-rerun.json +187 -0
- package/conformance/migrations/invalid-target-record.json +161 -0
- package/conformance/migrations/large-batched-transformation.json +18157 -0
- package/conformance/migrations/manifest.json +129 -0
- package/conformance/migrations/metadata-only-change.json +128 -0
- package/conformance/migrations/migration-lock.json +152 -0
- package/conformance/migrations/missing-migration-path.json +109 -0
- package/conformance/migrations/record-transformation.json +176 -0
- package/conformance/migrations/relationship-addition.json +258 -0
- package/conformance/migrations/remove-empty-field.json +139 -0
- package/conformance/migrations/schema-fingerprint-mismatch.json +155 -0
- package/conformance/migrations/transform-field.json +159 -0
- package/conformance/queries/aggregate-under-policy.json +769 -0
- package/conformance/queries/count-aggregate.json +768 -0
- package/conformance/queries/cursor-page-1.json +784 -0
- package/conformance/queries/cursor-page-2.json +809 -0
- package/conformance/queries/filter-compound.json +783 -0
- package/conformance/queries/filter-equality.json +776 -0
- package/conformance/queries/grouped-sum.json +791 -0
- package/conformance/queries/invalid-cursor.json +769 -0
- package/conformance/queries/manifest.json +114 -0
- package/conformance/queries/multi-key-sort.json +791 -0
- package/conformance/queries/null-ordering.json +772 -0
- package/conformance/queries/projection-shape.json +776 -0
- package/conformance/queries/query-inside-transaction.json +794 -0
- package/conformance/queries/relationship-under-policy.json +782 -0
- package/conformance/queries/row-read-policy.json +776 -0
- package/conformance/queries/stable-ordering.json +805 -0
- package/conformance/queries/to-one-relationship.json +772 -0
- package/dist/data-provider.d.ts +187 -0
- package/dist/data-provider.js +43 -0
- package/dist/deps.d.ts +3 -2
- package/dist/deps.js +2 -1
- package/dist/index.d.ts +19 -0
- package/dist/index.js +17 -0
- package/dist/memory-data-provider.d.ts +27 -0
- package/dist/memory-data-provider.js +348 -0
- package/dist/migration-conformance.d.ts +74 -0
- package/dist/migration-conformance.js +163 -0
- package/dist/migration-eval.d.ts +23 -0
- package/dist/migration-eval.js +261 -0
- package/dist/migration-execute.d.ts +92 -0
- package/dist/migration-execute.js +82 -0
- package/dist/migration-executor.d.ts +61 -0
- package/dist/migration-executor.js +291 -0
- package/dist/migration-gate.d.ts +35 -0
- package/dist/migration-gate.js +96 -0
- package/dist/migration-row-store.d.ts +36 -0
- package/dist/migration-row-store.js +73 -0
- package/dist/migration-store.d.ts +99 -0
- package/dist/migration-store.js +97 -0
- package/dist/migration.d.ts +179 -0
- package/dist/migration.js +343 -0
- package/dist/protocol.d.ts +47 -2
- package/dist/protocol.js +4 -1
- package/dist/provider-record-runtime.d.ts +43 -0
- package/dist/provider-record-runtime.js +185 -0
- package/dist/query-conformance.d.ts +77 -0
- package/dist/query-conformance.js +97 -0
- package/dist/query-cursor.d.ts +62 -0
- package/dist/query-cursor.js +110 -0
- package/dist/query-eval.d.ts +33 -0
- package/dist/query-eval.js +275 -0
- package/dist/query-runtime.d.ts +41 -0
- package/dist/query-runtime.js +138 -0
- package/dist/server.d.ts +84 -0
- package/dist/server.js +558 -9
- package/dist/sql-query.d.ts +36 -0
- package/dist/sql-query.js +137 -0
- package/dist/sqlite-data-provider.d.ts +14 -0
- package/dist/sqlite-data-provider.js +373 -0
- package/dist/sqlite-migration.d.ts +25 -0
- package/dist/sqlite-migration.js +307 -0
- package/package.json +4 -3
- package/schema/protocol.v1.schema.json +179 -1
- package/schema/server-ir.v6.schema.json +2462 -0
- package/schema/server-ir.v7.schema.json +2899 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
{
|
|
2
|
+
"conformance": "axiom.conformance.v5",
|
|
3
|
+
"name": "add-optional-field",
|
|
4
|
+
"covers": [
|
|
5
|
+
"spec11 §17",
|
|
6
|
+
"add optional field"
|
|
7
|
+
],
|
|
8
|
+
"description": "Order.note is added as optional; existing rows stay valid without a rewrite.",
|
|
9
|
+
"serverIR": {
|
|
10
|
+
"contract": "axiom.server.v7",
|
|
11
|
+
"id": "migration-conformance",
|
|
12
|
+
"name": "Migration Conformance",
|
|
13
|
+
"version": "0.11.0-alpha.1",
|
|
14
|
+
"schemaVersion": 2,
|
|
15
|
+
"schemaFingerprint": "7e4d24d95c273ff084e7758508a02e35015d5db2ceda46ca61e7ee8a2c2a4929",
|
|
16
|
+
"migrations": [
|
|
17
|
+
{
|
|
18
|
+
"kind": "migration",
|
|
19
|
+
"id": "m_1_2",
|
|
20
|
+
"fromSchema": 1,
|
|
21
|
+
"toSchema": 2,
|
|
22
|
+
"operations": [
|
|
23
|
+
{
|
|
24
|
+
"id": "op_add_note",
|
|
25
|
+
"kind": "add-field",
|
|
26
|
+
"entityId": "entity_order",
|
|
27
|
+
"field": {
|
|
28
|
+
"id": "field_order_note",
|
|
29
|
+
"valueType": {
|
|
30
|
+
"kind": "optional",
|
|
31
|
+
"valueType": {
|
|
32
|
+
"kind": "primitive",
|
|
33
|
+
"primitive": "string"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
"entities": [
|
|
42
|
+
{
|
|
43
|
+
"kind": "entity",
|
|
44
|
+
"id": "entity_order",
|
|
45
|
+
"identityFieldId": "field_order_id",
|
|
46
|
+
"fields": [
|
|
47
|
+
{
|
|
48
|
+
"id": "field_order_id",
|
|
49
|
+
"valueType": {
|
|
50
|
+
"kind": "primitive",
|
|
51
|
+
"primitive": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "field_order_total",
|
|
56
|
+
"valueType": {
|
|
57
|
+
"kind": "primitive",
|
|
58
|
+
"primitive": "number"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"id": "field_order_note",
|
|
63
|
+
"valueType": {
|
|
64
|
+
"kind": "optional",
|
|
65
|
+
"valueType": {
|
|
66
|
+
"kind": "primitive",
|
|
67
|
+
"primitive": "string"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"fields": {
|
|
75
|
+
"field_order_id": {
|
|
76
|
+
"entityId": "entity_order",
|
|
77
|
+
"field": {
|
|
78
|
+
"id": "field_order_id",
|
|
79
|
+
"valueType": {
|
|
80
|
+
"kind": "primitive",
|
|
81
|
+
"primitive": "string"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"field_order_total": {
|
|
86
|
+
"entityId": "entity_order",
|
|
87
|
+
"field": {
|
|
88
|
+
"id": "field_order_total",
|
|
89
|
+
"valueType": {
|
|
90
|
+
"kind": "primitive",
|
|
91
|
+
"primitive": "number"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"field_order_note": {
|
|
96
|
+
"entityId": "entity_order",
|
|
97
|
+
"field": {
|
|
98
|
+
"id": "field_order_note",
|
|
99
|
+
"valueType": {
|
|
100
|
+
"kind": "optional",
|
|
101
|
+
"valueType": {
|
|
102
|
+
"kind": "primitive",
|
|
103
|
+
"primitive": "string"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"states": [
|
|
110
|
+
{
|
|
111
|
+
"id": "state_entity_order",
|
|
112
|
+
"kind": "state",
|
|
113
|
+
"valueType": {
|
|
114
|
+
"kind": "collection",
|
|
115
|
+
"itemType": {
|
|
116
|
+
"kind": "entity",
|
|
117
|
+
"entityId": "entity_order"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"authority": "server"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"actions": {},
|
|
124
|
+
"constraints": [],
|
|
125
|
+
"transitionConstraints": [],
|
|
126
|
+
"observableStateIds": [
|
|
127
|
+
"state_entity_order"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"fromVersion": 1,
|
|
131
|
+
"sourceData": {
|
|
132
|
+
"entity_order": [
|
|
133
|
+
{
|
|
134
|
+
"field_order_id": "order-0000",
|
|
135
|
+
"field_order_total": 0
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"field_order_id": "order-0001",
|
|
139
|
+
"field_order_total": 1
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"field_order_id": "order-0002",
|
|
143
|
+
"field_order_total": 2
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
"expect": {
|
|
148
|
+
"ok": true,
|
|
149
|
+
"status": "completed",
|
|
150
|
+
"targetData": {
|
|
151
|
+
"entity_order": [
|
|
152
|
+
{
|
|
153
|
+
"field_order_id": "order-0000",
|
|
154
|
+
"field_order_total": 0
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"field_order_id": "order-0001",
|
|
158
|
+
"field_order_total": 1
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"field_order_id": "order-0002",
|
|
162
|
+
"field_order_total": 2
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
{
|
|
2
|
+
"conformance": "axiom.conformance.v5",
|
|
3
|
+
"name": "add-required-field-with-default",
|
|
4
|
+
"covers": [
|
|
5
|
+
"spec11 §18",
|
|
6
|
+
"add required field + default"
|
|
7
|
+
],
|
|
8
|
+
"description": "Order.status is added as required; every existing row is populated with \"draft\".",
|
|
9
|
+
"serverIR": {
|
|
10
|
+
"contract": "axiom.server.v7",
|
|
11
|
+
"id": "migration-conformance",
|
|
12
|
+
"name": "Migration Conformance",
|
|
13
|
+
"version": "0.11.0-alpha.1",
|
|
14
|
+
"schemaVersion": 2,
|
|
15
|
+
"schemaFingerprint": "2c478dc5301786b76c6990e38e1659d621d7712fdfa785bf115b1275b9804877",
|
|
16
|
+
"migrations": [
|
|
17
|
+
{
|
|
18
|
+
"kind": "migration",
|
|
19
|
+
"id": "m_1_2",
|
|
20
|
+
"fromSchema": 1,
|
|
21
|
+
"toSchema": 2,
|
|
22
|
+
"operations": [
|
|
23
|
+
{
|
|
24
|
+
"id": "op_add_status",
|
|
25
|
+
"kind": "add-field",
|
|
26
|
+
"entityId": "entity_order",
|
|
27
|
+
"field": {
|
|
28
|
+
"id": "field_order_status",
|
|
29
|
+
"valueType": {
|
|
30
|
+
"kind": "primitive",
|
|
31
|
+
"primitive": "string"
|
|
32
|
+
},
|
|
33
|
+
"required": true
|
|
34
|
+
},
|
|
35
|
+
"populate": {
|
|
36
|
+
"kind": "literal",
|
|
37
|
+
"value": "draft"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"entities": [
|
|
44
|
+
{
|
|
45
|
+
"kind": "entity",
|
|
46
|
+
"id": "entity_order",
|
|
47
|
+
"identityFieldId": "field_order_id",
|
|
48
|
+
"fields": [
|
|
49
|
+
{
|
|
50
|
+
"id": "field_order_id",
|
|
51
|
+
"valueType": {
|
|
52
|
+
"kind": "primitive",
|
|
53
|
+
"primitive": "string"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"id": "field_order_total",
|
|
58
|
+
"valueType": {
|
|
59
|
+
"kind": "primitive",
|
|
60
|
+
"primitive": "number"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"id": "field_order_status",
|
|
65
|
+
"valueType": {
|
|
66
|
+
"kind": "primitive",
|
|
67
|
+
"primitive": "string"
|
|
68
|
+
},
|
|
69
|
+
"required": true
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"fields": {
|
|
75
|
+
"field_order_id": {
|
|
76
|
+
"entityId": "entity_order",
|
|
77
|
+
"field": {
|
|
78
|
+
"id": "field_order_id",
|
|
79
|
+
"valueType": {
|
|
80
|
+
"kind": "primitive",
|
|
81
|
+
"primitive": "string"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"field_order_total": {
|
|
86
|
+
"entityId": "entity_order",
|
|
87
|
+
"field": {
|
|
88
|
+
"id": "field_order_total",
|
|
89
|
+
"valueType": {
|
|
90
|
+
"kind": "primitive",
|
|
91
|
+
"primitive": "number"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"field_order_status": {
|
|
96
|
+
"entityId": "entity_order",
|
|
97
|
+
"field": {
|
|
98
|
+
"id": "field_order_status",
|
|
99
|
+
"valueType": {
|
|
100
|
+
"kind": "primitive",
|
|
101
|
+
"primitive": "string"
|
|
102
|
+
},
|
|
103
|
+
"required": true
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"states": [
|
|
108
|
+
{
|
|
109
|
+
"id": "state_entity_order",
|
|
110
|
+
"kind": "state",
|
|
111
|
+
"valueType": {
|
|
112
|
+
"kind": "collection",
|
|
113
|
+
"itemType": {
|
|
114
|
+
"kind": "entity",
|
|
115
|
+
"entityId": "entity_order"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"authority": "server"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"actions": {},
|
|
122
|
+
"constraints": [],
|
|
123
|
+
"transitionConstraints": [],
|
|
124
|
+
"observableStateIds": [
|
|
125
|
+
"state_entity_order"
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"fromVersion": 1,
|
|
129
|
+
"sourceData": {
|
|
130
|
+
"entity_order": [
|
|
131
|
+
{
|
|
132
|
+
"field_order_id": "order-0000",
|
|
133
|
+
"field_order_total": 0
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"field_order_id": "order-0001",
|
|
137
|
+
"field_order_total": 1
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"field_order_id": "order-0002",
|
|
141
|
+
"field_order_total": 2
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"field_order_id": "order-0003",
|
|
145
|
+
"field_order_total": 3
|
|
146
|
+
}
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
"expect": {
|
|
150
|
+
"ok": true,
|
|
151
|
+
"status": "completed",
|
|
152
|
+
"targetData": {
|
|
153
|
+
"entity_order": [
|
|
154
|
+
{
|
|
155
|
+
"field_order_id": "order-0000",
|
|
156
|
+
"field_order_total": 0,
|
|
157
|
+
"field_order_status": "draft"
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"field_order_id": "order-0001",
|
|
161
|
+
"field_order_total": 1,
|
|
162
|
+
"field_order_status": "draft"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"field_order_id": "order-0002",
|
|
166
|
+
"field_order_total": 2,
|
|
167
|
+
"field_order_status": "draft"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"field_order_id": "order-0003",
|
|
171
|
+
"field_order_total": 3,
|
|
172
|
+
"field_order_status": "draft"
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|