lib/adapters/mysql.js
function (type) {
            var ret = null, meth;
            if (isString(type)) {
                ret = this._static.CAST_TYPES[type] || this._super(arguments);
            } else if (type === String) {
                meth += "CHAR";
            } else if (type === Number) {
                meth += "DECIMAL";
            } else if (type === DateTime) {
                meth += "DATETIME";
            } else if (type === Year) {
                meth += "Year";
            } else if (type === Time) {
                meth += "DATETIME";
            } else if (type === Double) {
                meth += "DECIMAL";
            } else {
                ret = this._super(arguments);
            }
            return ret;
        }
function (type) {
            var ret = null, meth;
            if (isString(type)) {
                ret = this._static.CAST_TYPES[type] || this._super(arguments);
            } else if (type === String) {
                meth += "CHAR";
            } else if (type === Number) {
                meth += "DECIMAL";
            } else if (type === DateTime) {
                meth += "DATETIME";
            } else if (type === Year) {
                meth += "Year";
            } else if (type === Time) {
                meth += "DATETIME";
            } else if (type === Double) {
                meth += "DECIMAL";
            } else {
                ret = this._super(arguments);
            }
            return ret;
        }
function ( type ) { var ret = null , meth ; if ( isString ( type ) ) { ret = this . _static . CAST_TYPES [ type ] || this . _super ( arguments ) ; } else if ( type === String ) { meth += "CHAR" ; } else if ( type === Number ) { meth += "DECIMAL" ; } else if ( type === DateTime ) { meth += "DATETIME" ; } else if ( type === Year ) { meth += "Year" ; } else if ( type === Time ) { meth += "DATETIME" ; } else if ( type === Double ) { meth += "DECIMAL" ; } else { ret = this . _super ( arguments ) ; } return ret ; }
MySQL's cast rules are restrictive in that you can't just cast to any possible database type.
MySQL s cast rules are restrictive in that you can t just cast to any possible database type .