不要怂,就是干,撸起袖子干!

Commit 3c8fd740 by Victor Pontis

remove trailing spaces from data types file

1 parent f8508611
Showing with 11 additions and 11 deletions
......@@ -286,20 +286,20 @@ Object.defineProperty(DECIMAL, 'SCALE', decimalDesc);
* ```
* When defining a model you can just as easily pass a string as type, but often using the types defined here is beneficial. For example, using `DataTypes.BLOB`, mean
* that that column will be returned as an instance of `Buffer` when being fetched by sequelize.
*
*
* Some data types have special properties that can be accessed in order to change the data type. For example, to get an unsigned integer with zerofill you can do `DataTypes.INTEGER.UNSIGNED.ZEROFILL`.
* The order you access the properties in do not matter, so `DataTypes.INTEGER.ZEROFILL.UNSIGNED` is fine as well. The available properties are listed under each data type.
*
* To provide a length for the data type, you can invoke it like a function: `INTEGER(2)`
*
* Three of the values provided here (`NOW`, `UUIDV1` and `UUIDV4`) are special default values, that should not be used to define types. Instead they are used as shorthands for
* Three of the values provided here (`NOW`, `UUIDV1` and `UUIDV4`) are special default values, that should not be used to define types. Instead they are used as shorthands for
* defining default values. For example, to get a uuid field with a default value generated following v1 of the UUID standard:
* ```js
* sequelize.define('model', {
* uuid: {
* type: DataTypes.UUID,
* defaultValue: DataTypes.UUIDV1,
* primaryKey: true
* primaryKey: true
* }
* })
* ```
......@@ -315,11 +315,11 @@ module.exports = {
* @property STRING
*/
STRING: STRING,
/**
/**
* A fixed length string. Default length 255
*
* Available properties: `BINARY`
*
*
* @property CHAR
*/
CHAR: CHAR,
......@@ -361,7 +361,7 @@ module.exports = {
BOOLEAN: 'TINYINT(1)',
/**
* Floating point number. Accepts one or two arguments for precision
*
*
* Available properties: `UNSIGNED`, `ZEROFILL`
*
* @property FLOAT
......@@ -380,7 +380,7 @@ module.exports = {
BLOB: BLOB,
/**
* Decimal number. Accepts one or two arguments for precision
*
*
* Available properties: `UNSIGNED`, `ZEROFILL`
*
* @property DECIMAL
......@@ -416,7 +416,7 @@ module.exports = {
/**
* A virtual value that is not stored in the DB. This could for example be useful if you want to provide a default value in your model
* that is returned to the user but not stored in the DB.
*
*
* You could also use it to validate a value before permuting and storing it. Checking password length before hashing it for example:
* ```js
* sequelize.define('user', {
......@@ -425,7 +425,7 @@ module.exports = {
* type: DataTypes.VIRTUAL,
* set: function (val) {
* this.setDataValue('password', val);
* this.setDataValue('password_hash', this.salt + val);
* this.setDataValue('password_hash', this.salt + val);
* },
* validate: {
* isLongEnough: function (val) {
......@@ -437,7 +437,7 @@ module.exports = {
* }
* })
* ```
* In the above code the password is stored plainly in the password field so it can be validated, but is never stored in the DB.
* In the above code the password is stored plainly in the password field so it can be validated, but is never stored in the DB.
* @property VIRTUAL
* @alias NONE
*/
......@@ -446,7 +446,7 @@ module.exports = {
/**
* An enumeration. `DataTypes.ENUM('value', 'another value')`.
*
*
* @property ENUM
*/
get ENUM() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!