This commit is contained in:
Kononnable 2020-03-20 08:49:51 +01:00
parent f35e212dab
commit 4035794ab8
2 changed files with 10 additions and 10 deletions

View File

@ -56,8 +56,8 @@ export default class MysqlDriver extends AbstractDriver {
FROM information_schema.tables
WHERE table_type='BASE TABLE'
AND table_schema IN (${MysqlDriver.escapeCommaSeparatedList(
dbNames
)}) ${tableCondition}`);
dbNames
)}) ${tableCondition}`);
return response;
};
@ -83,8 +83,8 @@ export default class MysqlDriver extends AbstractDriver {
DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,NUMERIC_PRECISION,NUMERIC_SCALE,
CASE WHEN EXTRA like '%auto_increment%' THEN 1 ELSE 0 END IsIdentity, COLUMN_TYPE, COLUMN_KEY, COLUMN_COMMENT
FROM INFORMATION_SCHEMA.COLUMNS where TABLE_SCHEMA IN (${MysqlDriver.escapeCommaSeparatedList(
dbNames
)})
dbNames
)})
order by ordinal_position`);
entities.forEach(ent => {
response
@ -317,8 +317,8 @@ export default class MysqlDriver extends AbstractDriver {
CASE WHEN INDEX_NAME='PRIMARY' THEN 1 ELSE 0 END is_primary_key
FROM information_schema.statistics sta
WHERE table_schema IN (${MysqlDriver.escapeCommaSeparatedList(
dbNames
)})`);
dbNames
)})`);
entities.forEach(ent => {
const entityIndices = response.filter(
filterVal => filterVal.TableName === ent.tscName
@ -433,7 +433,7 @@ export default class MysqlDriver extends AbstractDriver {
resolve(true);
} else {
TomgUtils.LogError(
`Error disconnecting to ${this.EngineName} Server.`,
`Error disconnecting from ${this.EngineName} Server.`,
false,
err.message
);

View File

@ -117,8 +117,8 @@ export default class PostgresDriver extends AbstractDriver {
const defaultValue = generated
? undefined
: PostgresDriver.ReturnDefaultValueFunction(
resp.column_default
);
resp.column_default
);
const columnTypes = this.MatchColumnTypes(
resp.data_type,
@ -600,7 +600,7 @@ export default class PostgresDriver extends AbstractDriver {
resolve(true);
} else {
TomgUtils.LogError(
"Error connecting to Postgres Server.",
"Error disconnecting from to Postgres Server.",
false,
err.message
);