Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add function to delete all source elements at once #335

Open
TobiasNx opened this issue Nov 9, 2023 · 4 comments
Open

Add function to delete all source elements at once #335

TobiasNx opened this issue Nov 9, 2023 · 4 comments
Labels

Comments

@TobiasNx
Copy link
Collaborator

TobiasNx commented Nov 9, 2023

Catmandu has for marc21 a variable record that can be used to remove all elements of the source data.
Since record can be a element name, I would suggest a function remove_sourceRecord or something like that to delete all source elements.

@blackwinter
Copy link
Member

Catmandu has for marc21 a variable record that can be used to remove all elements of the source data.

Can you provide a link to the documentation?

@TobiasNx
Copy link
Collaborator Author

TobiasNx commented Nov 9, 2023

@blackwinter
Copy link
Member

blackwinter commented Nov 9, 2023

So it's not a "variable", just a regular field. Metafix doesn't have/need this field, but instead operates on the record itself.

How is your proposed remove_sourceRecord different from remove_field(*) or reject()?

@blackwinter
Copy link
Member

Oh, I see, you want to remove the source fields, but keep any newly added fields? Without having to explicitly enumerate them in retain()?

Not sure if this is feasible, but it's certainly a use case.

@TobiasNx TobiasNx changed the title Add function to delete all source element at ounce Add function to delete all source element at once Nov 9, 2023
@blackwinter blackwinter changed the title Add function to delete all source element at once Add function to delete all source elements at once Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants