Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

breeze-sequelize

Package Overview
Dependencies
Maintainers
5
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

breeze-sequelize - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

2

package.json
{
"name": "breeze-sequelize",
"version": "0.5.4",
"version": "0.5.5",
"description": "Breeze Sequelize server implementation",

@@ -5,0 +5,0 @@ "keywords": [

@@ -25,3 +25,3 @@ "use strict";

// omitNull: true,
logging: console.log,
logging: false,
dialectOptions: { decimalNumbers: true },

@@ -28,0 +28,0 @@ define: {

@@ -53,8 +53,32 @@ "use strict";

constructor(sequelizeManager, serverSideEntityQuery) {
this.wasLogged = false;
this.sequelizeManager = sequelizeManager;
this.metadataStore = sequelizeManager.metadataStore;
this.entityType = serverSideEntityQuery._getFromEntityType(this.metadataStore, true);
this.entityQuery = serverSideEntityQuery;
this.sqQuery = this._processQuery();
try {
this.entityType = serverSideEntityQuery._getFromEntityType(this.metadataStore, true);
this.sqQuery = this._processQuery();
}
catch (err) {
this.logQuery();
throw err;
}
if (this.sequelizeManager.sequelizeOptions.logging) {
this.logQuery();
}
}
logQuery() {
if (this.wasLogged) {
return;
}
// log jsonQuery, not EntityQuery, or we get whole metadatastore
const { resourceName, jsonQuery } = this.entityQuery;
console.dir({ resourceName, jsonQuery }, { depth: 10 });
// remove `include` and `order` for logging, or we could get the whole sequelize model
const lob = Object.assign({}, this.sqQuery);
delete lob.include;
delete lob.order;
console.dir(lob, { depth: 10 });
this.wasLogged = true;
}
/** Execute the current query and return data objects */

@@ -93,2 +117,3 @@ execute(options) {

}
this.logQuery();
throw e;

@@ -124,5 +149,2 @@ }

}
if (this.sequelizeManager.sequelizeOptions.logging) {
console.dir(this.sqQuery, { depth: 10 });
}
return this.sqQuery;

@@ -129,0 +151,0 @@ }

@@ -34,2 +34,3 @@ import { EntityQuery, EntityType, MetadataStore, NavigationProperty, VisitContext } from "breeze-client";

transaction: Transaction;
private wasLogged;
private _nextId;

@@ -40,2 +41,3 @@ private _keyMap;

constructor(sequelizeManager: SequelizeManager, serverSideEntityQuery: EntityQuery);
private logQuery;
/** Execute the current query and return data objects */

@@ -42,0 +44,0 @@ execute(options?: SequelizeQueryOptions): Promise<SequelizeQueryResult>;

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