retold-data-service 2.0.6 → 2.0.8

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.
Files changed (51) hide show
  1. package/Dockerfile_Service +50 -0
  2. package/debug/Harness.js +81 -2
  3. package/package.json +15 -7
  4. package/source/Retold-Data-Service.js +44 -13
  5. package/test/RetoldDataService_tests.js +6 -1
  6. package/test/model/MeadowModel-Extended.json +2567 -0
  7. package/test/model/{Model.json → MeadowModel.json} +42 -19
  8. package/{debug/model/generated_documentation → test/model/doc}/Dictionary.md +1 -1
  9. package/{debug/model/generated_documentation → test/model/doc}/Model-Author.md +5 -5
  10. package/{debug/model/generated_documentation → test/model/doc}/Model-Book.md +6 -6
  11. package/{debug/model/generated_documentation → test/model/doc}/Model-BookAuthorJoin.md +4 -4
  12. package/{debug/model/generated_documentation → test/model/doc}/Model-BookPrice.md +6 -6
  13. package/{debug/model/generated_documentation → test/model/doc}/Model-Review.md +7 -7
  14. package/{debug/model/generated_documentation → test/model/doc}/ModelChangeTracking.md +1 -1
  15. package/{debug/model/generated_diagram/Stricture_Output.dot → test/model/doc/diagrams/Relationships.dot} +1 -1
  16. package/test/model/doc/diagrams/RelationshipsFull.dot +13 -0
  17. package/test/model/doc/diagrams/RelationshipsFull.png +0 -0
  18. package/test/model/meadow/MeadowSchemaAuthor.json +431 -0
  19. package/test/model/meadow/MeadowSchemaBook.json +527 -0
  20. package/test/model/meadow/MeadowSchemaBookAuthorJoin.json +335 -0
  21. package/test/model/meadow/MeadowSchemaBookPrice.json +511 -0
  22. package/test/model/meadow/MeadowSchemaReview.json +463 -0
  23. package/{debug/model/sql_create/BookStore-CreateDatabase.mysql.sql → test/model/mysql_create/MeadowModel-CreateMySQLDatabase.mysql.sql} +6 -6
  24. package/debug/bookstore-configuration.json +0 -30
  25. package/debug/model/Model-Extended.json +0 -915
  26. package/debug/model/Model.json +0 -280
  27. package/debug/model/bookstore-api-endpoint-exercises.paw +0 -0
  28. package/debug/model/ddl/BookStore.ddl +0 -66
  29. package/debug/model/generated_diagram/README.md +0 -1
  30. package/debug/model/generated_documentation/README.md +0 -1
  31. package/debug/model/manual_scripts/DropTables.sql +0 -5
  32. package/debug/model/manual_scripts/MySQL-Laden-Entry.sh +0 -17
  33. package/debug/model/manual_scripts/MySQL-Security.sql +0 -5
  34. package/debug/model/manual_scripts/README.md +0 -2
  35. package/debug/model/manual_scripts/my.cnf +0 -4
  36. package/debug/model/meadow/Model-MeadowSchema-Author.json +0 -220
  37. package/debug/model/meadow/Model-MeadowSchema-Book.json +0 -268
  38. package/debug/model/meadow/Model-MeadowSchema-BookAuthorJoin.json +0 -172
  39. package/debug/model/meadow/Model-MeadowSchema-BookPrice.json +0 -260
  40. package/debug/model/meadow/Model-MeadowSchema-Review.json +0 -236
  41. package/debug/model/meadow/README.md +0 -1
  42. package/debug/model/sql_create/BookStore-CreateAndPopulateTables.sql +0 -194
  43. package/debug/model/sql_create/README.md +0 -1
  44. package/test/model/Model-Extended.json +0 -915
  45. package/test/model/meadow/Model-MeadowSchema-Author.json +0 -220
  46. package/test/model/meadow/Model-MeadowSchema-Book.json +0 -268
  47. package/test/model/meadow/Model-MeadowSchema-BookAuthorJoin.json +0 -172
  48. package/test/model/meadow/Model-MeadowSchema-BookPrice.json +0 -260
  49. package/test/model/meadow/Model-MeadowSchema-Review.json +0 -236
  50. /package/{debug/model/Model-PICT.json → test/model/MeadowModel-PICT.json} +0 -0
  51. /package/{debug/model/generated_diagram/Stricture_Output.png → test/model/doc/diagrams/Relationships.png} +0 -0
@@ -1,280 +0,0 @@
1
- {
2
- "Tables": {
3
- "Book": {
4
- "TableName": "Book",
5
- "Domain": "Default",
6
- "Columns": [
7
- {
8
- "Column": "IDBook",
9
- "DataType": "ID"
10
- },
11
- {
12
- "Column": "GUIDBook",
13
- "DataType": "GUID"
14
- },
15
- {
16
- "Column": "CreateDate",
17
- "DataType": "DateTime"
18
- },
19
- {
20
- "Column": "CreatingIDUser",
21
- "DataType": "Numeric"
22
- },
23
- {
24
- "Column": "UpdateDate",
25
- "DataType": "DateTime"
26
- },
27
- {
28
- "Column": "UpdatingIDUser",
29
- "DataType": "Numeric"
30
- },
31
- {
32
- "Column": "Deleted",
33
- "DataType": "Boolean"
34
- },
35
- {
36
- "Column": "DeleteDate",
37
- "DataType": "DateTime"
38
- },
39
- {
40
- "Column": "DeletingIDUser",
41
- "DataType": "Numeric"
42
- },
43
- {
44
- "Column": "Title",
45
- "DataType": "String",
46
- "Size": "200"
47
- },
48
- {
49
- "Column": "Type",
50
- "DataType": "String",
51
- "Size": "32"
52
- },
53
- {
54
- "Column": "Genre",
55
- "DataType": "String",
56
- "Size": "128"
57
- },
58
- {
59
- "Column": "ISBN",
60
- "DataType": "String",
61
- "Size": "64"
62
- },
63
- {
64
- "Column": "Language",
65
- "DataType": "String",
66
- "Size": "12"
67
- },
68
- {
69
- "Column": "ImageURL",
70
- "DataType": "String",
71
- "Size": "254"
72
- },
73
- {
74
- "Column": "PublicationYear",
75
- "DataType": "Numeric"
76
- }
77
- ],
78
- "Description": ""
79
- },
80
- "BookAuthorJoin": {
81
- "TableName": "BookAuthorJoin",
82
- "Domain": "Default",
83
- "Columns": [
84
- {
85
- "Column": "IDBookAuthorJoin",
86
- "DataType": "ID"
87
- },
88
- {
89
- "Column": "GUIDBookAuthorJoin",
90
- "DataType": "GUID"
91
- },
92
- {
93
- "Column": "IDBook",
94
- "DataType": "Numeric",
95
- "Join": "IDBook"
96
- },
97
- {
98
- "Column": "IDAuthor",
99
- "DataType": "Numeric",
100
- "Join": "IDAuthor"
101
- }
102
- ],
103
- "Description": ""
104
- },
105
- "Author": {
106
- "TableName": "Author",
107
- "Domain": "Default",
108
- "Columns": [
109
- {
110
- "Column": "IDAuthor",
111
- "DataType": "ID"
112
- },
113
- {
114
- "Column": "GUIDAuthor",
115
- "DataType": "GUID"
116
- },
117
- {
118
- "Column": "CreateDate",
119
- "DataType": "DateTime"
120
- },
121
- {
122
- "Column": "CreatingIDUser",
123
- "DataType": "Numeric"
124
- },
125
- {
126
- "Column": "UpdateDate",
127
- "DataType": "DateTime"
128
- },
129
- {
130
- "Column": "UpdatingIDUser",
131
- "DataType": "Numeric"
132
- },
133
- {
134
- "Column": "Deleted",
135
- "DataType": "Boolean"
136
- },
137
- {
138
- "Column": "DeleteDate",
139
- "DataType": "DateTime"
140
- },
141
- {
142
- "Column": "DeletingIDUser",
143
- "DataType": "Numeric"
144
- },
145
- {
146
- "Column": "Name",
147
- "DataType": "String",
148
- "Size": "200"
149
- }
150
- ],
151
- "Description": ""
152
- },
153
- "BookPrice": {
154
- "TableName": "BookPrice",
155
- "Domain": "Default",
156
- "Columns": [
157
- {
158
- "Column": "IDBookPrice",
159
- "DataType": "ID"
160
- },
161
- {
162
- "Column": "GUIDBookPrice",
163
- "DataType": "GUID"
164
- },
165
- {
166
- "Column": "CreateDate",
167
- "DataType": "DateTime"
168
- },
169
- {
170
- "Column": "CreatingIDUser",
171
- "DataType": "Numeric"
172
- },
173
- {
174
- "Column": "UpdateDate",
175
- "DataType": "DateTime"
176
- },
177
- {
178
- "Column": "UpdatingIDUser",
179
- "DataType": "Numeric"
180
- },
181
- {
182
- "Column": "Deleted",
183
- "DataType": "Boolean"
184
- },
185
- {
186
- "Column": "DeleteDate",
187
- "DataType": "DateTime"
188
- },
189
- {
190
- "Column": "DeletingIDUser",
191
- "DataType": "Numeric"
192
- },
193
- {
194
- "Column": "Price",
195
- "DataType": "Decimal",
196
- "Size": "8,2"
197
- },
198
- {
199
- "Column": "StartDate",
200
- "DataType": "DateTime"
201
- },
202
- {
203
- "Column": "EndDate",
204
- "DataType": "DateTime"
205
- },
206
- {
207
- "Column": "Discountable",
208
- "DataType": "Boolean"
209
- },
210
- {
211
- "Column": "CouponCode",
212
- "DataType": "String",
213
- "Size": "16"
214
- },
215
- {
216
- "Column": "IDBook",
217
- "DataType": "Numeric",
218
- "Join": "IDBook"
219
- }
220
- ],
221
- "Description": ""
222
- },
223
- "Review": {
224
- "TableName": "Review",
225
- "Domain": "Default",
226
- "Columns": [
227
- {
228
- "Column": "IDReviews",
229
- "DataType": "ID"
230
- },
231
- {
232
- "Column": "GUIDReviews",
233
- "DataType": "GUID"
234
- },
235
- {
236
- "Column": "CreateDate",
237
- "DataType": "DateTime"
238
- },
239
- {
240
- "Column": "CreatingIDUser",
241
- "DataType": "Numeric"
242
- },
243
- {
244
- "Column": "UpdateDate",
245
- "DataType": "DateTime"
246
- },
247
- {
248
- "Column": "UpdatingIDUser",
249
- "DataType": "Numeric"
250
- },
251
- {
252
- "Column": "Deleted",
253
- "DataType": "Boolean"
254
- },
255
- {
256
- "Column": "DeleteDate",
257
- "DataType": "DateTime"
258
- },
259
- {
260
- "Column": "DeletingIDUser",
261
- "DataType": "Numeric"
262
- },
263
- {
264
- "Column": "Text",
265
- "DataType": "Text"
266
- },
267
- {
268
- "Column": "Rating",
269
- "DataType": "Numeric"
270
- },
271
- {
272
- "Column": "IDBook",
273
- "DataType": "Numeric",
274
- "Join": "IDBook"
275
- }
276
- ],
277
- "Description": ""
278
- }
279
- }
280
- }
@@ -1,66 +0,0 @@
1
- !Book
2
- @IDBook
3
- %GUIDBook
4
- &CreateDate
5
- #CreatingIDUser
6
- &UpdateDate
7
- #UpdatingIDUser
8
- ^Deleted
9
- &DeleteDate
10
- #DeletingIDUser
11
- $Title 200
12
- $Type 32
13
- $Genre 128
14
- $ISBN 64
15
- $Language 12
16
- $ImageURL 254
17
- #PublicationYear
18
-
19
- !BookAuthorJoin
20
- @IDBookAuthorJoin
21
- %GUIDBookAuthorJoin
22
- #IDBook -> IDBook
23
- #IDAuthor -> IDAuthor
24
-
25
- !Author
26
- @IDAuthor
27
- %GUIDAuthor
28
- &CreateDate
29
- #CreatingIDUser
30
- &UpdateDate
31
- #UpdatingIDUser
32
- ^Deleted
33
- &DeleteDate
34
- #DeletingIDUser
35
- $Name 200
36
-
37
- !BookPrice
38
- @IDBookPrice
39
- %GUIDBookPrice
40
- &CreateDate
41
- #CreatingIDUser
42
- &UpdateDate
43
- #UpdatingIDUser
44
- ^Deleted
45
- &DeleteDate
46
- #DeletingIDUser
47
- .Price 8,2
48
- &StartDate
49
- &EndDate
50
- ^Discountable
51
- $CouponCode 16
52
- #IDBook -> IDBook
53
-
54
- !Review
55
- @IDReviews
56
- %GUIDReviews
57
- &CreateDate
58
- #CreatingIDUser
59
- &UpdateDate
60
- #UpdatingIDUser
61
- ^Deleted
62
- &DeleteDate
63
- #DeletingIDUser
64
- *Text
65
- #Rating
66
- #IDBook -> IDBook
@@ -1 +0,0 @@
1
- This is where the auto compiled diagram of the data model will generate.
@@ -1 +0,0 @@
1
- This is where the auto compiled markdown documentation of the data model will generate.
@@ -1,5 +0,0 @@
1
- DROP TABLE Author;
2
- DROP TABLE Book;
3
- DROP TABLE BookAuthorJoin;
4
- DROP TABLE BookPrice;
5
- DROP TABLE Review;
@@ -1,17 +0,0 @@
1
- #!/bin/bash
2
-
3
- trap 'kill -TERM $PID' TERM INT
4
-
5
- /usr/bin/entrypoint.sh --bind-addr "0.0.0.0:8080" . &
6
-
7
- PID=$!
8
-
9
- sleep 2
10
-
11
- sudo service mariadb restart
12
-
13
- wait $PID
14
- trap - TERM INT
15
- wait $PID
16
- EXIT_STATUS=$?
17
- echo "Service exited with status ${EXIT_STATUS}"
@@ -1,5 +0,0 @@
1
- FLUSH PRIVILEGES;
2
-
3
- ALTER USER 'root'@'localhost' IDENTIFIED BY '123456789';
4
-
5
- GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456789' WITH GRANT OPTION;
@@ -1,2 +0,0 @@
1
- This folder contains any hand-written scripts... currently just the script
2
- to drop tables for rapid DB changes and sketches.
@@ -1,4 +0,0 @@
1
- [mysqldump]
2
- databases=bookstore
3
- user=root
4
- password=123456789
@@ -1,220 +0,0 @@
1
- {
2
- "Scope": "Author",
3
- "DefaultIdentifier": "IDAuthor",
4
- "Domain": "Default",
5
- "Schema": [
6
- {
7
- "Column": "IDAuthor",
8
- "Type": "AutoIdentity"
9
- },
10
- {
11
- "Column": "GUIDAuthor",
12
- "Type": "AutoGUID"
13
- },
14
- {
15
- "Column": "CreateDate",
16
- "Type": "CreateDate"
17
- },
18
- {
19
- "Column": "CreatingIDUser",
20
- "Type": "CreateIDUser"
21
- },
22
- {
23
- "Column": "UpdateDate",
24
- "Type": "UpdateDate"
25
- },
26
- {
27
- "Column": "UpdatingIDUser",
28
- "Type": "UpdateIDUser"
29
- },
30
- {
31
- "Column": "Deleted",
32
- "Type": "Deleted"
33
- },
34
- {
35
- "Column": "DeleteDate",
36
- "Type": "DeleteDate"
37
- },
38
- {
39
- "Column": "DeletingIDUser",
40
- "Type": "DeleteIDUser"
41
- },
42
- {
43
- "Column": "Name",
44
- "Type": "String"
45
- }
46
- ],
47
- "DefaultObject": {
48
- "IDAuthor": 0,
49
- "GUIDAuthor": "0x0000000000000000",
50
- "CreateDate": null,
51
- "CreatingIDUser": 0,
52
- "UpdateDate": null,
53
- "UpdatingIDUser": 0,
54
- "Deleted": false,
55
- "DeleteDate": null,
56
- "DeletingIDUser": 0,
57
- "Name": ""
58
- },
59
- "JsonSchema": {
60
- "title": "Author",
61
- "type": "object",
62
- "properties": {
63
- "IDAuthor": {
64
- "type": "integer"
65
- },
66
- "GUIDAuthor": {
67
- "type": "string"
68
- },
69
- "CreateDate": {
70
- "type": "string"
71
- },
72
- "CreatingIDUser": {
73
- "type": "integer"
74
- },
75
- "UpdateDate": {
76
- "type": "string"
77
- },
78
- "UpdatingIDUser": {
79
- "type": "integer"
80
- },
81
- "Deleted": {
82
- "type": "boolean"
83
- },
84
- "DeleteDate": {
85
- "type": "string"
86
- },
87
- "DeletingIDUser": {
88
- "type": "integer"
89
- },
90
- "Name": {
91
- "type": "string"
92
- }
93
- },
94
- "required": [
95
- "IDAuthor"
96
- ]
97
- },
98
- "Authorization": {
99
- "__DefaultAPISecurity": {
100
- "Create": "Deny",
101
- "Read": "Deny",
102
- "Reads": "Deny",
103
- "ReadsBy": "Deny",
104
- "ReadMax": "Deny",
105
- "ReadSelectList": "Deny",
106
- "Update": "Deny",
107
- "Delete": "Deny",
108
- "Count": "Deny",
109
- "CountBy": "Deny",
110
- "Schema": "Deny",
111
- "Validate": "Deny",
112
- "New": "Deny"
113
- },
114
- "Unauthenticated": {
115
- "Create": "Deny",
116
- "Read": "Deny",
117
- "Reads": "Deny",
118
- "ReadsBy": "Deny",
119
- "ReadMax": "Deny",
120
- "ReadSelectList": "Deny",
121
- "Update": "Deny",
122
- "Delete": "Deny",
123
- "Count": "Deny",
124
- "CountBy": "Deny",
125
- "Schema": "Deny",
126
- "Validate": "Deny",
127
- "New": "Deny"
128
- },
129
- "Readonly": {
130
- "Create": "Deny",
131
- "Read": "Allow",
132
- "Reads": "Allow",
133
- "ReadsBy": "Allow",
134
- "ReadMax": "Allow",
135
- "ReadSelectList": "Allow",
136
- "Update": "Deny",
137
- "Delete": "Deny",
138
- "Count": "Allow",
139
- "CountBy": "Allow",
140
- "Schema": "Allow",
141
- "Validate": "Allow",
142
- "New": "Deny"
143
- },
144
- "User": {
145
- "Create": "Allow",
146
- "Read": "MyCustomer",
147
- "Reads": "MyCustomer",
148
- "ReadsBy": "MyCustomer",
149
- "ReadMax": "MyCustomer",
150
- "ReadSelectList": "MyCustomer",
151
- "Update": "Mine",
152
- "Delete": "Mine",
153
- "Count": "MyCustomer",
154
- "CountBy": "MyCustomer",
155
- "Schema": "MyCustomer",
156
- "Validate": "MyCustomer",
157
- "New": "MyCustomer"
158
- },
159
- "Manager": {
160
- "Create": "Allow",
161
- "Read": "MyCustomer",
162
- "Reads": "MyCustomer",
163
- "ReadsBy": "MyCustomer",
164
- "ReadMax": "MyCustomer",
165
- "ReadSelectList": "MyCustomer",
166
- "Update": "Mine",
167
- "Delete": "Mine",
168
- "Count": "MyCustomer",
169
- "CountBy": "MyCustomer",
170
- "Schema": "MyCustomer",
171
- "Validate": "MyCustomer",
172
- "New": "MyCustomer"
173
- },
174
- "Director": {
175
- "Create": "Allow",
176
- "Read": "MyCustomer",
177
- "Reads": "MyCustomer",
178
- "ReadsBy": "MyCustomer",
179
- "ReadMax": "MyCustomer",
180
- "ReadSelectList": "MyCustomer",
181
- "Update": "MyCustomer",
182
- "Delete": "MyCustomer",
183
- "Count": "MyCustomer",
184
- "CountBy": "MyCustomer",
185
- "Schema": "MyCustomer",
186
- "Validate": "MyCustomer",
187
- "New": "MyCustomer"
188
- },
189
- "Executive": {
190
- "Create": "Allow",
191
- "Read": "MyCustomer",
192
- "Reads": "MyCustomer",
193
- "ReadsBy": "MyCustomer",
194
- "ReadMax": "MyCustomer",
195
- "ReadSelectList": "MyCustomer",
196
- "Update": "MyCustomer",
197
- "Delete": "MyCustomer",
198
- "Count": "MyCustomer",
199
- "CountBy": "MyCustomer",
200
- "Schema": "MyCustomer",
201
- "Validate": "MyCustomer",
202
- "New": "MyCustomer"
203
- },
204
- "Administrator": {
205
- "Create": "Allow",
206
- "Read": "Allow",
207
- "Reads": "Allow",
208
- "ReadsBy": "Allow",
209
- "ReadMax": "Allow",
210
- "ReadSelectList": "Allow",
211
- "Update": "Allow",
212
- "Delete": "Allow",
213
- "Count": "Allow",
214
- "CountBy": "Allow",
215
- "Schema": "Allow",
216
- "Validate": "Allow",
217
- "New": "Allow"
218
- }
219
- }
220
- }