New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ezobjects-mysql

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ezobjects-mysql - npm Package Compare versions

Comparing version 6.0.2 to 6.0.3

2

generate-docs.js
const docket = require(`docket-parser`);
docket.title(`EZ Objects v6.0.2`);
docket.title(`EZ Objects v6.0.3`);
docket.linkClass(`text-success`);
docket.parseFiles([`index.js`, `mysql-connection.js`]);
docket.generateDocs(`docs`);
{
"name": "ezobjects-mysql",
"version": "6.0.2",
"version": "6.0.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 - v6.0.2
# EZ Objects - MySQL Edition - v6.0.3

@@ -261,3 +261,2 @@ EZ Objects (MySQL Edition) is a Node.js module (that can also be usefully browserify'd) that aims to save

### MyObject.load(id, db)

@@ -312,3 +311,3 @@ * **Parameter:** id number The value of the `id` property of the record you wish to load

* **otherSearchField** - `string` - (optional) The name of a unique property of type `string` that you want to be able to load with as an alternative to `id`
* **url** - `string` - (optional) The URL of a back-end that will provide a JSON.stringify output of the EZ Object for browserify'd use. For now, the URL must take the ID # of the record at the very end, i.e. http://go.to/myObject/load/(id #)
* **url** - `string` - (optional) The URL of a back-end that will provide a JSON.stringify output of the EZ Object for browserify'd loading of the object using an AJAX background request. For now, the URL must take the ID # of the record at the very end, i.e. http://go.to/myObject/load/{ID#}

@@ -322,3 +321,3 @@ ### A basic property configuration can have the following:

* **allowNull** - `boolean` - (optional) Indicates the property can be null, default is that only plain objects and custom object types are nullable
* **arrayOf** - `object` - (required for type `array`) A plain object containing he EZ Object `type` or `instanceOf` of the elements of the array -- types can be `bit`, `tinyint`, `smallint`, `mediumint`, `int`, `integer`, `bigint`, `real`, `double`, `float`, `decimal`, `numeric`, `date`, `time`, `timestamp`, `datetime`, `year`, `char`, `varchar`, `binary`, `varbinary`, `tinyblob`, `blob`, `mediumblob`, `longblob`, `tinytext`, `text`, `mediumtext`, `longtext`, `enum`, `set`, `boolean`, `function`, `object`, or any other valid object constructor name (which can alternatively be used with `instanceOf` instead). Should also include any other relevant MySQL attributes for the stored properties, such as allowNull, length, unsigned, etc, though not all specifics will be used as the current practice is to store arrays using the family of MySQL `text`-type fields. That may change in future versions though where they may be stored in transparent sub-tables, so it's best practice to include the MySQL specifics if you desire future compatability. **Important Note:** Arrays also therefore don't yet have unlimited size capability, and if the MySQL type used by default isn't big enough, it will be up to you to manually override the `mysqlType` of the `array` property configuration. \[either **type** or **instanceOf** is required]
* **arrayOf** - `object` - (required for type `array`) A plain object containing the EZ Object `type` or `instanceOf` of the elements of the array -- types can be `bit`, `tinyint`, `smallint`, `mediumint`, `int`, `integer`, `bigint`, `real`, `double`, `float`, `decimal`, `numeric`, `date`, `time`, `timestamp`, `datetime`, `year`, `char`, `varchar`, `binary`, `varbinary`, `tinyblob`, `blob`, `mediumblob`, `longblob`, `tinytext`, `text`, `mediumtext`, `longtext`, `enum`, `set`, `boolean`, `function`, `object`, or any other valid object constructor name (which can alternatively be used with `instanceOf` instead). Should also include any other relevant MySQL attributes for the stored properties, such as allowNull, length, unsigned, etc, though not all specifics will be used as the current practice is to store arrays using the family of MySQL `text`-type fields. That may change in future versions though where they may be stored in transparent sub-tables, so it's best practice to include the MySQL specifics if you desire future compatability. **Important Note:** Arrays also therefore don't yet have unlimited size capability, and if the MySQL type used by default isn't big enough, it will be up to you to manually override the `mysqlType` of the `array` property configuration. \[either **type** or **instanceOf** is required]
* **setTransform(x, propertyConfig)** - `function` - (optional) Function that transforms and returns the property value prior to setting. The handler for this transform will be passed the expected value `type`, if needed.

@@ -391,4 +390,4 @@

* Todo
* Most arrays are stored as `text`, `mediumtext`, etc
* Documentation todo, though there are appropriate transforms for all types implemented. For now, I recommend you don't override transforms unless you know what you are doing.
* Most arrays are stored as `text`, `mediumtext`, or `blob`, `mediumblob`, etc
* `other` - **saveTransform(value, property)** - The ID # of the object.

@@ -395,0 +394,0 @@ * `other` - **loadTransform(value, property, db)** - Create appropriate class for property and load from database `db` using `value`, which can either be an ID # or `stringSearchField` value.

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