-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(disk): use local mongdb instead of disk
The sails-disk integration was causing problems in testing. The temporary files were not well cleaned and there was often random dead-locks. This mongodb package fetches the mongodb binary and we run it: - In a temp directory in dev (for persistance) - In memory for testing - There should not be more than 4 concurrent Jest process - The best option is using --runInBand in testing
- Loading branch information
Showing
4 changed files
with
805 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
/* eslint-disable sort-keys */ | ||
const types = require('mongoose').SchemaTypes; | ||
|
||
module.exports = { | ||
// Mongoose specific | ||
Array: 'json', | ||
Bool: 'boolean', | ||
Boolean: 'boolean', | ||
Buffer: 'string', | ||
Date: 'number', | ||
Decimal128: 'string', | ||
DocumentArray: 'json', | ||
Embedded: 'ref', | ||
Mixed: 'string', | ||
Number: 'number', | ||
Object: 'json', | ||
ObjectId: 'ref', | ||
String: 'string', | ||
String: types.String, | ||
Number: types.Number, | ||
Boolean: types.Boolean, | ||
DocumentArray: types.DocumentArray, | ||
Embedded: types.Embedded, | ||
Array: types.Array, | ||
Buffer: types.Buffer, | ||
Date: types.Date, | ||
ObjectId: types.ObjectId, | ||
Mixed: types.Mixed, | ||
Decimal128: types.Decimal128, | ||
Object: types.Mixed, | ||
Bool: types.Boolean, | ||
|
||
// Sequelize specific | ||
STRING: 'string', | ||
CHAR: 'string', | ||
TEXT: 'string', | ||
TINYINT: 'number', | ||
SMALLINT: 'number', | ||
MEDIUMINT: 'number', | ||
INTEGER: 'number', | ||
BIGINT: 'number', | ||
NUMBER: 'number', | ||
FLOAT: 'number', | ||
DOUBLE: 'number', | ||
DECIMAL: 'number', | ||
REAL: 'number', | ||
BOOLEAN: 'boolean', | ||
BLOB: 'string', | ||
ENUM: 'json', | ||
DATE: 'number', | ||
DATEONLY: 'number', | ||
TIME: 'number', | ||
NOW: 'number', | ||
UUID: 'string', | ||
UUIDV1: 'string', | ||
UUIDV4: 'string', | ||
HSTORE: 'string', | ||
JSON: 'json', | ||
JSONB: 'json', | ||
ARRAY: 'json', | ||
RANGE: 'string', | ||
GEOMETRY: 'string', | ||
GEOGRAPHY: 'string', | ||
VIRTUAL: 'json', | ||
STRING: types.String, | ||
CHAR: types.String, | ||
TEXT: types.String, | ||
TINYINT: types.Number, | ||
SMALLINT: types.Number, | ||
MEDIUMINT: types.Number, | ||
INTEGER: types.Number, | ||
BIGINT: types.Number, | ||
NUMBER: types.Number, | ||
FLOAT: types.Number, | ||
DOUBLE: types.Number, | ||
DECIMAL: types.Number, | ||
REAL: types.Number, | ||
BOOLEAN: types.Boolean, | ||
BLOB: types.String, | ||
ENUM: types.Array, | ||
DATE: types.Date, | ||
DATEONLY: types.Date, | ||
TIME: types.Date, | ||
NOW: types.Date, | ||
UUID: types.ObjectId, | ||
UUIDV1: types.ObjectId, | ||
UUIDV4: types.ObjectId, | ||
HSTORE: types.Mixed, | ||
JSON: types.Mixed, | ||
JSONB: types.Mixed, | ||
ARRAY: types.Array, | ||
RANGE: types.mixed, | ||
GEOMETRY: types.Mixed, | ||
GEOGRAPHY: types.Mixed, | ||
VIRTUAL: types.Mixed, | ||
}; |
Oops, something went wrong.