ezobjects-mysql
Advanced tools
Comparing version 3.1.2 to 3.1.3
const docket = require(`docket-parser`); | ||
docket.title(`EZ Objects v3.1.2`); | ||
docket.title(`EZ Objects v3.1.3`); | ||
docket.linkClass(`text-success`); | ||
docket.parseFiles([`index.js`, `mysql-connection.js`]); | ||
docket.generateDocs(`docs`); |
10
index.js
@@ -926,3 +926,3 @@ /** | ||
/** If the first argument is a MySQL RowDataPacket, load from row data */ | ||
else if ( typeof arg1 == `object` && ( arg1.constructor.name == `RowDataPacket` || arg1.constructor.name == `Object` ) ) { | ||
else if ( typeof arg1 == `object` && ( arg1.constructor.name == `RowDataPacket` || arg1.constructor.name == `Object` ) ) { | ||
/** Create helper method for recursively loading property values into object */ | ||
@@ -937,11 +937,11 @@ const loadProperties = async (obj) => { | ||
/** Don't attempt to load properties that are not stored in the database */ | ||
if ( !property.store ) | ||
if ( !obj.properties[i].store ) | ||
continue; | ||
/** Append property in object */ | ||
if ( typeof arg1[property.name] !== `undefined` ) { | ||
if ( typeof arg1[obj.properties[i].name] !== `undefined` ) { | ||
if ( typeof db == 'object' && db.constructor.name == 'MySQLConnection' ) | ||
this[property.name](await property.loadTransform(arg1[property.name], property, db)); | ||
this[obj.properties[i].name](await obj.properties[i].loadTransform(arg1[obj.properties[i].name], obj.properties[i], db)); | ||
else | ||
this[property.name](await property.loadTransform(arg1[property.name], property)); | ||
this[obj.properties[i].name](await obj.properties[i].loadTransform(arg1[obj.properties[i].name], obj.properties[i])); | ||
} | ||
@@ -948,0 +948,0 @@ } |
{ | ||
"name": "ezobjects-mysql", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Easy dynamic object generation with optional MySQL table linking", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
# EZ Objects - MySQL Edition - v3.1.2 | ||
# EZ Objects - MySQL Edition - v3.1.3 | ||
@@ -3,0 +3,0 @@ EZ Objects (MySQL Edition) is a Node.js module (that can also be usefully browserify'd) that aims to save |
Sorry, the diff of this file is not supported yet
411439