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

ezobjects

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ezobjects - npm Package Compare versions

Comparing version 2.8.5 to 2.8.6

2

generate-docs.js
const docket = require(`docket-parser`);
docket.title(`EZ Objects v2.8.5`);
docket.title(`EZ Objects v2.8.6`);
docket.linkClass(`text-success`);
docket.parseFiles([`index.js`, `mysql-connection.js`]);
docket.generateDocs(`docs`);
{
"name": "ezobjects",
"version": "2.8.5",
"version": "2.8.6",
"description": "Easy dynamic object generation with optional MySQL table linking",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -1,4 +0,4 @@

# EZ Objects v2.8.5
# EZ Objects v2.8.6
EZ Objects is a Node.js module (that can also be usefully browserify`d) that aims to save you lots of time
EZ Objects is a Node.js module (that can also be usefully browserify'd) that aims to save you lots of time
writing class objects. All you have to do is create simple configurations for each of your objects and then call

@@ -72,3 +72,3 @@ the library function(s). Let`s start by showing a basic example:

**Important Notes:** Your object must have a unique integer property named `id` to be able to use the MySQL
functionality of EZ Objects. You must also use EZ Object`s MySQLConnection class for your database connection.
functionality of EZ Objects. You must also use EZ Object's MySQLConnection class for your database connection.

@@ -302,3 +302,3 @@ ```javascript

These are the object method signatures that will additionally be provided if your configuration contains a `tableName`,
meaning it`s intended to be linked to a MySQL table:
meaning it's intended to be linked to a MySQL table:

@@ -311,3 +311,3 @@ ### MyObject.delete(db)

* **Parameter:** db - `MySQLConnection`
* **Description:** Insert this object`s property values into the database `db`, table `tableName`, and store the resulting insertId in the `id` property of this object.
* **Description:** Insert this object's property values into the database `db`, table `tableName`, and store the resulting insertId in the `id` property of this object.

@@ -325,9 +325,9 @@ ### MyObject.load(db, id)

### MyObject.load(url)
* **Parameter:** url - `string` - The URL of a back-end that provides JSON data compatible with this object`s initializer
* **Description:** Load the JSON-encoded data obtained from `url` using this object`s initializer.
* **Note:** This signature is useful only when your classes are standalone browserify`d and requires you to implement a backend at `url` that will output the JSON. This signature also requires you have jQuery loaded prior to use.
* **Parameter:** url - `string` - The URL of a back-end that provides JSON data compatible with this object's initializer
* **Description:** Load the JSON-encoded data obtained from `url` using this object's initializer.
* **Note:** This signature is useful only when your classes are standalone browserify'd and requires you to implement a backend at `url` that will output the JSON. This signature also requires you have jQuery loaded prior to use.
### MyObject.update(db)
* **Parameter:** db - `MySQLConnection`
* **Description:** Update the record in database `db`, table `tableName`, with its `id` field equal to the `id` property of this object, using this object`s property values.
* **Description:** Update the record in database `db`, table `tableName`, with its `id` field equal to the `id` property of this object, using this object's property values.

@@ -339,3 +339,3 @@ ## Module Exports

### ezobjects.createTable(db, objectConfig)
A function that creates a MySQL table corresponding to the configuration outlined in `objectConfig`, if it doesn`t already exist
A function that creates a MySQL table corresponding to the configuration outlined in `objectConfig`, if it doesn't already exist

@@ -356,7 +356,7 @@ ### ezobjects.createObject(objectConfig)

* **properties** - `Array` - (required) An array of property configurations that the object (and MySQL table, if applicable) should have corresponding properties for
* **extends** - `mixed` - (optional) The object that the new object should be extended from [required to extend object]
* **extends** - `mixed` - (optional) The object that the new object should be extended from \[required to extend object]
### A MySQL object configuration can also have the following:
* **extendsConfig** - `object` - (optional) The EZ Object configuration for the object that is being extended from [required to extend object for use with MySQL table link]
* **extendsConfig** - `object` - (optional) The EZ Object configuration for the object that is being extended from \[required to extend object for use with MySQL table link]
* **tableName** - `string` - (optional) Provide if object should be linked with MySQL database table

@@ -376,8 +376,8 @@ * **stringSearchField** - `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`

* **mysqlType** - `string` - (optional) MySQL data type for the property [required for MySQL table association]
* **length** - `number` - (optional) MySQL data length for the property [required for MySQL table association on some data types like VARCHAR]
* **decimals** - `number` - (optional) Number of decimals that should be provided for certain data types when SELECT`ed from the MySQL table
* **primary** - `boolean` - (optional) Indicates the property is a PRIMARY KEY in the MySQL table [required for MySQL table association on at least one property in the table]
* **mysqlType** - `string` - (optional) MySQL data type for the property \[required for MySQL table association]
* **length** - `number` - (optional) MySQL data length for the property \[required for MySQL table association on some data types like VARCHAR]
* **decimals** - `number` - (optional) Number of decimals that should be provided for certain data types when SELECT'ed from the MySQL table
* **primary** - `boolean` - (optional) Indicates the property is a PRIMARY KEY in the MySQL table \[required for MySQL table association on at least one property in the table]
* **unique** - `boolean` - (optional) Indicates the property is a UNIQUE KEY in the MySQL table
* **null** - `boolean` - (optional) Indicates the property can be NULL [default is properties must be NOT NULL]
* **null** - `boolean` - (optional) Indicates the property can be NULL \[default is properties must be NOT NULL]
* **mysqlDefault** - `mixed` - (optional) Sets the default value for the property in the MySQL table, assuming its of the correct type

@@ -384,0 +384,0 @@ * **unsigned** - `boolean` - (optional) Indicates the property should be unsigned in the MySQL table

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