PROJECTS |
|
|
|
|
|
|
|
| ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Column | ID | KEY | NAME | DESCRIPTION | CATEGORY | LEAD | URL | COUNTER | ||||||||
Type | BIGINT | VARCHAR | VARCHAR | VARCHAR | VARCHAR | VARCHAR | VARCHAR | BIGINT | ||||||||
Indexed | x | x | x |
|
| x |
|
|
...
Example
How to get all the issues? This is not possible per the JIRA,API design, There is not a Java method on the project object to get all its issues. The only way to get the project issues via the PROJECTS table joined with the ISSUE table
select * from projects p inner join issues i on is by performing a JQL similar to:
project = SSP
SQL for JIRA is strictly driven by the JIRA Java API and therefore there is no way to get all the JIRA issues at once.
If you try the SQL query below a full scan exception will be raised:
select * from projects p inner join issues i on p.id=i.projectid
The query above is correct from the semantic point of view and most JIRA users would expect it shows all the issues on JIRA. Therefore, all the relational database systems (Oracle, MySQL, H2, PostgreSQL, SQLServer, etc) would execute it.
However, SQL for JIRA is different. The SQL query above might compromise the JIRA Server performance (CPU and memory resources).Therefore, it is aborted by the SQL for JIRA plugin by raising a FULL SCAN exception. Please, read the ISSUES table documentation in order to understand way. even if you restrict the project:
select * from projects p inner join issues i on p.id=i.projectid where p.name='SSP'
As suggested by the JIRA API pattern, the right way would be:
select * from issues where JQL='project = SSP'
As you see, SQL for JIRA has the same JIRA constraints to limit to access to the resources and compromise the JIRA performance while keeping a good balance among features and performance.