-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
486 additions
and
42 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
select * from Author | ||
select * from Author where ZipCodeId in (select zc.ZipCodeId from ZipCode zc where zc.CityId in (select c.CityId from City c where c.StateId in (select StateId from State where ShortName in ('NY', 'NC')))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
SELECT Author.AuthorId , Author.Name , Author.ZipCodeId FROM Author inner join [ZipCode] [t1] on [t1].ZipCodeId = [Author].ZipCodeId inner join [City] [t2] on [t2].CityId = [t1].CityId inner join [State] [t3] on [t3].StateId = [t2].StateId inner join [Country] [t4] on [t4].CountryId = [t3].CountryId WHERE t4.Code in ('IN','US') | ||
SELECT Author.AuthorId , Author.Name , Author.ZipCodeId FROM Author inner join [ZipCode] [t1] on [t1].ZipCodeId = [Author].ZipCodeId inner join [City] [t2] on [t2].CityId = [t1].CityId WHERE (ZipCodeId in (SELECT zc.ZipCodeId FROM ZipCode zc WHERE zc.CityId in (SELECT c.CityId FROM City c WHERE c.StateId in (SELECT StateId FROM State WHERE ShortName in ('NY' , 'NC' ) ) ) )) AND (t2.Name in ('New York','Charlotte')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
Instance,Query,User,Role | ||
books,"select a.AuthorId, a.Name as [AuthorName], a.ZipCodeId, c.Name as City from Author a | ||
Comment,Query,User,Role | ||
Simple inner join,"select a.AuthorId, a.Name as [AuthorName], a.ZipCodeId, c.Name as City from Author a | ||
inner join Zipcode zc on zc.ZipCodeId = a.ZipCodeId | ||
inner join City c on c.CityId = zc.CityId | ||
where c.Name = 'Charlotte'",Lashawn,role_city_mgr | ||
books,select * from book,Lashawn,role_city_mgr | ||
books,"select * from Author where Author.ZipCodeId in (select zc.ZipCodeId from ZipCode zc where zc.CityId in (select c.CityId from City c where c.StateId in (select StateId from State where ShortName in ('NY', 'NC'))))",Lashawn,role_city_mgr | ||
books,"select zc.ZipCode, a.Name from ZipCode zc inner join Author a on a.ZipCodeId = zc.ZipCodeId where zc.ZipCodeId = 12",Lashawn,role_city_mgr | ||
simple non scalar,select * from book,Lashawn,role_city_mgr | ||
non scalar complex,"select * from Author where Author.ZipCodeId in (select zc.ZipCodeId from ZipCode zc where zc.CityId in (select c.CityId from City c where c.StateId in (select StateId from State where ShortName in ('NY', 'NC'))))",Lashawn,role_city_mgr | ||
,"select zc.ZipCode, a.Name from ZipCode zc inner join Author a on a.ZipCodeId = zc.ZipCodeId where zc.ZipCodeId = 12",Lashawn,role_city_mgr | ||
"aarbac recommends to use table or alias prefix, this query will parse good, but will throw error while executing ```Ambiguous column name 'ZipCodeId'```","select * from Author where ZipCodeId in (select zc.ZipCodeId from ZipCode zc where zc.CityId in (select c.CityId from City c where c.StateId in (select StateId from State where ShortName in ('NY', 'NC'))))",Lashawn,role_city_mgr | ||
incorrect query,select,Lashawn,role_city_mgr | ||
incorrect query,abc,Lashawn,role_city_mgr | ||
incorrect query,select * ,Lashawn,role_city_mgr | ||
incorrect query,select * from ,Lashawn,role_city_mgr | ||
incorrect query,select * from book where,Lashawn,role_city_mgr | ||
incorrect table,select * from abc,Lashawn,role_city_mgr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Comment,Query,User,Role,ParsedQueryStage1,ParsedQuery,Records,Errors | ||
"Simple inner join","select a.AuthorId, a.Name as [AuthorName], a.ZipCodeId, c.Name as City from Author a | ||
inner join Zipcode zc on zc.ZipCodeId = a.ZipCodeId | ||
inner join City c on c.CityId = zc.CityId | ||
where c.Name = 'Charlotte'","Lashawn","role_city_mgr","SELECT a.AuthorId , a.Name as [AuthorName] , a.ZipCodeId , c.Name as City FROM Author a inner join Zipcode zc on zc.ZipCodeId = a.ZipCodeId inner join City c on c.CityId = zc.CityId WHERE c.Name in { CityNames } ","SELECT a.AuthorId , a.Name as [AuthorName] , a.ZipCodeId , c.Name as City FROM Author a inner join Zipcode zc on zc.ZipCodeId = a.ZipCodeId inner join City c on c.CityId = zc.CityId WHERE c.Name in ('New York','Charlotte') ","10 record(s)","" | ||
"simple non scalar","select * from book","Lashawn","role_city_mgr","select book.BookId,book.Title,book.Subject,book.Price,book.Isbn13,book.Isbn10,book.PublisherId from book","select book.BookId,book.Title,book.Subject,book.Price,book.Isbn13,book.Isbn10,book.PublisherId from book","10 record(s)","" | ||
"non scalar complex","select * from Author where Author.ZipCodeId in (select zc.ZipCodeId from ZipCode zc where zc.CityId in (select c.CityId from City c where c.StateId in (select StateId from State where ShortName in ('NY', 'NC'))))","Lashawn","role_city_mgr","SELECT Author.AuthorId , Author.Name , Author.SSN , Author.ZipCodeId FROM Author inner join [ZipCode] [t4] on [t4].ZipCodeId = [Author].ZipCodeId inner join [City] [t5] on [t5].CityId = [t4].CityId WHERE (Author.ZipCodeId in (SELECT zc.ZipCodeId FROM ZipCode zc WHERE zc.CityId in (SELECT c.CityId FROM City c WHERE c.StateId in (SELECT StateId FROM State WHERE ShortName in ('NY' , 'NC' ) ) ) )) AND (t5.Name in { CityNames }) ","SELECT Author.AuthorId , Author.Name , Author.ZipCodeId FROM Author inner join [ZipCode] [t4] on [t4].ZipCodeId = [Author].ZipCodeId inner join [City] [t5] on [t5].CityId = [t4].CityId WHERE (Author.ZipCodeId in (SELECT zc.ZipCodeId FROM ZipCode zc WHERE zc.CityId in (SELECT c.CityId FROM City c WHERE c.StateId in (SELECT StateId FROM State WHERE ShortName in ('NY' , 'NC' ) ) ) )) AND (t5.Name in ('New York','Charlotte')) ","10 record(s)","" | ||
"","select zc.ZipCode, a.Name from ZipCode zc inner join Author a on a.ZipCodeId = zc.ZipCodeId where zc.ZipCodeId = 12","Lashawn","role_city_mgr","SELECT zc.ZipCode , a.Name FROM ZipCode zc inner join Author a on a.ZipCodeId = zc.ZipCodeId inner join [City] [t8] on [t8].CityId = [zc].CityId WHERE (zc.ZipCodeId = 12) AND (t8.Name in { CityNames }) ","SELECT zc.ZipCode , a.Name FROM ZipCode zc inner join Author a on a.ZipCodeId = zc.ZipCodeId inner join [City] [t8] on [t8].CityId = [zc].CityId WHERE (zc.ZipCodeId = 12) AND (t8.Name in ('New York','Charlotte')) ","0 record(s)","" | ||
"aarbac recommends to use table or alias prefix, this query will parse good, but will throw error while executing ```Ambiguous column name 'ZipCodeId'```","select * from Author where ZipCodeId in (select zc.ZipCodeId from ZipCode zc where zc.CityId in (select c.CityId from City c where c.StateId in (select StateId from State where ShortName in ('NY', 'NC'))))","Lashawn","role_city_mgr","SELECT Author.AuthorId , Author.Name , Author.SSN , Author.ZipCodeId FROM Author inner join [ZipCode] [t11] on [t11].ZipCodeId = [Author].ZipCodeId inner join [City] [t12] on [t12].CityId = [t11].CityId WHERE (ZipCodeId in (SELECT zc.ZipCodeId FROM ZipCode zc WHERE zc.CityId in (SELECT c.CityId FROM City c WHERE c.StateId in (SELECT StateId FROM State WHERE ShortName in ('NY' , 'NC' ) ) ) )) AND (t12.Name in { CityNames }) ","SELECT Author.AuthorId , Author.Name , Author.ZipCodeId FROM Author inner join [ZipCode] [t11] on [t11].ZipCodeId = [Author].ZipCodeId inner join [City] [t12] on [t12].CityId = [t11].CityId WHERE (ZipCodeId in (SELECT zc.ZipCodeId FROM ZipCode zc WHERE zc.CityId in (SELECT c.CityId FROM City c WHERE c.StateId in (SELECT StateId FROM State WHERE ShortName in ('NY' , 'NC' ) ) ) )) AND (t12.Name in ('New York','Charlotte')) ","Errored","Ambiguous column name 'ZipCodeId'. | ||
" | ||
"incorrect query","select","Lashawn","role_city_mgr","select","select","Errored","Incorrect syntax near select.Error:Incorrect syntax near select. at line nr:1 column:1 | ||
Incorrect syntax near '10'. | ||
" | ||
"incorrect query","abc","Lashawn","role_city_mgr","","","","RBAC.Core - Invalid query type!" | ||
"incorrect query","select * ","Lashawn","role_city_mgr","","","","Must specify table to select from." | ||
"incorrect query","select * from ","Lashawn","role_city_mgr","select * from ","select * from ","Errored","Unexpected end of file occurred.Error:Unexpected end of file occurred. at line nr:1 column:15 | ||
Incorrect syntax near 'from'. | ||
" | ||
"incorrect query","select * from book where","Lashawn","role_city_mgr","select * from book where","select * from book where","Errored","Unexpected end of file occurred.Error:Unexpected end of file occurred. at line nr:1 column:25 | ||
Incorrect syntax near 'where'. | ||
" | ||
"incorrect table","select * from abc","Lashawn","role_city_mgr","","","","Invalid object name 'abc'." |
Oops, something went wrong.