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

@sap/cds-sql

Package Overview
Dependencies
Maintainers
3
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap/cds-sql - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

6

CHANGELOG.md

@@ -9,2 +9,8 @@ # Changelog

## Version 1.5.1 - 2019-02-12
### Added
- Support for sql functions lower, upper, trim, length in $filter and $orderby
## Version 1.5.0 - 2019-02-06

@@ -11,0 +17,0 @@

28

lib/sql-builder/ReferenceBuilder.js

@@ -48,5 +48,2 @@ const BaseBuilder = require('./BaseBuilder')

}
if (this._obj.sort) {
this._outputObj.sql.push(this._obj.sort === 'desc' ? 'DESC' : 'ASC')
}
} else {

@@ -56,2 +53,6 @@ this._outputObj.sql.push(this._obj)

if (this._obj.sort) {
this._outputObj.sql.push(this._obj.sort === 'desc' ? 'DESC' : 'ASC')
}
this._outputObj.sql = this._outputObj.sql.join(' ')

@@ -79,9 +80,22 @@ return this._outputObj

} else {
this._outputObj.sql.push(
this._obj.ref[1].args.map(e => new ReferenceBuilder(e, this._options, this._csn).build().sql).join(', '),
')'
)
this._addFunctionArgs(this._obj.ref[1].args)
this._outputObj.sql.push(')')
}
}
_addFunctionArgs (args) {
const res = []
for (const arg of args) {
if (arg.ref) {
const { sql, values } = new ReferenceBuilder(arg, this._options, this._csn).build()
res.push(sql)
this._outputObj.values.push(...values)
} else if (arg.val) {
this._outputObj.values.push(arg.val)
res.push(this._options.placeholder)
}
}
this._outputObj.sql.push(res.join(', '))
}
_createLikeComparison (contains, columns, searchText) {

@@ -88,0 +102,0 @@ const length = columns.length

{
"name": "@sap/cds-sql",
"version": "1.5.0",
"version": "1.5.1",
"lockfileVersion": 1
}

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

{"bundleDependencies":false,"dependencies":{},"deprecated":false,"description":"This package offers a factory method to build a SQL string from a CQN object and a BaseClient which performs default post processing to be used by the inheriting clients.","engines":{"node":">= 8.9.0"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"{lib,test}/**/*.js":["prettier-standard","standard --fix","git add"]},"main":"lib/index.js","name":"@sap/cds-sql","version":"1.5.0","license":"SEE LICENSE IN developer-license-3.1.txt"}
{"bundleDependencies":false,"dependencies":{},"deprecated":false,"description":"This package offers a factory method to build a SQL string from a CQN object and a BaseClient which performs default post processing to be used by the inheriting clients.","engines":{"node":">= 8.9.0"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"{lib,test}/**/*.js":["prettier-standard","standard --fix","git add"]},"main":"lib/index.js","name":"@sap/cds-sql","version":"1.5.1","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