Socket
Socket
Sign inDemoInstall

moleculer-db-adapter-sequelize

Package Overview
Dependencies
Maintainers
0
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moleculer-db-adapter-sequelize - npm Package Compare versions

Comparing version 0.2.16 to 0.2.17

6

package.json
{
"name": "moleculer-db-adapter-sequelize",
"version": "0.2.16",
"version": "0.2.17",
"description": "SQL adapter (Postgres, MySQL, SQLite & MSSQL) for Moleculer DB service",

@@ -30,3 +30,3 @@ "main": "index.js",

"peerDependencies": {
"moleculer": "^0.12.0 || ^0.13.0 || ^0.14.0",
"moleculer": "^0.12.0 || ^0.13.0 || ^0.14.0 || ^0.15.0",
"sequelize": "^5.9.4 || ^6.7.0"

@@ -66,3 +66,3 @@ },

},
"gitHead": "27e410ca416cd1f97682b7e789c0b8a829717e24"
"gitHead": "b8026d6b112201ed48a2160f8a8623cf816e2083"
}

@@ -305,6 +305,5 @@ /*

createCursor(params, isCounting) {
const strictCountRule = { distinct: true, col: `${this.model.name ||this.model.tableName}.${this.model.primaryKeyAttribute}` };
if (!params) {
if (isCounting)
return this.model.count(strictCountRule);
return this.model.count();

@@ -361,3 +360,3 @@ return this.model.findAll();

if (isCounting)
return this.model.count(_.merge(q, strictCountRule));
return this.model.count(q);

@@ -364,0 +363,0 @@ return this.model.findAll(q);

@@ -8,4 +8,2 @@ "use strict";

const model = {
tableName: "posts",
primaryKeyAttribute: 'id',
sync: jest.fn(() => Promise.resolve()),

@@ -46,3 +44,2 @@ findAll: jest.fn(() => Promise.resolve()),

define: {
id: { type: "number", primaryKey: true },
a: 5

@@ -171,6 +168,3 @@ },

expect(adapter.model.count).toHaveBeenCalledTimes(1);
expect(adapter.model.count).toHaveBeenCalledWith({
distinct: true,
col: `${model.tableName}.${model.primaryKeyAttribute}`
});
expect(adapter.model.count).toHaveBeenCalledWith();
});

@@ -191,7 +185,3 @@

expect(adapter.model.count).toHaveBeenCalledTimes(1);
expect(adapter.model.count).toHaveBeenCalledWith({
distinct: true,
col: `${model.tableName}.${model.primaryKeyAttribute}`,
where: query
});
expect(adapter.model.count).toHaveBeenCalledWith({ where: query });
});

@@ -198,0 +188,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc