mg-dbop
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -15,2 +15,3 @@ /** | ||
this.tableDescCache = {}; | ||
this.defaultOptions = null; | ||
@@ -38,2 +39,6 @@ // These fields will be ignored if passed into the body | ||
setDefaultOptions(config) { | ||
this.defaultOptions = config; | ||
} | ||
/** | ||
@@ -116,2 +121,6 @@ * For fields that need a null instead of "" are converted here; usually for the references | ||
const dop = new dbOp(this); | ||
if (this.defaultOptions != null) | ||
dop.setOptions(this.defaultOptions); | ||
return await dop.init(dbConn, tables, leftJoinStruct); | ||
@@ -118,0 +127,0 @@ } |
{ | ||
"name": "mg-dbop", | ||
"private" : false, | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"homepage": "https://github.com/MacLaurinGroup/dbOp", | ||
@@ -6,0 +6,0 @@ "description": "Query builder, and validator, for MySQL and node that utilizes the underlying table to provide a level of checking", |
@@ -124,2 +124,3 @@ ## dbOp | ||
* .setControlFields([]) // sets all the columns you wish to ignore in any UPDATE/INSERT statements | ||
* .setDefaultOptions( {} ) // sets the default options for the SQL Config | ||
* .clearCache() // clears out the desc cache | ||
@@ -126,0 +127,0 @@ * .sanitizeFieldsAZaz09(data,fieldArray) // for the array of field names, clean up the data |
47464
765
281