1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-02-17 04:00:48 +01:00

fix(MySQL): unable to set more than one value in SET fields

This commit is contained in:
Fabio Di Stasio 2023-07-17 18:00:40 +02:00
parent 8f0e5407ae
commit 7c820b1827

View File

@ -582,7 +582,7 @@ export class MySQLClient extends AntaresCore {
return rows.map((field) => {
const numLengthMatch = field.COLUMN_TYPE.match(/int\(([^)]+)\)/);
const numLength = numLengthMatch ? +numLengthMatch.pop() : field.NUMERIC_PRECISION || null;
const enumValues = /(enum|set)/.test(field.COLUMN_TYPE)
const enumValues = /(enum)/.test(field.COLUMN_TYPE)
? field.COLUMN_TYPE.match(/\(([^)]+)\)/)[0].slice(1, -1)
: null;