@berish/orm
Advanced tools
Comparing version 0.9.2 to 0.10.0
@@ -36,8 +36,6 @@ "use strict"; | ||
set(key, value) { | ||
if (typeof value === 'undefined') | ||
return this.unset(key); | ||
this.attributes[key] = value; | ||
} | ||
unset(key) { | ||
this.attributes[key] = null; | ||
this.set(key, null); | ||
} | ||
@@ -44,0 +42,0 @@ getSystem(key) { |
@@ -13,3 +13,2 @@ "use strict"; | ||
const queryToFullQueryPlugin_1 = require("./plugins/queryToFullQueryPlugin"); | ||
const undefinedDBPlugin_1 = require("./plugins/undefinedDBPlugin"); | ||
class SerberInstances { | ||
@@ -44,3 +43,3 @@ constructor() { | ||
return new serber_1.Serber() | ||
.addPlugin(undefinedDBPlugin_1.undefinedDBPlugin) | ||
.addPlugin(serber_1.plugins.undefinedPlugin) | ||
.addPlugin(serber_1.plugins.nullPlugin) | ||
@@ -65,3 +64,3 @@ .addPlugin(serber_1.plugins.boolPlugin) | ||
return new serber_1.Serber() | ||
.addPlugin(undefinedDBPlugin_1.undefinedDBPlugin) | ||
.addPlugin(serber_1.plugins.undefinedPlugin) | ||
.addPlugin(serber_1.plugins.nullPlugin) | ||
@@ -68,0 +67,0 @@ .addPlugin(serber_1.plugins.boolPlugin) |
@@ -39,3 +39,3 @@ "use strict"; | ||
const out = { id, createdAt: utils_1.getTimestamp(createdAt), updatedAt: utils_1.getTimestamp(updatedAt) }; | ||
const entries = Object.entries(attributes); | ||
const entries = Object.entries(attributes).filter(([key, value]) => typeof value !== 'undefined'); | ||
for (const [key, value] of entries) { | ||
@@ -42,0 +42,0 @@ const serialized = instances_1.serberInstances.serberEntitiesToPointer.serialize(value, Object.assign(Object.assign({}, options), { [serber_1.SERBER_KEY_SYMBOL]: key, [serber_1.SERBER_PARENT_OBJECT_SYMBOL]: obj, [serber_1.SERBER_PATH_SYMBOL]: options[serber_1.SERBER_PATH_SYMBOL].concat(key) })); |
@@ -8,2 +8,1 @@ export * from './entityToBaseDBItemPlugin'; | ||
export * from './queryToFullQueryPlugin'; | ||
export * from './undefinedDBPlugin'; |
@@ -20,3 +20,2 @@ "use strict"; | ||
__exportStar(require("./queryToFullQueryPlugin"), exports); | ||
__exportStar(require("./undefinedDBPlugin"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@berish/orm", | ||
"version": "0.9.2", | ||
"version": "0.10.0", | ||
"description": "ORM", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
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
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
229176
3182