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

lambdaorm-base

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lambdaorm-base - npm Package Compare versions

Comparing version 0.1.22 to 0.1.23

2

package.json
{
"name": "lambdaorm-base",
"version": "0.1.22",
"version": "0.1.23",
"description": "ORM",

@@ -5,0 +5,0 @@ "author": "Flavio Lionel Rita <flaviolrita@proton.me>",

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

const intermediaPropertyPk = { name: 'id', type: 'integer', required: true, autoIncrement: true };
const intermediaEntity = { intermediate: true, name: intermediaEntityName, primaryKey: ['id'], properties: [intermediaPropertyPk, childProperty, parentProperty], uniqueKey: [parentProperty.name, childProperty.name], required: [], indexes: [], relations: [], dependents: [] };
const intermediaEntity = { name: intermediaEntityName, intermediate: true, primaryKey: ['id'], properties: [intermediaPropertyPk, childProperty, parentProperty], uniqueKey: [parentProperty.name, childProperty.name], required: [], indexes: [], relations: [], dependents: [] };
const parentRelation = {

@@ -216,3 +216,3 @@ name: this.helper.str.notation(entity.name, 'camel'),

getPk(objType) {
const uniques = objType.properties.filter(p => { var _a; return ((_a = p.type) === null || _a === void 0 ? void 0 : _a.unique) === true; });
const uniques = objType.properties.filter(p => { var _a, _b; return ((_a = p.type) === null || _a === void 0 ? void 0 : _a.unique) === true || ((_b = p.type) === null || _b === void 0 ? void 0 : _b.onParentDistinctUnique) === true; });
return this.getKey(uniques);

@@ -230,7 +230,5 @@ }

else if (uniques.length > 1) {
for (const keyName of ['id', 'code', 'key', 'name']) {
const id = uniques.find(p => p.name.toLowerCase() === keyName);
if (id) {
return id;
}
const id = uniques.find(p => ['id', 'code', 'key', 'name'].includes(p.name.toLowerCase()));
if (id) {
return id;
}

@@ -237,0 +235,0 @@ const idNumber = uniques.find(p => { var _a, _b; return ((_a = p.type) === null || _a === void 0 ? void 0 : _a.primitive) === 'number' || ((_b = p.type) === null || _b === void 0 ? void 0 : _b.primitive) === 'integer'; });

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