Skip to content

Commit

Permalink
add JiraQueryBuilder mention to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ds committed Sep 24, 2023
1 parent c27d64d commit b012853
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/3_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,25 @@ the platform-specific Query classes can be used.
You can use these query classes as a drop in replacement for the default ``Query`` class shown in the other examples.
Again, if you encounter any issues specific to a platform, please create a GitHub issue on this repository.

Or even different query languages
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Some services created their own query language similar to SQL. To generate expressions for Jira there is a ``JiraQueryBuilder`` class.

.. code-block:: python
from pypika import MySQLQuery, MSSQLQuery, PostgreSQLQuery, OracleQuery, VerticaQuery
J = JiraTable()
j = (
JiraQueryBuilder()
.where(J.project.isin(["PROJ1", "PROJ2"]))
.where(J.issuetype == "My issue")
.where(J.labels.isempty() | J.labels.notin(["stale", "bug"]))
.where(J.repos.notempty() & J.repos.notin(["main", "dev"]))
)
print(j.get_sql())
GROUP BY Modifiers
------------------

Expand Down

0 comments on commit b012853

Please sign in to comment.