Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/moleculer-db/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ module.exports = {
idField: "_id",

/** @type {Array<String>?} Field filtering list. It must be an `Array`. If the value is `null` or `undefined` doesn't filter the fields of entities. */
fields: null,
fields: undefined,

/** @type {Array<String>?} List of excluded fields. It must be an `Array`. The value is `null` or `undefined` will be ignored. */
excludeFields: null,
excludeFields: undefined,

/** @type {Array?} Schema for population. [Read more](#populating). */
populates: null,
populates: undefined,

/** @type {Number} Default page size in `list` action. */
pageSize: 10,
Expand All @@ -67,7 +67,7 @@ module.exports = {
maxLimit: -1,

/** @type {Object|Function} Validator schema or a function to validate the incoming entity in `create` & 'insert' actions. */
entityValidator: null,
entityValidator: undefined,

/** @type {Boolean} Whether to use dot notation or not when updating an entity. Will **not** convert Array to dot notation. Default: `false` */
useDotNotation: false,
Expand Down
8 changes: 4 additions & 4 deletions packages/moleculer-db/test/unit/index.actions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ describe("Test DbService actions", () => {
it("should set default settings", () => {
expect(service.adapter).toEqual(adapter);
expect(service.settings).toEqual({
entityValidator: null,
fields: null,
excludeFields: null,
entityValidator: undefined,
fields: undefined,
excludeFields: undefined,
idField: "_id",
maxLimit: -1,
maxPageSize: 100,
pageSize: 10,
populates: null,
populates: undefined,
useDotNotation: false,
cacheCleanEventType: "broadcast"
});
Expand Down
8 changes: 4 additions & 4 deletions packages/moleculer-db/test/unit/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ describe("Test DbService actions", () => {
it("should set default settings", () => {
expect(service.adapter).toEqual(adapter);
expect(service.settings).toEqual({
entityValidator: null,
fields: null,
excludeFields: null,
entityValidator: undefined,
fields: undefined,
excludeFields: undefined,
idField: "_id",
maxLimit: -1,
maxPageSize: 100,
pageSize: 10,
populates: null,
populates: undefined,
useDotNotation: false,
cacheCleanEventType: "broadcast"
});
Expand Down