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

@sap/xsodata

Package Overview
Dependencies
Maintainers
3
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap/xsodata - npm Package Compare versions

Comparing version 4.5.4 to 4.6.0

6

CHANGELOG.md

@@ -11,2 +11,8 @@ # Change Log

## [4.6.0] - 2019-10-11
### Fixed
Fixed error "Error while executing a DB query" when using an navigation property to navigate from a calculation view to an related entity.
## [4.5.4] - 2019-08-26

@@ -13,0 +19,0 @@

3

lib/db/connect.js

@@ -250,2 +250,5 @@ 'use strict';

return _connectInternal(context, function (err) {
if (err) {
context.logger.debug('db', 'connect error ' + JSON.stringify(err));
}
context.logger.debug('db', 'connection is usable');

@@ -252,0 +255,0 @@ context.db.connectionInitialized = true;

@@ -463,4 +463,6 @@ 'use strict';

locks.writeLock(lockEntityID, function (release) {
context.logger.silly('model', 'got lock for: ' + lockEntityID);
//if loaded in the meantime
if (entityType.isInitialised) {
context.logger.silly('model', 'type already initialized: ' + lockEntityID);
release();

@@ -467,0 +469,0 @@ return cbErr();

2

lib/processor/batchProcessor.js

@@ -123,3 +123,3 @@ 'use strict';

if (err) {
batchContext.logger.info('SQL Exec', 'Commit Error: \n' + err);
batchContext.logger.info('SQL Exec', 'Commit Error: \n' + JSON.stringify(err));
return asyncDone(err, batchContext);

@@ -126,0 +126,0 @@ }

@@ -167,3 +167,3 @@ 'use strict';

if (sEventType !== 'postcommit') {
aParams.push('?');
aParams.push('?'); // for the error out parameter of the stored procedure
}

@@ -179,3 +179,3 @@

} else {
statement.exec({}, function (err, scalarParams, outTable) {
statement.exec([], function (err, outTable) {
if (err) {

@@ -182,0 +182,0 @@ return asyncDone(new SqlError(context, err), context);

@@ -150,6 +150,5 @@ 'use strict';

dbSeg.prepareInputParameters(sqlContext.context);
//create select statement
select = simpleSelectJoins(dbSeg);
select = simpleSelectJoins(dbSeg, sqlContext);

@@ -267,4 +266,3 @@ //add Query $filter

}
}
else if (objpr === 'property' && !props.hasOwnProperty(tree[objpr])) {
} else if (objpr === 'property' && !props.hasOwnProperty(tree[objpr])) {
return false;

@@ -368,3 +366,7 @@ }

function simpleSelectJoins(dbSeg) {
function simpleSelectJoins(dbSeg, sqlContext) {
// move input parameters from uri to dbSeg
sqlContext.context.logger.debug('simpleSelectJoins', 'prepareInputParameters');
dbSeg.prepareInputParameters(sqlContext.context);
//create select statement

@@ -375,8 +377,7 @@ var stm = new sql.Select();

if (dbSeg.previousDBSegment) { //end of recursion
inner = simpleSelectJoins(dbSeg.previousDBSegment);
inner = simpleSelectJoins(dbSeg.previousDBSegment, sqlContext);
if (dbSeg.getOver()) {
handleKeyPropertiesInOverTable(inner, dbSeg);
}
else {
} else {
handleKeyProperties(inner, dbSeg);

@@ -429,3 +430,2 @@ }

stm.addFrom(fromSource, dbSeg.getInputParameters());
if (inner) {

@@ -432,0 +432,0 @@ //WHERE set Exists first

@@ -22,3 +22,3 @@ 'use strict';

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -31,3 +31,3 @@ return asyncDone(new SqlError(context, err), context);

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -52,3 +52,3 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -61,3 +61,3 @@ return asyncDone(new SqlError(context, err), context);

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -90,3 +90,3 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -120,3 +120,3 @@ return cb(new SqlError(context, err));

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -130,3 +130,3 @@ return cb(new SqlError(context, err));

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -133,0 +133,0 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

@@ -34,3 +34,3 @@ 'use strict';

if (err) {
context.logger.info('SQL Exec', 'Commit Error: \n' + err);
context.logger.info('SQL Exec', 'Commit Error: \n' + JSON.stringify(err));
return asyncDone(err, context);

@@ -37,0 +37,0 @@ }

@@ -40,3 +40,3 @@ 'use strict';

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -49,3 +49,3 @@ return cb(new SqlError(context, err));

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -136,3 +136,3 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -148,3 +148,3 @@ return cb(new SqlError(context, err));

} else {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -202,3 +202,3 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

if (err) {
context.logger.info('SQL Exec CBF', 'Error: \n' + err);
context.logger.info('SQL Exec CBF', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec CBF', 'SQL: \n' + sql);

@@ -209,3 +209,3 @@ return callback(new SqlError(context, err));

if (err) {
context.logger.info('SQL Exec CBF', 'Error: \n' + err);
context.logger.info('SQL Exec CBF', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec CBF', 'SQL: \n' + sql);

@@ -264,3 +264,3 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

if (err) {
context.logger.info('executeSelect', 'Error: \n' + err);
context.logger.info('executeSelect', 'Error: \n' + JSON.stringify(err));
context.logger.info('executeSelect', 'SQL: \n' + sql);

@@ -273,3 +273,3 @@ return callback(new SqlError(context, err));

if (err) {
context.logger.info('executeSelect', 'Error: \n' + err);
context.logger.info('executeSelect', 'Error: \n' + JSON.stringify(err));
context.logger.info('executeSelect', 'SQL: \n' + sql);

@@ -276,0 +276,0 @@ context.logger.info('executeSelect', 'Parameters:\n' + JSON.stringify(parameters));

@@ -146,3 +146,3 @@ 'use strict';

if (err) {
context.logger.info('SQL Exec', 'Commit Error: \n' + err);
context.logger.info('SQL Exec', 'Commit Error: \n' + JSON.stringify(err));
return asyncDone(err, context);

@@ -149,0 +149,0 @@ }

@@ -117,3 +117,3 @@ 'use strict';

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -126,3 +126,3 @@ return asyncDone(new SqlError(context, err), context);

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -149,3 +149,3 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -158,3 +158,3 @@ return asyncDone(new SqlError(context, err), context);

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -182,3 +182,3 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -191,3 +191,3 @@ return asyncDone(new SqlError(context, err), context);

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -217,3 +217,3 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

if (err) {
context.logger.info('SQL Exec', 'Commit Error: \n' + err);
context.logger.info('SQL Exec', 'Commit Error: \n' + JSON.stringify(err));
return asyncDone(err, context);

@@ -220,0 +220,0 @@ }

@@ -101,3 +101,3 @@ 'use strict';

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -110,3 +110,3 @@ return asyncDone(new SqlError(context, err), context);

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -153,3 +153,3 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -161,3 +161,3 @@ return asyncDone(new SqlError(context, err), context);

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -183,3 +183,3 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -192,3 +192,3 @@ return asyncDone(new SqlError(context, err), context);

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -228,3 +228,3 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -237,3 +237,3 @@ return asyncDone(new SqlError(context, err), context);

if (err) {
context.logger.info('SQL Exec', 'Error: \n' + err);
context.logger.info('SQL Exec', 'Error: \n' + JSON.stringify(err));
context.logger.info('SQL Exec', 'SQL: \n' + sql);

@@ -268,3 +268,3 @@ context.logger.info('SQL Exec', 'Parameters:\n' + JSON.stringify(p));

if (err) {
context.logger.info('SQL Exec', 'Commit Error: \n' + err);
context.logger.info('SQL Exec', 'Commit Error: \n' + JSON.stringify(err));
return asyncDone(err, context);

@@ -271,0 +271,0 @@ }

{
"name": "@sap/xsodata",
"version": "4.5.4",
"version": "4.6.0",
"dependencies": {

@@ -5,0 +5,0 @@ "@sap/xsenv": {

@@ -1,1 +0,1 @@

{"bundleDependencies":false,"dependencies":{"@sap/xsenv":"^2.0.0","@sap/xssec":"^2.2.3","async":"=3.0.1","big.js":"=5.2.2","body-parser":"=1.19.0","hdb":"=0.17.0","lodash":"=4.17.15","negotiator":"=0.6.2","rwlock":"=5.0.0","xml-writer":"=1.7.0"},"deprecated":false,"description":"Expose data from a HANA database as OData V2 service with help of .xsodata files.","devDependencies":{"@sap/hana-client":"=2.4.144","chai":"=4.2.0","expect":"=1.20.2","filter-node-package":"=2.2.0","istanbul":"=0.4.5","jison":"=0.4.18","jshint":"=2.10.2","mocha":"=6.2.0","mocha-simple-html-reporter":"=1.1.0","node-mocks-http":"=1.7.6","pegjs":"=0.10.0","sinon":"=6.1.4","xml2js":"=0.4.19"},"engines":{"node":"^6.0.0 || ^8.0.0 || ^10.0.0"},"keywords":["odata","xsjs"],"main":"index.js","name":"@sap/xsodata","repository":{"type":"git"},"scripts":{"all-tests":"node ./node_modules/mocha/bin/_mocha test/**/test*.js test_apps/test_**/**/test*.js","all-tests-jenkins":"node ./node_modules/mocha/bin/_mocha 'test/**/test*.js' 'test_apps/test_**/**/test*.js'","cover":"istanbul cover -x test/**/* -x test_apps/**/* --report lcov --dir ./_coverage ./node_modules/mocha/bin/_mocha -- -R spec test/**/test*.js test_apps/**/test*.js","cover-jenkins":"istanbul cover ./node_modules/mocha/bin/_mocha 'test/**/test*.js' 'test_apps/**/test*.js' && istanbul check-coverage ./_coverage/coverage.json","cover-scenario-tests":"istanbul cover -x test_apps/**/* --report lcov --dir ./_coverage ./node_modules/mocha/bin/_mocha -- -R spec test_apps/**/test*.js","cover-unit-tests":"istanbul cover -x test/**/* --report lcov --dir ./_coverage ./node_modules/mocha/bin/_mocha -- -R spec test/**/test*.js","env":"env","gen":"npm run genfilter && npm run genorderby && npm run gensegment && npm run genxso && npm run genxml && npm run genDateTimeParser","genDateTimeParser":"pegjs lib/grammars/dateTimeToJson.peg lib/parsers/dateTimeParser.js","genfilter":"jison lib/grammars/filter.jison -o lib/parsers/jison_filter_parser.js","genorderby":"jison lib/grammars/orderby.jison -o lib/parsers/jison_orderby_parser.js","gensegment":"jison lib/grammars/segment.jison -o lib/parsers/jison_segment_parser.js","genuri_kv":"jison lib/grammars/uriKeyValue.jison -o lib/parsers/uriKeyValue.js","genxml":"pegjs -o lib/parsers/xml2JsonParser.js lib/grammars/xml2json.peg","genxso":"pegjs -o lib/parsers/peg_xsodata_parser.js lib/grammars/xsodata.peg","lint":"jshint .","prepareRelease":"clean-packages && npm prune --production && ls && cat package.json","pretest":"npm -g ls --depth=0 && npm ls --depth=0","report":"node ./node_modules/mocha/bin/_mocha test/**/test*.js test_apps/test_**/**/test*.js --reporter mocha-simple-html-reporter --reporter-options output=_gen/report/report_all.html","report-scenario-tests":"node ./node_modules/mocha/bin/_mocha test_apps/test_**/**/test*.js --reporter mocha-simple-html-reporter --reporter-options output=_gen/report/report_scenario.html","report-unit-tests":"node ./node_modules/mocha/bin/_mocha test/**/test*.js --reporter mocha-simple-html-reporter --reporter-options output=_gen/report/report_unit.html","scenario-tests":"node ./node_modules/mocha/bin/_mocha test_apps/test_**/**/test*.js","serve":"node test_apps/server","serve-debug":"node-debug test_apps/server","test":"npm run unit-tests","unit-tests":"node ./node_modules/mocha/bin/_mocha test/**/test*.js"},"version":"4.5.4","license":"SEE LICENSE IN developer-license-3.1.txt"}
{"bundleDependencies":false,"dependencies":{"@sap/xsenv":"^2.0.0","@sap/xssec":"^2.2.3","async":"=3.0.1","big.js":"=5.2.2","body-parser":"=1.19.0","hdb":"=0.17.0","lodash":"=4.17.15","negotiator":"=0.6.2","rwlock":"=5.0.0","xml-writer":"=1.7.0"},"deprecated":false,"description":"Expose data from a HANA database as OData V2 service with help of .xsodata files.","devDependencies":{"@sap/hana-client":"=2.4.144","chai":"=4.2.0","expect":"=1.20.2","filter-node-package":"=2.2.0","istanbul":"=0.4.5","jison":"=0.4.18","jshint":"=2.10.2","mocha":"=6.2.0","mocha-simple-html-reporter":"=1.1.0","node-mocks-http":"=1.7.6","pegjs":"=0.10.0","sinon":"=6.1.4","xml2js":"=0.4.19"},"engines":{"node":"^6.0.0 || ^8.0.0 || ^10.0.0"},"keywords":["odata","xsjs"],"main":"index.js","name":"@sap/xsodata","repository":{"type":"git"},"scripts":{"all-tests":"node ./node_modules/mocha/bin/_mocha test/**/test*.js test_apps/test_**/**/test*.js","all-tests-jenkins":"node ./node_modules/mocha/bin/_mocha 'test/**/test*.js' 'test_apps/test_**/**/test*.js'","cover":"istanbul cover -x test/**/* -x test_apps/**/* --report lcov --dir ./_coverage ./node_modules/mocha/bin/_mocha -- -R spec test/**/test*.js test_apps/**/test*.js","cover-jenkins":"istanbul cover ./node_modules/mocha/bin/_mocha 'test/**/test*.js' 'test_apps/**/test*.js' && istanbul check-coverage ./_coverage/coverage.json","cover-scenario-tests":"istanbul cover -x test_apps/**/* --report lcov --dir ./_coverage ./node_modules/mocha/bin/_mocha -- -R spec test_apps/**/test*.js","cover-unit-tests":"istanbul cover -x test/**/* --report lcov --dir ./_coverage ./node_modules/mocha/bin/_mocha -- -R spec test/**/test*.js","env":"env","gen":"npm run genfilter && npm run genorderby && npm run gensegment && npm run genxso && npm run genxml && npm run genDateTimeParser","genDateTimeParser":"pegjs lib/grammars/dateTimeToJson.peg lib/parsers/dateTimeParser.js","genfilter":"jison lib/grammars/filter.jison -o lib/parsers/jison_filter_parser.js","genorderby":"jison lib/grammars/orderby.jison -o lib/parsers/jison_orderby_parser.js","gensegment":"jison lib/grammars/segment.jison -o lib/parsers/jison_segment_parser.js","genuri_kv":"jison lib/grammars/uriKeyValue.jison -o lib/parsers/uriKeyValue.js","genxml":"pegjs -o lib/parsers/xml2JsonParser.js lib/grammars/xml2json.peg","genxso":"pegjs -o lib/parsers/peg_xsodata_parser.js lib/grammars/xsodata.peg","lint":"jshint .","prepareRelease":"clean-packages && npm prune --production && ls && cat package.json","pretest":"npm -g ls --depth=0 && npm ls --depth=0","report":"node ./node_modules/mocha/bin/_mocha test/**/test*.js test_apps/test_**/**/test*.js --reporter mocha-simple-html-reporter --reporter-options output=_gen/report/report_all.html","report-scenario-tests":"node ./node_modules/mocha/bin/_mocha test_apps/test_**/**/test*.js --reporter mocha-simple-html-reporter --reporter-options output=_gen/report/report_scenario.html","report-unit-tests":"node ./node_modules/mocha/bin/_mocha test/**/test*.js --reporter mocha-simple-html-reporter --reporter-options output=_gen/report/report_unit.html","scenario-tests":"node ./node_modules/mocha/bin/_mocha test_apps/test_**/**/test*.js","serve":"node test_apps/server","serve-debug":"node-debug test_apps/server","test":"npm run unit-tests","unit-tests":"node ./node_modules/mocha/bin/_mocha test/**/test*.js"},"version":"4.6.0","license":"SEE LICENSE IN developer-license-3.1.txt"}

Sorry, the diff of this file is not supported yet

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