@sap/cds-sqlite
Advanced tools
Comparing version 1.18.1 to 1.20.0
@@ -9,2 +9,20 @@ # Changelog | ||
## Version 1.20.0 - 2019-11-19 | ||
### Added | ||
- Conversion of hana's `seconds_between` function to `strftime` for sqlite | ||
## Version 1.19.1 - 2019-10-30 | ||
### Changed | ||
- Updated version of @sap/cds-sql to 1.19.1 | ||
## Version 1.19.0 - 2019-10-29 | ||
### Removed | ||
- `npm-shrinkwrap.json` | ||
## Version 1.18.1 - 2019-10-16 | ||
@@ -11,0 +29,0 @@ |
@@ -180,3 +180,3 @@ const { Database } = require('sqlite3') | ||
if (!query.SELECT && (typeof query !== 'string' || !query.trim().startsWith('SELECT'))) { | ||
throw new Error(`Cannot stream from HANA. Invalid query provided: ${JSON.stringify(query)}`) | ||
throw new Error(`Cannot stream from sqlite. Invalid query provided: ${JSON.stringify(query)}`) | ||
} | ||
@@ -384,8 +384,10 @@ | ||
/* istanbul ignore next */ | ||
return selectDeepUpdateData(this._csn && this._csn.definitions, cqn, this._execute.bind(this)).then(selectData => { | ||
return this.processNestedCQNs( | ||
createDeepUpdateCQNs(this._csn && this._csn.definitions, cqn, selectData), | ||
this._execute.bind(this) | ||
) | ||
}) | ||
return selectDeepUpdateData(this._csn && this._csn.definitions, cqn, this._execute.bind(this), this._context).then( | ||
selectData => { | ||
return this.processNestedCQNs( | ||
createDeepUpdateCQNs(this._csn && this._csn.definitions, cqn, selectData), | ||
this._execute.bind(this) | ||
) | ||
} | ||
) | ||
} | ||
@@ -392,0 +394,0 @@ |
@@ -48,2 +48,4 @@ const FunctionBuilder = require('@sap/cds-sql').builder.FunctionBuilder | ||
this._standardFunction(functionName, args) | ||
} else if (functionName === 'seconds_between') { | ||
this._secondsBetweenFunction(args) | ||
} else { | ||
@@ -135,2 +137,29 @@ super._handleFunction() | ||
_val (val) { | ||
this._outputObj.sql.push('?') | ||
this._outputObj.values.push(val) | ||
} | ||
_ref (ref) { | ||
this._outputObj.sql.push(new this.ReferenceBuilder(ref, this._options, this._csn).build().sql) | ||
} | ||
_secondsBetweenFunction (args) { | ||
this._outputObj.sql.push('strftime(?,') | ||
this._outputObj.values.push('%s') | ||
if (args[1].val) { | ||
this._val(args[1].val) | ||
} else { | ||
this._ref(args[1]) | ||
} | ||
this._outputObj.sql.push(') - strftime(?,') | ||
this._outputObj.values.push('%s') | ||
if (args[0].val) { | ||
this._val(args[0].val) | ||
} else { | ||
this._ref(args[0]) | ||
} | ||
this._outputObj.sql.push(')') | ||
} | ||
_timeFunction (functionName, args) { | ||
@@ -137,0 +166,0 @@ this._outputObj.sql.push('strftime(') |
@@ -1,1 +0,1 @@ | ||
{"bundleDependencies":false,"dependencies":{"@sap/cds-sql":"1.18.1"},"deprecated":false,"description":"Driver package for access to sqlite database, including setting up the client, configuring all the necessary options to initiate the connection and handling database specifics so that they can be processed on our end.","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-sqlite","version":"1.18.1","license":"SEE LICENSE IN developer-license-3.1.txt"} | ||
{"bundleDependencies":false,"dependencies":{"@sap/cds-sql":"1.20.0"},"deprecated":false,"description":"Driver package for access to sqlite database, including setting up the client, configuring all the necessary options to initiate the connection and handling database specifics so that they can be processed on our end.","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-sqlite","version":"1.20.0","license":"SEE LICENSE IN developer-license-3.1.txt"} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
NPM Shrinkwrap
Supply chain riskPackage contains a shrinkwrap file. This may allow the package to bypass normal install procedures.
Found 1 instance in 1 package
121205
1009
0
20
+ Added@babel/runtime@7.25.7(transitive)
+ Added@sap/cds-foss@1.1.0(transitive)
+ Added@sap/cds-sql@1.20.0(transitive)
+ Addedfs-extra@7.0.1(transitive)
+ Addedgeneric-pool@3.7.1(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedjsonfile@4.0.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addeduniversalify@0.1.2(transitive)
+ Addedyaml@1.5.1(transitive)
- Removed@sap/cds-sql@1.18.1(transitive)
Updated@sap/cds-sql@1.20.0