retold-data-service 1.0.2 → 1.0.3
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/.config/configstore/update-notifier-npm-check-updates.json +1 -1
- package/.config/configstore/update-notifier-npm.json +1 -1
- package/.config/vscode-sqltools/runningInfo.json +13 -0
- package/.vscode/launch.json +24 -0
- package/.vscode/settings.json +17 -0
- package/Dockerfile_LUXURYCode +94 -0
- package/debug/Harness.js +34 -2
- package/debug/bookstore-configuration.json +29 -0
- package/debug/bookstore-serve-meadow-endpoint-apis.js +41 -0
- package/debug/data/books.csv +10001 -0
- package/debug/model/bookstore-api-endpoint-exercises.paw +0 -0
- package/debug/model/manual_scripts/MySQL-Laden-Entry.sh +17 -0
- package/debug/model/manual_scripts/MySQL-Security.sql +5 -0
- package/debug/model/manual_scripts/my.cnf +4 -0
- package/debug/model/sql_create/BookStore-CreateAndPopulateTables.sql +194 -0
- package/debug/package-lock.json +3999 -0
- package/debug/package.json +13 -0
- package/package.json +47 -17
- package/source/Retold-Data-Service.js +94 -299
- package/test/RetoldDataService_tests.js +16 -36
- package/test/model/fable-configuration.json +16 -0
- package/test/model/meadow/README.md +1 -0
- package/debug/Build-Database.sh +0 -12
- package/debug/Harness-Configuration.json +0 -51
- package/debug/model/doc/Dictionary.md +0 -18
- package/debug/model/doc/Model-Author.md +0 -20
- package/debug/model/doc/Model-Book.md +0 -26
- package/debug/model/doc/Model-BookAuthorJoin.md +0 -14
- package/debug/model/doc/Model-BookPrice.md +0 -25
- package/debug/model/doc/Model-Review.md +0 -22
- package/debug/model/doc/ModelChangeTracking.md +0 -17
- package/debug/model/doc/diagrams/Relationships.dot +0 -13
- package/debug/model/doc/diagrams/Relationships.png +0 -0
- package/debug/model/doc/diagrams/RelationshipsFull.dot +0 -13
- package/debug/model/doc/diagrams/RelationshipsFull.png +0 -0
- package/debug/model/mysql_create/MeadowModel-CreateMySQLDatabase.mysql.sql +0 -116
- package/source/Cumulation-Settings-Default.js +0 -19
- package/source/Cumulation.js +0 -90
- package/source/GraphGet.js +0 -607
- package/source/ProviderHelpers/Meadow-Provider-Helper-ALASQL.js +0 -48
- package/source/ProviderHelpers/Meadow-Provider-Helper-Base.js +0 -46
- package/source/ProviderHelpers/Meadow-Provider-Helper-MySQL.js +0 -62
- package/test/basic_test_configurations/fable-config-load_model.json +0 -45
- package/test/model/meadow_model/BookStore-PICT.json +0 -1
- package/test/model/meadow_model/README.md +0 -1
- /package/debug/model/{MeadowModel-Extended.json → Model-Extended.json} +0 -0
- /package/debug/model/{MeadowModel-PICT.json → Model-PICT.json} +0 -0
- /package/debug/model/{MeadowModel.json → Model.json} +0 -0
- /package/debug/{Model.ddl → model/ddl/BookStore.ddl} +0 -0
- /package/{test → debug}/model/generated_diagram/README.md +0 -0
- /package/{test → debug}/model/generated_diagram/Stricture_Output.dot +0 -0
- /package/{test → debug}/model/generated_diagram/Stricture_Output.png +0 -0
- /package/{test → debug}/model/generated_documentation/Dictionary.md +0 -0
- /package/{test → debug}/model/generated_documentation/Model-Author.md +0 -0
- /package/{test → debug}/model/generated_documentation/Model-Book.md +0 -0
- /package/{test → debug}/model/generated_documentation/Model-BookAuthorJoin.md +0 -0
- /package/{test → debug}/model/generated_documentation/Model-BookPrice.md +0 -0
- /package/{test → debug}/model/generated_documentation/Model-Review.md +0 -0
- /package/{test → debug}/model/generated_documentation/ModelChangeTracking.md +0 -0
- /package/{test → debug}/model/generated_documentation/README.md +0 -0
- /package/{test → debug}/model/manual_scripts/DropTables.sql +0 -0
- /package/{test → debug}/model/manual_scripts/README.md +0 -0
- /package/debug/model/meadow/{MeadowSchemaAuthor.json → Model-MeadowSchema-Author.json} +0 -0
- /package/debug/model/meadow/{MeadowSchemaBook.json → Model-MeadowSchema-Book.json} +0 -0
- /package/debug/model/meadow/{MeadowSchemaBookAuthorJoin.json → Model-MeadowSchema-BookAuthorJoin.json} +0 -0
- /package/debug/model/meadow/{MeadowSchemaBookPrice.json → Model-MeadowSchema-BookPrice.json} +0 -0
- /package/debug/model/meadow/{MeadowSchemaReview.json → Model-MeadowSchema-Review.json} +0 -0
- /package/{test/model/meadow_schema → debug/model/meadow}/README.md +0 -0
- /package/{test → debug}/model/sql_create/BookStore-CreateDatabase.mysql.sql +0 -0
- /package/{test → debug}/model/sql_create/README.md +0 -0
- /package/test/model/{meadow_model/BookStore-Extended.json → Model-Extended.json} +0 -0
- /package/test/model/{meadow_model/BookStore.json → Model.json} +0 -0
- /package/test/model/{meadow_schema/BookStore-MeadowSchema-Author.json → meadow/Model-MeadowSchema-Author.json} +0 -0
- /package/test/model/{meadow_schema/BookStore-MeadowSchema-Book.json → meadow/Model-MeadowSchema-Book.json} +0 -0
- /package/test/model/{meadow_schema/BookStore-MeadowSchema-BookAuthorJoin.json → meadow/Model-MeadowSchema-BookAuthorJoin.json} +0 -0
- /package/test/model/{meadow_schema/BookStore-MeadowSchema-BookPrice.json → meadow/Model-MeadowSchema-BookPrice.json} +0 -0
- /package/test/model/{meadow_schema/BookStore-MeadowSchema-Review.json → meadow/Model-MeadowSchema-Review.json} +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Product": "RetoldDataService-Harness",
|
|
3
|
-
"ProductVersion": "1.0.0",
|
|
4
|
-
|
|
5
|
-
"UUID":
|
|
6
|
-
{
|
|
7
|
-
"DataCenter": 0,
|
|
8
|
-
"Worker": 0
|
|
9
|
-
},
|
|
10
|
-
"LogStreams":
|
|
11
|
-
[
|
|
12
|
-
{
|
|
13
|
-
"level": "trace",
|
|
14
|
-
"streamtype": "prettystream"
|
|
15
|
-
}
|
|
16
|
-
],
|
|
17
|
-
|
|
18
|
-
"APIServerPort": 8088,
|
|
19
|
-
|
|
20
|
-
"Retold":
|
|
21
|
-
{
|
|
22
|
-
"AutoLoadModel": true,
|
|
23
|
-
"AutoConnectProvider": true,
|
|
24
|
-
"AutoMapBackplaneEndpoints": true,
|
|
25
|
-
"AutoMapEntityEndpoints": true,
|
|
26
|
-
"AutoStartAPIServer": true,
|
|
27
|
-
|
|
28
|
-
"AllowDatabaseCreate": false,
|
|
29
|
-
"AllowTableCreate": false,
|
|
30
|
-
"AllowTableUpdate": false,
|
|
31
|
-
|
|
32
|
-
"ServeDebugEnvironment": true,
|
|
33
|
-
|
|
34
|
-
"DefaultMeadowDataProvider": "MySQL",
|
|
35
|
-
|
|
36
|
-
"MeadowModel": "/home/coder/retold-dev/library/debug/model/Model.json",
|
|
37
|
-
"MeadowEntitySchemaPrefix": "/home/coder/retold-dev/library/debug/model/meadow/MeadowSchema-",
|
|
38
|
-
|
|
39
|
-
"StrictureDDL": false
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
"MySQL":
|
|
43
|
-
{
|
|
44
|
-
"Server": "127.0.0.1",
|
|
45
|
-
"Port": 3306,
|
|
46
|
-
"User": "root",
|
|
47
|
-
"Password": "123456789",
|
|
48
|
-
"Database": "bookstore",
|
|
49
|
-
"ConnectionPoolLimit": 20
|
|
50
|
-
}
|
|
51
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
##### {DocumentationIndex|Home} > {Model/DataModel|Data Model} > {Model/Dictionary/Dictionary|Data Dictionary}
|
|
2
|
-
|
|
3
|
-
Data Dictionary
|
|
4
|
-
=========================
|
|
5
|
-
|
|
6
|
-
Each entry below describes a single table in the database.
|
|
7
|
-
|
|
8
|
-
Table | Column Count
|
|
9
|
-
----- | -----------:
|
|
10
|
-
{Model/Dictionary/Model-Book|Book} | 16
|
|
11
|
-
{Model/Dictionary/Model-BookAuthorJoin|BookAuthorJoin} | 4
|
|
12
|
-
{Model/Dictionary/Model-Author|Author} | 10
|
|
13
|
-
{Model/Dictionary/Model-BookPrice|BookPrice} | 15
|
|
14
|
-
{Model/Dictionary/Model-Review|Review} | 12
|
|
15
|
-
|
|
16
|
-
- - -
|
|
17
|
-
|
|
18
|
-
Generated on 2022-05-23 at 09:07
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
##### {DocumentationIndex|Home} > {Model/DataModel|Data Model} > {Model/Dictionary/Dictionary|Data Dictionary} > {Model/Dictionary/Model-Author|Author Table}
|
|
2
|
-
|
|
3
|
-
Author
|
|
4
|
-
===
|
|
5
|
-
|
|
6
|
-
Column Name | Size | Data Type | Join
|
|
7
|
-
----------- | ---: | --------- | ----
|
|
8
|
-
IDAuthor | | ID |
|
|
9
|
-
GUIDAuthor | | GUID |
|
|
10
|
-
CreateDate | | DateTime |
|
|
11
|
-
CreatingIDUser | | Numeric |
|
|
12
|
-
UpdateDate | | DateTime |
|
|
13
|
-
UpdatingIDUser | | Numeric |
|
|
14
|
-
Deleted | | Boolean |
|
|
15
|
-
DeleteDate | | DateTime |
|
|
16
|
-
DeletingIDUser | | Numeric |
|
|
17
|
-
Name | 200 | String |
|
|
18
|
-
- - -
|
|
19
|
-
|
|
20
|
-
Generated on 2022-05-23 at 09:07
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
##### {DocumentationIndex|Home} > {Model/DataModel|Data Model} > {Model/Dictionary/Dictionary|Data Dictionary} > {Model/Dictionary/Model-Book|Book Table}
|
|
2
|
-
|
|
3
|
-
Book
|
|
4
|
-
===
|
|
5
|
-
|
|
6
|
-
Column Name | Size | Data Type | Join
|
|
7
|
-
----------- | ---: | --------- | ----
|
|
8
|
-
IDBook | | ID |
|
|
9
|
-
GUIDBook | | GUID |
|
|
10
|
-
CreateDate | | DateTime |
|
|
11
|
-
CreatingIDUser | | Numeric |
|
|
12
|
-
UpdateDate | | DateTime |
|
|
13
|
-
UpdatingIDUser | | Numeric |
|
|
14
|
-
Deleted | | Boolean |
|
|
15
|
-
DeleteDate | | DateTime |
|
|
16
|
-
DeletingIDUser | | Numeric |
|
|
17
|
-
Title | 200 | String |
|
|
18
|
-
Type | 32 | String |
|
|
19
|
-
Genre | 128 | String |
|
|
20
|
-
ISBN | 64 | String |
|
|
21
|
-
Language | 12 | String |
|
|
22
|
-
ImageURL | 254 | String |
|
|
23
|
-
PublicationYear | | Numeric |
|
|
24
|
-
- - -
|
|
25
|
-
|
|
26
|
-
Generated on 2022-05-23 at 09:07
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
##### {DocumentationIndex|Home} > {Model/DataModel|Data Model} > {Model/Dictionary/Dictionary|Data Dictionary} > {Model/Dictionary/Model-BookAuthorJoin|BookAuthorJoin Table}
|
|
2
|
-
|
|
3
|
-
BookAuthorJoin
|
|
4
|
-
===
|
|
5
|
-
|
|
6
|
-
Column Name | Size | Data Type | Join
|
|
7
|
-
----------- | ---: | --------- | ----
|
|
8
|
-
IDBookAuthorJoin | | ID |
|
|
9
|
-
GUIDBookAuthorJoin | | GUID |
|
|
10
|
-
IDBook | | Numeric | Book.IDBook
|
|
11
|
-
IDAuthor | | Numeric | Author.IDAuthor
|
|
12
|
-
- - -
|
|
13
|
-
|
|
14
|
-
Generated on 2022-05-23 at 09:07
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
##### {DocumentationIndex|Home} > {Model/DataModel|Data Model} > {Model/Dictionary/Dictionary|Data Dictionary} > {Model/Dictionary/Model-BookPrice|BookPrice Table}
|
|
2
|
-
|
|
3
|
-
BookPrice
|
|
4
|
-
===
|
|
5
|
-
|
|
6
|
-
Column Name | Size | Data Type | Join
|
|
7
|
-
----------- | ---: | --------- | ----
|
|
8
|
-
IDBookPrice | | ID |
|
|
9
|
-
GUIDBookPrice | | GUID |
|
|
10
|
-
CreateDate | | DateTime |
|
|
11
|
-
CreatingIDUser | | Numeric |
|
|
12
|
-
UpdateDate | | DateTime |
|
|
13
|
-
UpdatingIDUser | | Numeric |
|
|
14
|
-
Deleted | | Boolean |
|
|
15
|
-
DeleteDate | | DateTime |
|
|
16
|
-
DeletingIDUser | | Numeric |
|
|
17
|
-
Price | 8,2 | Decimal |
|
|
18
|
-
StartDate | | DateTime |
|
|
19
|
-
EndDate | | DateTime |
|
|
20
|
-
Discountable | | Boolean |
|
|
21
|
-
CouponCode | 16 | String |
|
|
22
|
-
IDBook | | Numeric | Book.IDBook
|
|
23
|
-
- - -
|
|
24
|
-
|
|
25
|
-
Generated on 2022-05-23 at 09:07
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
##### {DocumentationIndex|Home} > {Model/DataModel|Data Model} > {Model/Dictionary/Dictionary|Data Dictionary} > {Model/Dictionary/Model-Review|Review Table}
|
|
2
|
-
|
|
3
|
-
Review
|
|
4
|
-
===
|
|
5
|
-
|
|
6
|
-
Column Name | Size | Data Type | Join
|
|
7
|
-
----------- | ---: | --------- | ----
|
|
8
|
-
IDReviews | | ID |
|
|
9
|
-
GUIDReviews | | GUID |
|
|
10
|
-
CreateDate | | DateTime |
|
|
11
|
-
CreatingIDUser | | Numeric |
|
|
12
|
-
UpdateDate | | DateTime |
|
|
13
|
-
UpdatingIDUser | | Numeric |
|
|
14
|
-
Deleted | | Boolean |
|
|
15
|
-
DeleteDate | | DateTime |
|
|
16
|
-
DeletingIDUser | | Numeric |
|
|
17
|
-
Text | | Text |
|
|
18
|
-
Rating | | Numeric |
|
|
19
|
-
IDBook | | Numeric | Book.IDBook
|
|
20
|
-
- - -
|
|
21
|
-
|
|
22
|
-
Generated on 2022-05-23 at 09:07
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
##### {DocumentationIndex|Home} > {Model/DataModel|Data Model} > {Model/Dictionary/ModelChangeTracking|Table Change Tracking}
|
|
2
|
-
|
|
3
|
-
Table Change Tracking
|
|
4
|
-
=====================
|
|
5
|
-
|
|
6
|
-
The following table describes which tables have implicit create, update and delete change tracking (provided by the meadow endpoints API architecture). This does not include any kind of media archival or record longitudinal backups; just timestamps and user stamps for the last action of each type.
|
|
7
|
-
|
|
8
|
-
Table | Create | Update | Delete
|
|
9
|
-
----- | :----: | :----: | :----:
|
|
10
|
-
Book | X | X | X
|
|
11
|
-
BookAuthorJoin | | |
|
|
12
|
-
Author | X | X | X
|
|
13
|
-
BookPrice | X | X | X
|
|
14
|
-
Review | X | X | X
|
|
15
|
-
- - -
|
|
16
|
-
|
|
17
|
-
Generated on 2022-05-23 at 09:07
|
|
Binary file
|
|
Binary file
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
-- Data Model -- Generated 2022-05-23T16:07:11.382Z
|
|
2
|
-
|
|
3
|
-
-- This script creates the following tables:
|
|
4
|
-
-- Table ----------------------------------------- Column Count ----------------
|
|
5
|
-
-- Book 16
|
|
6
|
-
-- BookAuthorJoin 4
|
|
7
|
-
-- Author 10
|
|
8
|
-
-- BookPrice 15
|
|
9
|
-
-- Review 12
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
-- [ Book ]
|
|
14
|
-
CREATE TABLE IF NOT EXISTS
|
|
15
|
-
Book
|
|
16
|
-
(
|
|
17
|
-
IDBook INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
18
|
-
GUIDBook CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
|
|
19
|
-
CreateDate DATETIME,
|
|
20
|
-
CreatingIDUser INT NOT NULL DEFAULT '0',
|
|
21
|
-
UpdateDate DATETIME,
|
|
22
|
-
UpdatingIDUser INT NOT NULL DEFAULT '0',
|
|
23
|
-
Deleted TINYINT NOT NULL DEFAULT '0',
|
|
24
|
-
DeleteDate DATETIME,
|
|
25
|
-
DeletingIDUser INT NOT NULL DEFAULT '0',
|
|
26
|
-
Title CHAR(200) NOT NULL DEFAULT '',
|
|
27
|
-
Type CHAR(32) NOT NULL DEFAULT '',
|
|
28
|
-
Genre CHAR(128) NOT NULL DEFAULT '',
|
|
29
|
-
ISBN CHAR(64) NOT NULL DEFAULT '',
|
|
30
|
-
Language CHAR(12) NOT NULL DEFAULT '',
|
|
31
|
-
ImageURL CHAR(254) NOT NULL DEFAULT '',
|
|
32
|
-
PublicationYear INT NOT NULL DEFAULT '0',
|
|
33
|
-
|
|
34
|
-
PRIMARY KEY (IDBook)
|
|
35
|
-
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
-- [ BookAuthorJoin ]
|
|
40
|
-
CREATE TABLE IF NOT EXISTS
|
|
41
|
-
BookAuthorJoin
|
|
42
|
-
(
|
|
43
|
-
IDBookAuthorJoin INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
44
|
-
GUIDBookAuthorJoin CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
|
|
45
|
-
IDBook INT NOT NULL DEFAULT '0',
|
|
46
|
-
IDAuthor INT NOT NULL DEFAULT '0',
|
|
47
|
-
|
|
48
|
-
PRIMARY KEY (IDBookAuthorJoin)
|
|
49
|
-
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-- [ Author ]
|
|
54
|
-
CREATE TABLE IF NOT EXISTS
|
|
55
|
-
Author
|
|
56
|
-
(
|
|
57
|
-
IDAuthor INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
58
|
-
GUIDAuthor CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
|
|
59
|
-
CreateDate DATETIME,
|
|
60
|
-
CreatingIDUser INT NOT NULL DEFAULT '0',
|
|
61
|
-
UpdateDate DATETIME,
|
|
62
|
-
UpdatingIDUser INT NOT NULL DEFAULT '0',
|
|
63
|
-
Deleted TINYINT NOT NULL DEFAULT '0',
|
|
64
|
-
DeleteDate DATETIME,
|
|
65
|
-
DeletingIDUser INT NOT NULL DEFAULT '0',
|
|
66
|
-
Name CHAR(200) NOT NULL DEFAULT '',
|
|
67
|
-
|
|
68
|
-
PRIMARY KEY (IDAuthor)
|
|
69
|
-
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
-- [ BookPrice ]
|
|
74
|
-
CREATE TABLE IF NOT EXISTS
|
|
75
|
-
BookPrice
|
|
76
|
-
(
|
|
77
|
-
IDBookPrice INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
78
|
-
GUIDBookPrice CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
|
|
79
|
-
CreateDate DATETIME,
|
|
80
|
-
CreatingIDUser INT NOT NULL DEFAULT '0',
|
|
81
|
-
UpdateDate DATETIME,
|
|
82
|
-
UpdatingIDUser INT NOT NULL DEFAULT '0',
|
|
83
|
-
Deleted TINYINT NOT NULL DEFAULT '0',
|
|
84
|
-
DeleteDate DATETIME,
|
|
85
|
-
DeletingIDUser INT NOT NULL DEFAULT '0',
|
|
86
|
-
Price DECIMAL(8,2),
|
|
87
|
-
StartDate DATETIME,
|
|
88
|
-
EndDate DATETIME,
|
|
89
|
-
Discountable TINYINT NOT NULL DEFAULT '0',
|
|
90
|
-
CouponCode CHAR(16) NOT NULL DEFAULT '',
|
|
91
|
-
IDBook INT NOT NULL DEFAULT '0',
|
|
92
|
-
|
|
93
|
-
PRIMARY KEY (IDBookPrice)
|
|
94
|
-
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-- [ Review ]
|
|
99
|
-
CREATE TABLE IF NOT EXISTS
|
|
100
|
-
Review
|
|
101
|
-
(
|
|
102
|
-
IDReviews INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
|
103
|
-
GUIDReviews CHAR(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000',
|
|
104
|
-
CreateDate DATETIME,
|
|
105
|
-
CreatingIDUser INT NOT NULL DEFAULT '0',
|
|
106
|
-
UpdateDate DATETIME,
|
|
107
|
-
UpdatingIDUser INT NOT NULL DEFAULT '0',
|
|
108
|
-
Deleted TINYINT NOT NULL DEFAULT '0',
|
|
109
|
-
DeleteDate DATETIME,
|
|
110
|
-
DeletingIDUser INT NOT NULL DEFAULT '0',
|
|
111
|
-
Text TEXT,
|
|
112
|
-
Rating INT NOT NULL DEFAULT '0',
|
|
113
|
-
IDBook INT NOT NULL DEFAULT '0',
|
|
114
|
-
|
|
115
|
-
PRIMARY KEY (IDReviews)
|
|
116
|
-
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* @author <steven@velozo.com>
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Cumulation Configuration Defaults
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
module.exports = (
|
|
11
|
-
{
|
|
12
|
-
// The server to connect to (with trailing forward slash)
|
|
13
|
-
Server: 'http://127.0.0.1:8088/1.0/',
|
|
14
|
-
|
|
15
|
-
// Any cookies to be sent
|
|
16
|
-
Cookies: {},
|
|
17
|
-
Headers: {}
|
|
18
|
-
}
|
|
19
|
-
);
|
package/source/Cumulation.js
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license MIT
|
|
3
|
-
* @author <steven@velozo.com>
|
|
4
|
-
*/
|
|
5
|
-
const libGraphGet = require('./GraphGet.js');
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Cumulation browser sync library
|
|
9
|
-
*
|
|
10
|
-
* @class Cumulation
|
|
11
|
-
*/
|
|
12
|
-
class Cumulation
|
|
13
|
-
{
|
|
14
|
-
constructor(pFable, pRequestSettings)
|
|
15
|
-
{
|
|
16
|
-
this._Dependencies = {};
|
|
17
|
-
this._Dependencies.underscore = require('underscore');
|
|
18
|
-
this._Dependencies.simpleget = require('simple-get');
|
|
19
|
-
this._Dependencies.cookie = require('cookie');
|
|
20
|
-
this._Dependencies.cumulation = this;
|
|
21
|
-
|
|
22
|
-
// We want to make sure these are unique settings trees for each Cumulation object created.
|
|
23
|
-
this._RequestSettings = JSON.parse(JSON.stringify(this._Dependencies.underscore.extend(JSON.parse(JSON.stringify(require('./Cumulation-Settings-Default.js'))), pRequestSettings)));
|
|
24
|
-
|
|
25
|
-
// This has behaviors similar to bunyan, for consistency
|
|
26
|
-
this._Log = pFable.log;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* GET RECORDS (plural)
|
|
32
|
-
*
|
|
33
|
-
**/
|
|
34
|
-
fetchRecords (pEntity, pRecordsString, fCallback)
|
|
35
|
-
{
|
|
36
|
-
let tmpCallBack = (typeof(fCallback) === 'function') ? fCallback : ()=>{};
|
|
37
|
-
let tmpURL = this._RequestSettings.Server+pEntity+'s/'+pRecordsString;
|
|
38
|
-
let tmpRequestOptions = (
|
|
39
|
-
{
|
|
40
|
-
url: tmpURL,
|
|
41
|
-
headers: JSON.parse(JSON.stringify(this._RequestSettings.Headers))
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
let tmpCookies = [];
|
|
45
|
-
Object.keys(this._RequestSettings.Cookies).forEach((pKey)=>
|
|
46
|
-
{
|
|
47
|
-
tmpCookies.push(this._Dependencies.cookie.serialize(pKey, this._RequestSettings.Cookies[pKey]));
|
|
48
|
-
});
|
|
49
|
-
if (tmpCookies.length > 0)
|
|
50
|
-
tmpRequestOptions.headers.cookie = tmpCookies.join(';');
|
|
51
|
-
|
|
52
|
-
if (this._RequestSettings.DebugLog)
|
|
53
|
-
this._Log.debug(`Beginning GET plural request`,tmpRequestOptions);
|
|
54
|
-
//let tmpRequestTime = this._Log.getTimeStamp();
|
|
55
|
-
|
|
56
|
-
this._Dependencies.simpleget.get(tmpRequestOptions, (pError, pResponse)=>
|
|
57
|
-
{
|
|
58
|
-
if (pError)
|
|
59
|
-
{
|
|
60
|
-
return tmpCallBack(pError);
|
|
61
|
-
}
|
|
62
|
-
//if (this._RequestSettings.DebugLog)
|
|
63
|
-
// this._Log.debug(`--> GET plural connected in ${this._Log.getTimeDelta(tmpRequestTime)}ms code ${pResponse.statusCode}`);
|
|
64
|
-
|
|
65
|
-
let tmpData = '';
|
|
66
|
-
|
|
67
|
-
pResponse.on('data', (pChunk)=>
|
|
68
|
-
{
|
|
69
|
-
//if (this._RequestSettings.DebugLog)
|
|
70
|
-
// this._Log.debug(`--> GET plural data chunk size ${pChunk.length}b received in ${this._Log.getTimeDelta(tmpRequestTime)}ms`);
|
|
71
|
-
tmpData += pChunk;
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
pResponse.on('end', ()=>
|
|
75
|
-
{
|
|
76
|
-
let tmpResult = null;
|
|
77
|
-
if (tmpData)
|
|
78
|
-
tmpResult = JSON.parse(tmpData);
|
|
79
|
-
if (this._RequestSettings.DebugLog)
|
|
80
|
-
{
|
|
81
|
-
//this._Log.debug(`==> GET plural completed data size ${tmpData.length}b received in ${this._Log.getTimeDelta(tmpRequestTime)}ms`,tmpResult);
|
|
82
|
-
//this._Log.debug(`==> GET plural completed data size ${tmpData.length}b (${tmpResult.length} records) received in ${this._Log.getTimeDelta(tmpRequestTime)}ms`);
|
|
83
|
-
}
|
|
84
|
-
tmpCallBack(pError, tmpResult);
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
module.exports = Cumulation;
|