lambdaorm-base
Advanced tools
Comparing version 1.5.3 to 1.6.0
{ | ||
"name": "lambdaorm-base", | ||
"version": "1.5.3", | ||
"version": "1.6.0", | ||
"description": "ORM", | ||
@@ -5,0 +5,0 @@ "author": "Flavio Lionel Rita <flaviolrita@proton.me>", |
@@ -25,3 +25,3 @@ /// <reference types="node" /> | ||
getSentenceCategory(action: SentenceAction): SentenceCategory; | ||
getInfo(action: SentenceAction, entity: string): SentenceInfo; | ||
getInfo(action: SentenceAction, entity: string, type?: SentenceType): SentenceInfo; | ||
} | ||
@@ -28,0 +28,0 @@ export declare class UUIDWrapper { |
@@ -155,2 +155,4 @@ "use strict"; | ||
return domain_1.SentenceCategory.drop; | ||
case domain_1.SentenceAction.undefined: | ||
return domain_1.SentenceCategory.undefined; | ||
default: | ||
@@ -160,5 +162,5 @@ throw new Error(`Invalid action ${action}`); | ||
} | ||
getInfo(action, entity) { | ||
getInfo(action, entity, type) { | ||
const category = this.getSentenceCategory(action); | ||
const type = this.getSentenceType(action); | ||
const _type = type || this.getSentenceType(action); | ||
return { | ||
@@ -168,8 +170,8 @@ entity, | ||
category, | ||
type, | ||
type: _type, | ||
// for retro-compatibility | ||
read: category === domain_1.SentenceCategory.select, | ||
write: category !== domain_1.SentenceCategory.select, | ||
ddl: type === domain_1.SentenceType.ddl, | ||
dml: type === domain_1.SentenceType.dml || type === domain_1.SentenceType.dql | ||
ddl: _type === domain_1.SentenceType.ddl, | ||
dml: _type === domain_1.SentenceType.dml || _type === domain_1.SentenceType.dql | ||
}; | ||
@@ -176,0 +178,0 @@ } |
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
360921
5320