不要怂,就是干,撸起袖子干!

Commit 4daf5224 by Jaime Pillora Committed by Sushant

feat(mssql/describeTable): include auto increment flag (#9171)

1 parent 83dfc5ae
...@@ -157,7 +157,8 @@ const QueryGenerator = { ...@@ -157,7 +157,8 @@ const QueryGenerator = {
"c.CHARACTER_MAXIMUM_LENGTH AS 'Length',", "c.CHARACTER_MAXIMUM_LENGTH AS 'Length',",
"c.IS_NULLABLE as 'IsNull',", "c.IS_NULLABLE as 'IsNull',",
"COLUMN_DEFAULT AS 'Default',", "COLUMN_DEFAULT AS 'Default',",
"pk.CONSTRAINT_TYPE AS 'Constraint'", "pk.CONSTRAINT_TYPE AS 'Constraint',",
"COLUMNPROPERTY(OBJECT_ID(c.TABLE_SCHEMA+'.'+c.TABLE_NAME), c.COLUMN_NAME, 'IsIdentity') as 'IsIdentity'",
'FROM', 'FROM',
'INFORMATION_SCHEMA.TABLES t', 'INFORMATION_SCHEMA.TABLES t',
'INNER JOIN', 'INNER JOIN',
......
...@@ -205,7 +205,8 @@ class Query extends AbstractQuery { ...@@ -205,7 +205,8 @@ class Query extends AbstractQuery {
type: _result.Type.toUpperCase(), type: _result.Type.toUpperCase(),
allowNull: _result.IsNull === 'YES' ? true : false, allowNull: _result.IsNull === 'YES' ? true : false,
defaultValue: _result.Default, defaultValue: _result.Default,
primaryKey: _result.Constraint === 'PRIMARY KEY' primaryKey: _result.Constraint === 'PRIMARY KEY',
autoIncrement: _result.IsIdentity === 1
}; };
} }
} else if (this.isShowIndexesQuery()) { } else if (this.isShowIndexesQuery()) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!