Skip to content

Support nested array wildcard deletion#95

Closed
joaosa wants to merge 1 commit intoJeffail:masterfrom
joaosa:support_array_wildcard_deletion
Closed

Support nested array wildcard deletion#95
joaosa wants to merge 1 commit intoJeffail:masterfrom
joaosa:support_array_wildcard_deletion

Conversation

@joaosa
Copy link

@joaosa joaosa commented Feb 13, 2021

I added support for deletes that affect all entries within an array.
This way, delete operations of the form outer.*.bar will work.

Hope this makes sense! Let me know if I missed anything :)

@Jeffail
Copy link
Owner

Jeffail commented Feb 14, 2021

Hey @joaosa, this is cool but we ought to handle wildcards at multiple levels in the hierarchy. I've created a branch with test cases that we need to support here: 9b07226

This has also surfaced what I'd consider to be a bug with the existing Delete function in that it allows you to specify wildcards even though it doesn't support it, so this definitely needs implementing.

We'll likely need to implement a custom walk function for the path segments rather than rely on Search since the way that it expands wildcard arrays is incompatible with implementing deletes. Let me know if you have time to try that out, otherwise I can look into it.

@joaosa
Copy link
Author

joaosa commented Feb 14, 2021

Hey @Jeffail, that makes a lot of sense and the test cases are surely helpful!

I don't think I'll have the time to help right away. It would be great if you could look into it :)

@jlourenc
Copy link

Hey @joaosa and @Jeffail , I had a stab at implementing this functionality in #113 . Have a look, feedback very welcome! Thanks

@joaosa
Copy link
Author

joaosa commented Nov 25, 2021

Closing this in favor of #113 :)

@joaosa joaosa closed this Nov 25, 2021
@joaosa joaosa deleted the support_array_wildcard_deletion branch November 25, 2021 16:06
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