Skip to content

Provide data length for MSSQL DESCRIBE queries - #9504

Closed
irwin-r wants to merge 1 commit into
sequelize:masterfrom
irwin-r:patch-1
Closed

irwin-r wants to merge 1 commit into
sequelize:masterfrom
irwin-r:patch-1

Conversation

@irwin-r

@irwin-r irwin-r commented Jun 4, 2018

Copy link
Copy Markdown

Pull Request check-list

  • Does npm run test or npm run test-DIALECT pass with this change (including linting)?
  • Does the description below contain a link to an existing issue (Closes #[issue]) or a description of the issue you are solving?
  • Have you added new tests to prevent regressions?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Did you follow the commit message conventions explained in CONTRIBUTING.md?

Description of change

Fix to ensure column length is added when a DESCRIBE QueryType is utilised.
Fixes outstanding sequelize-auto issue #219 which results in no data type lengths being defined by sequelize-auto.

Fix to ensure column length is added when a DESCRIBE QueryType is utilised.
Fixes outstanding sequelize-auto issue 219 which results in no data type lengths being defined by sequelize-auto.

@sushantdhiman sushantdhiman left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add assertions for MSSQL case

describe('describeTable', () => {

require some changes in implementation, details in comments

};

if (result.Length !== null) {
result[_result.Name].type += `(${_result.Length})`;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If check should be testing for string types, if its a string type, find length and append it properly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants