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

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); ...@@ -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 * 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. * 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`. * 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. * 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)` * 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: * defining default values. For example, to get a uuid field with a default value generated following v1 of the UUID standard:
* ```js * ```js
* sequelize.define('model', { * sequelize.define('model', {
* uuid: { * uuid: {
* type: DataTypes.UUID, * type: DataTypes.UUID,
* defaultValue: DataTypes.UUIDV1, * defaultValue: DataTypes.UUIDV1,
* primaryKey: true * primaryKey: true
* } * }
* }) * })
* ``` * ```
...@@ -315,11 +315,11 @@ module.exports = { ...@@ -315,11 +315,11 @@ module.exports = {
* @property STRING * @property STRING
*/ */
STRING: STRING, STRING: STRING,
/** /**
* A fixed length string. Default length 255 * A fixed length string. Default length 255
* *
* Available properties: `BINARY` * Available properties: `BINARY`
* *
* @property CHAR * @property CHAR
*/ */
CHAR: CHAR, CHAR: CHAR,
...@@ -361,7 +361,7 @@ module.exports = { ...@@ -361,7 +361,7 @@ module.exports = {
BOOLEAN: 'TINYINT(1)', BOOLEAN: 'TINYINT(1)',
/** /**
* Floating point number. Accepts one or two arguments for precision * Floating point number. Accepts one or two arguments for precision
* *
* Available properties: `UNSIGNED`, `ZEROFILL` * Available properties: `UNSIGNED`, `ZEROFILL`
* *
* @property FLOAT * @property FLOAT
...@@ -380,7 +380,7 @@ module.exports = { ...@@ -380,7 +380,7 @@ module.exports = {
BLOB: BLOB, BLOB: BLOB,
/** /**
* Decimal number. Accepts one or two arguments for precision * Decimal number. Accepts one or two arguments for precision
* *
* Available properties: `UNSIGNED`, `ZEROFILL` * Available properties: `UNSIGNED`, `ZEROFILL`
* *
* @property DECIMAL * @property DECIMAL
...@@ -416,7 +416,7 @@ module.exports = { ...@@ -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 * 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. * 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: * You could also use it to validate a value before permuting and storing it. Checking password length before hashing it for example:
* ```js * ```js
* sequelize.define('user', { * sequelize.define('user', {
...@@ -425,7 +425,7 @@ module.exports = { ...@@ -425,7 +425,7 @@ module.exports = {
* type: DataTypes.VIRTUAL, * type: DataTypes.VIRTUAL,
* set: function (val) { * set: function (val) {
* this.setDataValue('password', val); * this.setDataValue('password', val);
* this.setDataValue('password_hash', this.salt + val); * this.setDataValue('password_hash', this.salt + val);
* }, * },
* validate: { * validate: {
* isLongEnough: function (val) { * isLongEnough: function (val) {
...@@ -437,7 +437,7 @@ module.exports = { ...@@ -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 * @property VIRTUAL
* @alias NONE * @alias NONE
*/ */
...@@ -446,7 +446,7 @@ module.exports = { ...@@ -446,7 +446,7 @@ module.exports = {
/** /**
* An enumeration. `DataTypes.ENUM('value', 'another value')`. * An enumeration. `DataTypes.ENUM('value', 'another value')`.
* *
* @property ENUM * @property ENUM
*/ */
get ENUM() { get ENUM() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!