diff --git a/src/drivers/MysqlDriver.ts b/src/drivers/MysqlDriver.ts index 8ce8248..110c0ce 100644 --- a/src/drivers/MysqlDriver.ts +++ b/src/drivers/MysqlDriver.ts @@ -493,6 +493,17 @@ export default class MysqlDriver extends AbstractDriver { }; } + config.typeCast = (field, next) => { + switch (field.type) { + case "VAR_STRING": + return field.string(); + case "BLOB": + return field.string(); + default: + return next(); + } + }; + const promise = new Promise((resolve, reject) => { this.Connection = this.MYSQL.createConnection(config);