Skip to content

Commit

Permalink
Few more docstrings on LegacyService
Browse files Browse the repository at this point in the history
  • Loading branch information
npalacioescat committed Feb 25, 2025
1 parent 5ace668 commit 5b0f4b7
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions omnipath_server/service/_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -1778,7 +1778,19 @@ def _select(self, args: dict, query_type: str) -> Query:

def _limit(self, query: Query, args: dict) -> Query:
"""
Adds LIMIT clauses to the query.
Adds `LIMIT` clauses to the query instance.
Args:
query:
The instance of the query to add the `LIMIT` clause.
args:
A dictionary containing the different arguments for the query
search (argument name/value pairs). Only the one under the
`'limit'` key will be used in this case.
Returns:
The updated query instance with the `LIMIT` clauses added according
to the arguments.
"""

if 'limit' in args:
Expand All @@ -1795,14 +1807,14 @@ def _query(
extra_where: Iterable | None = None,
) -> tuple[Query | None, str | None]:
"""
Generates and executes the SQL query based on the request
Generates the SQL query based on the request arguments.
Args:
args:
The query arguments
query_type:
The DataBase which to query (e.g. interactions,
complexes, etc)
The database which to query (e.g. `'interactions'`,
`'complexes'`, etc).
Return:
To be refined in the future: for now, either an SQL query, or an
Expand Down

0 comments on commit 5b0f4b7

Please sign in to comment.