Skip to content

Commit

Permalink
Adding --query-page-size argument to tabcmd
Browse files Browse the repository at this point in the history
  • Loading branch information
renoyjohnm committed Dec 9, 2024
1 parent 5dd9c4a commit a093c0c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tabcmd/execution/parent_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ def parent_parser_with_global_options():
version=strings[6] + "v" + version + "\n \n",
help=strings[7],
)

parser.add_argument(
"--query-page-size",
type=int,
default=None,
metavar="<PAGE_SIZE>",
help="Specify the page size for query results.",
)
return parser


Expand Down
3 changes: 3 additions & 0 deletions tabcmd/execution/tabcmd_controller.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import os
import sys

from .localize import set_client_locale
Expand Down Expand Up @@ -37,6 +38,8 @@ def run(parser, user_input=None):
logger.debug(namespace)
if namespace.language:
set_client_locale(namespace.language, logger)
if namespace.query_page_size:
os.environ["TSC_PAGE_SIZE"] = str(namespace.query_page_size)
try:
func = namespace.func
# if a subcommand was identified, call the function assigned to it
Expand Down

0 comments on commit a093c0c

Please sign in to comment.