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

Commit 7e2012a4 by Sushant

docs(data-types): extending types

1 parent c6a0d8d1
Showing with 2 additions and 2 deletions
...@@ -179,7 +179,7 @@ const sequelizeConfig = require('../config/sequelize') ...@@ -179,7 +179,7 @@ const sequelizeConfig = require('../config/sequelize')
const sequelizeAdditions = require('./sequelize-additions') const sequelizeAdditions = require('./sequelize-additions')
// Function that adds new datatypes // Function that adds new datatypes
sequelizeAdditions(Sequelize.DataTypes) sequelizeAdditions(Sequelize)
// In this exmaple a Sequelize instance is created and exported // In this exmaple a Sequelize instance is created and exported
const sequelize = new Sequelize(sequelizeConfig) const sequelize = new Sequelize(sequelizeConfig)
...@@ -282,7 +282,7 @@ modules.exports = function sequelizeAdditions(Sequelize) { ...@@ -282,7 +282,7 @@ modules.exports = function sequelizeAdditions(Sequelize) {
// Mandatory, create, override or reassign a postgres-specific parser // Mandatory, create, override or reassign a postgres-specific parser
//PgTypes.NEWTYPE.parse = value => value; //PgTypes.NEWTYPE.parse = value => value;
PgTypes.NEWTYPE.parse = BaseTypes.NEWTYPE.parse; PgTypes.NEWTYPE.parse = DataTypes.NEWTYPE.parse;
// Optional, add or override methods of the postgres-specific datatype // Optional, add or override methods of the postgres-specific datatype
// like toSql, escape, validate, _stringify, _sanitize... // like toSql, escape, validate, _stringify, _sanitize...
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!