Merge pull request #326 from HHongSeungWoo/master
fix: fix typecasting problem when using old version mysql
This commit is contained in:
commit
787ad5fdec
@ -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<boolean>((resolve, reject) => {
|
||||
this.Connection = this.MYSQL.createConnection(config);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user