📖 Description
Currently, there is an inconsistency between SubsetService.get_all_names and ViewService.get_all_names:
SubsetService.get_all_names returns a single list, controlled via the Boolean flag private=True/False.
ViewService.get_all_names returns a tuple of two lists (private and public views), without a Boolean flag.
This difference in return types makes the API less consistent and can be confusing for developers using both services.
💡 Proposed Solution
- Introduce a new parameter
scope to control visibility.
scope can accept either a string ("private", "public", "both") or an Enum (Scope.PRIVATE, Scope.PUBLIC, Scope.BOTH).
- Keep the old
private=True/False parameter for backward compatibility.
- Return values:
"private" or "public" → list of names
"both" → tuple (private_list, public_list)
Benefit: consistent API for subsets and views, clear visibility control, flexible and extensible.
📝 Example Usage
# Subsets
subsets.get_all_names("Account", scope="private") # list
subsets.get_all_names("Account", scope="both") # tuple
# Views
views.get_all_names("SalesCube", scope="public") # list
views.get_all_names("SalesCube", scope="both") # tuple
I look forward to your feedback.
📖 Description
Currently, there is an inconsistency between
SubsetService.get_all_namesandViewService.get_all_names:SubsetService.get_all_namesreturns a single list, controlled via the Boolean flagprivate=True/False.ViewService.get_all_namesreturns a tuple of two lists (private and public views), without a Boolean flag.This difference in return types makes the API less consistent and can be confusing for developers using both services.
💡 Proposed Solution
scopeto control visibility.scopecan accept either a string ("private","public","both") or an Enum (Scope.PRIVATE,Scope.PUBLIC,Scope.BOTH).private=True/Falseparameter for backward compatibility."private"or"public"→ list of names"both"→ tuple(private_list, public_list)Benefit: consistent API for subsets and views, clear visibility control, flexible and extensible.
📝 Example Usage
I look forward to your feedback.