New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@balena/odata-to-abstract-sql

Package Overview
Dependencies
Maintainers
3
Versions
246
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@balena/odata-to-abstract-sql - npm Package Compare versions

Comparing version 5.4.2 to 5.4.3-date-compares-with-date-trunc-1fbea7c4974d959b0f58791126aeba80b161904e

4

CHANGELOG.md

@@ -7,2 +7,6 @@ # Change Log

## 5.4.3 - 2021-07-28
* Add SBVR Date TIme Type to DateTrunc Wrapper [fisehara]
## 5.4.2 - 2021-06-30

@@ -9,0 +13,0 @@

@@ -825,2 +825,16 @@ "use strict";

else {
const mapping = this.ResourceMapping(prop.resource);
if (mapping[prop.name]) {
const fieldDefinition = _.find(prop.resource.fields, {
fieldName: mapping[prop.name][1],
});
if ((fieldDefinition === null || fieldDefinition === void 0 ? void 0 : fieldDefinition.dataType) === 'Date Time' ||
(fieldDefinition === null || fieldDefinition === void 0 ? void 0 : fieldDefinition.dataType) === 'Date') {
return [
'DateTrunc',
['Text', 'milliseconds'],
this.ReferencedField(prop.resource, prop.name),
];
}
}
return this.ReferencedField(prop.resource, prop.name);

@@ -827,0 +841,0 @@ }

5

package.json
{
"name": "@balena/odata-to-abstract-sql",
"version": "5.4.2",
"version": "5.4.3-date-compares-with-date-trunc-1fbea7c4974d959b0f58791126aeba80b161904e",
"description": "A consumer of the OData parser, written in OMeta",

@@ -54,3 +54,6 @@ "main": "out/odata-to-abstract-sql.js",

"_": "test/resource_parsing.coffee"
},
"versionist": {
"publishedAt": "2021-07-28T12:31:10.760Z"
}
}

@@ -1083,2 +1083,20 @@ import * as _ from 'lodash';

} else {
// Used as ReferencedProperty a DateValue has to be handled with a date_trunc
// TODO: How to get the underlying db engine on this.layer
const mapping = this.ResourceMapping(prop.resource);
if (mapping[prop.name]) {
const fieldDefinition = _.find(prop.resource.fields, {
fieldName: mapping[prop.name][1],
});
if (
fieldDefinition?.dataType === 'Date Time' ||
fieldDefinition?.dataType === 'Date'
) {
return [
'DateTrunc',
['Text', 'milliseconds'],
this.ReferencedField(prop.resource, prop.name),
];
}
}
return this.ReferencedField(prop.resource, prop.name);

@@ -1085,0 +1103,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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