Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 2cf7f4d7
authored
Apr 14, 2016
by
Alex Ahn
Committed by
Jan Aagaard Meier
Apr 14, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change describeTableQuery for mssql to apply schema restrictions to all joins (#5750)
1 parent
de477d0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
lib/dialects/mssql/query-generator.js
lib/dialects/mssql/query-generator.js
View file @
2cf7f4d
...
@@ -114,9 +114,9 @@ var QueryGenerator = {
...
@@ -114,9 +114,9 @@ var QueryGenerator = {
'FROM'
,
'FROM'
,
'INFORMATION_SCHEMA.TABLES t'
,
'INFORMATION_SCHEMA.TABLES t'
,
'INNER JOIN'
,
'INNER JOIN'
,
'INFORMATION_SCHEMA.COLUMNS c ON t.TABLE_NAME = c.TABLE_NAME'
,
'INFORMATION_SCHEMA.COLUMNS c ON t.TABLE_NAME = c.TABLE_NAME
AND t.TABLE_SCHEMA = c.TABLE_SCHEMA
'
,
'LEFT JOIN'
,
'LEFT JOIN'
,
'INFORMATION_SCHEMA.KEY_COLUMN_USAGE cu ON t.TABLE_NAME = cu.TABLE_NAME AND cu.COLUMN_NAME = c.COLUMN_NAME'
,
'INFORMATION_SCHEMA.KEY_COLUMN_USAGE cu ON t.TABLE_NAME = cu.TABLE_NAME AND cu.COLUMN_NAME = c.COLUMN_NAME
AND t.TABLE_SCHEMA = cu.TABLE_SCHEMA
'
,
'LEFT JOIN'
,
'LEFT JOIN'
,
'INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc ON t.TABLE_NAME = tc.TABLE_NAME AND cu.COLUMN_NAME = c.COLUMN_NAME AND tc.CONSTRAINT_TYPE = \'PRIMARY KEY\''
,
'INFORMATION_SCHEMA.TABLE_CONSTRAINTS tc ON t.TABLE_NAME = tc.TABLE_NAME AND cu.COLUMN_NAME = c.COLUMN_NAME AND tc.CONSTRAINT_TYPE = \'PRIMARY KEY\''
,
'WHERE t.TABLE_NAME ='
,
wrapSingleQuote
(
tableName
)
'WHERE t.TABLE_NAME ='
,
wrapSingleQuote
(
tableName
)
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment