-
Notifications
You must be signed in to change notification settings - Fork 118
Open
Description
📖 Description
Currently, there is an inconsistency between SubsetService.get_all_names and ViewService.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
- Introduce a new parameter
scopeto control visibility. scopecan accept either a string ("private","public","both") or an Enum (Scope.PRIVATE,Scope.PUBLIC,Scope.BOTH).- Keep the old
private=True/Falseparameter 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") # tupleI look forward to your feedback.
Metadata
Metadata
Assignees
Labels
No labels