meadow 1.1.1 → 2.0.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/.config/code-server/config.yaml +4 -0
- package/.config/configstore/update-notifier-npm-check-updates.json +4 -0
- package/.config/configstore/update-notifier-npm.json +4 -0
- package/.config/luxury-extras/.vscode/launch.json +46 -0
- package/.config/luxury-extras/Dockerfile +32 -0
- package/.config/luxury-extras/MySQL/Dockerfile +51 -0
- package/.config/luxury-extras/MySQL/MySQL-Laden-Entry.sh +17 -0
- package/.config/luxury-extras/MySQL/MySQL-Security.sql +5 -0
- package/.config/luxury-extras/model/ddl/BookStore.ddl +66 -0
- package/.config/luxury-extras/model/documentation/Dictionary.md +18 -0
- package/.config/luxury-extras/model/documentation/Model-Author.md +20 -0
- package/.config/luxury-extras/model/documentation/Model-Book.md +26 -0
- package/.config/luxury-extras/model/documentation/Model-BookAuthorJoin.md +14 -0
- package/.config/luxury-extras/model/documentation/Model-BookPrice.md +25 -0
- package/.config/luxury-extras/model/documentation/Model-Review.md +22 -0
- package/.config/luxury-extras/model/documentation/ModelChangeTracking.md +17 -0
- package/.config/luxury-extras/model/documentation/README.md +1 -0
- package/.config/luxury-extras/model/documentation/diagram/README.md +1 -0
- package/.config/luxury-extras/model/documentation/diagram/Stricture_Output.dot +13 -0
- package/.config/luxury-extras/model/documentation/diagram/Stricture_Output.png +0 -0
- package/.config/luxury-extras/model/generated_diagram/README.md +1 -0
- package/.config/luxury-extras/model/generated_diagram/Stricture_Output.dot +13 -0
- package/.config/luxury-extras/model/generated_diagram/Stricture_Output.png +0 -0
- package/.config/luxury-extras/model/generated_documentation/Dictionary.md +18 -0
- package/.config/luxury-extras/model/generated_documentation/Model-Author.md +20 -0
- package/.config/luxury-extras/model/generated_documentation/Model-Book.md +26 -0
- package/.config/luxury-extras/model/generated_documentation/Model-BookAuthorJoin.md +14 -0
- package/.config/luxury-extras/model/generated_documentation/Model-BookPrice.md +25 -0
- package/.config/luxury-extras/model/generated_documentation/Model-Review.md +22 -0
- package/.config/luxury-extras/model/generated_documentation/ModelChangeTracking.md +17 -0
- package/.config/luxury-extras/model/generated_documentation/README.md +1 -0
- package/.config/luxury-extras/model/json_schema/BookStore-Extended.json +915 -0
- package/.config/luxury-extras/model/json_schema/BookStore-PICT.json +1 -0
- package/.config/luxury-extras/model/json_schema/BookStore.json +280 -0
- package/.config/luxury-extras/model/json_schema/README.md +1 -0
- package/.config/luxury-extras/model/json_schema_entities/BookStore-MeadowSchema-Author.json +220 -0
- package/.config/luxury-extras/model/json_schema_entities/BookStore-MeadowSchema-Book.json +268 -0
- package/.config/luxury-extras/model/json_schema_entities/BookStore-MeadowSchema-BookAuthorJoin.json +172 -0
- package/.config/luxury-extras/model/json_schema_entities/BookStore-MeadowSchema-BookPrice.json +260 -0
- package/.config/luxury-extras/model/json_schema_entities/BookStore-MeadowSchema-Review.json +236 -0
- package/.config/luxury-extras/model/json_schema_entities/README.md +1 -0
- package/.config/luxury-extras/model/json_schema_model/BookStore-Extended.json +915 -0
- package/.config/luxury-extras/model/json_schema_model/BookStore-PICT.json +1 -0
- package/.config/luxury-extras/model/json_schema_model/BookStore.json +280 -0
- package/.config/luxury-extras/model/json_schema_model/README.md +1 -0
- package/.config/luxury-extras/model/manual_scripts/DropTables.sql +5 -0
- package/.config/luxury-extras/model/manual_scripts/README.md +2 -0
- package/.config/luxury-extras/model/meadow_schema/BookStore-MeadowSchema-Author.json +220 -0
- package/.config/luxury-extras/model/meadow_schema/BookStore-MeadowSchema-Book.json +268 -0
- package/.config/luxury-extras/model/meadow_schema/BookStore-MeadowSchema-BookAuthorJoin.json +172 -0
- package/.config/luxury-extras/model/meadow_schema/BookStore-MeadowSchema-BookPrice.json +260 -0
- package/.config/luxury-extras/model/meadow_schema/BookStore-MeadowSchema-Review.json +236 -0
- package/.config/luxury-extras/model/meadow_schema/README.md +1 -0
- package/.config/luxury-extras/model/mysql_create/BookStore-CreateDatabase.mysql.sql +116 -0
- package/.config/luxury-extras/model/mysql_create/README.md +1 -0
- package/.config/luxury-extras/model/sql_create/BookStore-CreateDatabase.mysql.sql +116 -0
- package/.config/luxury-extras/model/sql_create/README.md +1 -0
- package/.vscode/launch.json +46 -0
- package/Dockerfile_LUXURYCode +65 -0
- package/README.md +19 -5
- package/debug/Harness.js +69 -84
- package/dist/meadow.js +1669 -0
- package/dist/meadow.min.js +65 -0
- package/dist/meadow.min.js.map +1 -0
- package/gulpfile.js +83 -0
- package/package.json +42 -20
- package/source/Meadow-Browser-Shim.js +14 -0
- package/source/{Meadow-PackageLoader.js → Meadow-PackageFileLoader.js} +3 -3
- package/source/Meadow-PackageObjectLoader.js +62 -0
- package/source/Meadow.js +21 -3
- package/source/behaviors/Meadow-Count.js +2 -2
- package/source/behaviors/Meadow-Create.js +3 -4
- package/source/behaviors/Meadow-Delete.js +2 -2
- package/source/behaviors/Meadow-Read.js +5 -4
- package/source/behaviors/Meadow-Reads.js +4 -3
- package/source/behaviors/Meadow-Undelete.js +42 -0
- package/source/behaviors/Meadow-Update.js +2 -2
- package/source/providers/Meadow-Provider-ALASQL.js +33 -0
- package/source/providers/Meadow-Provider-MeadowEndpoints.js +3 -4
- package/source/providers/Meadow-Provider-MySQL.js +40 -0
- package/source/providers/Meadow-Provider-None.js +8 -0
- package/test/Meadow-Provider-ALASQL.js +38 -14
- package/test/Meadow-Provider-MeadowEndpoints_tests.js +2 -819
- package/test/Meadow-Provider-MySQL_tests.js +49 -13
- package/test/Meadow-Provider-None_tests.js +19 -16
- package/test/Meadow_tests.js +59 -2
|
@@ -12,20 +12,20 @@ var Chai = require("chai");
|
|
|
12
12
|
var Expect = Chai.expect;
|
|
13
13
|
var Assert = Chai.assert;
|
|
14
14
|
|
|
15
|
-
var libAsync = require('async');
|
|
16
15
|
var libALASQL = require('alasql');
|
|
17
16
|
|
|
18
|
-
var libFable = require('fable')
|
|
17
|
+
var libFable = new (require('fable'))({
|
|
19
18
|
LogStreams:
|
|
20
19
|
[
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
{
|
|
21
|
+
level: 'fatal',
|
|
22
|
+
streamtype:'process.stdout',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
streamtype: 'simpleflatfile',
|
|
26
|
+
level: 'trace',
|
|
27
|
+
path: __dirname+'/../tests.log'
|
|
28
|
+
}
|
|
29
29
|
]
|
|
30
30
|
});
|
|
31
31
|
|
|
@@ -291,6 +291,30 @@ suite
|
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
test
|
|
294
|
+
(
|
|
295
|
+
'Undelete a record in the database',
|
|
296
|
+
function(fDone)
|
|
297
|
+
{
|
|
298
|
+
var testMeadow = newMeadow();
|
|
299
|
+
|
|
300
|
+
testMeadow.fable.settings.QueryThresholdWarnTime = 1;
|
|
301
|
+
var tmpQuery = testMeadow.query.addFilter('IDAnimal',3);
|
|
302
|
+
|
|
303
|
+
testMeadow.doUndelete(tmpQuery,
|
|
304
|
+
function(pError, pQuery, pRecord)
|
|
305
|
+
{
|
|
306
|
+
// TODO: Research why this is working but not returning the row count
|
|
307
|
+
Expect(pRecord)
|
|
308
|
+
.to.equal(1);
|
|
309
|
+
|
|
310
|
+
testMeadow.fable.settings.QueryThresholdWarnTime = 1000;
|
|
311
|
+
|
|
312
|
+
fDone();
|
|
313
|
+
}
|
|
314
|
+
)
|
|
315
|
+
}
|
|
316
|
+
);
|
|
317
|
+
test
|
|
294
318
|
(
|
|
295
319
|
'Count all records from the database',
|
|
296
320
|
function(fDone)
|
|
@@ -303,9 +327,9 @@ suite
|
|
|
303
327
|
testMeadow.doCount(testMeadow.query,
|
|
304
328
|
function(pError, pQuery, pRecord)
|
|
305
329
|
{
|
|
306
|
-
// There should be
|
|
330
|
+
// There should be 6 records
|
|
307
331
|
Expect(pRecord)
|
|
308
|
-
.to.equal(
|
|
332
|
+
.to.equal(6);
|
|
309
333
|
Expect(pQuery.parameters.result.executed)
|
|
310
334
|
.to.equal(true);
|
|
311
335
|
testMeadow.fable.settings.QueryThresholdWarnTime = 1000;
|
|
@@ -518,9 +542,9 @@ suite
|
|
|
518
542
|
testMeadow.doCount(testMeadow.query.setLogLevel(5),
|
|
519
543
|
function(pError, pQuery, pRecord)
|
|
520
544
|
{
|
|
521
|
-
// There should be
|
|
545
|
+
// There should be 7 records .. we undeleted one!
|
|
522
546
|
Expect(pRecord)
|
|
523
|
-
.to.equal(
|
|
547
|
+
.to.equal(7);
|
|
524
548
|
fDone();
|
|
525
549
|
}
|
|
526
550
|
)
|