Skip to content

Conversation

@anderson-joyle
Copy link
Contributor

This pull request unifies the Remove functions between PFx and PA.

AI-generated description below:
This pull request introduces several changes to support new Remove/RemoveAll mutation function behaviors, adds a new enum type for remove flags, and updates localization and feature configuration. The most significant changes are grouped below.

Mutation Function Enhancements:

  • Replaces the old RemoveFunction with new implementations: RemoveImpl and RemoveAllImpl, which both use a shared async core logic in MutationUtils.RemoveCore to handle record removal, including support for the "All" flag. (RemoveImpl, RemoveAllImpl, MutationUtils.cs) [1] [2] [3]
  • Updates the internal logic for removing records to better handle errors and support both single-record and table-based removals, as well as the "All" option. (MutationUtils.cs)

Enum and Symbol Table Updates:

  • Introduces a new enum, RemoveFlagsEnum, with values "First" and "All", and registers it in the enum store and language constants for use in mutation functions. (BuiltInEnums.cs, EnumStoreBuilder.cs, LanguageConstants.cs) [1] [2] [3] [4]
  • Ensures the EnumStoreBuilder is initialized before adding functions that require enums, preventing possible null reference issues. (SymbolTable.cs)

Feature Flags and Configuration:

  • Adds a new internal feature flag, IsRemoveAllDelegationEnabled, to control RemoveAll delegation behavior, and ensures it is included in feature copying and default feature sets. (Features.cs) [1] [2] [3]

Localization and Error Handling:

  • Updates string resources and error keys to support new Remove/RemoveAll argument names and error messages, including new error keys for collection and argument validation. (Strings.cs) [1] [2] [3]
  • Improves error reporting in RemoveAsync by omitting unnecessary error messages when a record is not found. (CollectionTableValue.cs)

Miscellaneous:

  • Removes an unused using System.Collections.Generic; directive from IExternalDocumentProperties.cs for cleanup.

@jas-valgotar
Copy link
Contributor

✅ No public API change.

@jas-valgotar
Copy link
Contributor

✅ No public API change.

@jas-valgotar
Copy link
Contributor

✅ No public API change.

@jas-valgotar
Copy link
Contributor

✅ No public API change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants