Skip to content

Implementing NOT operation as != #80

Closed Answered by thomaspatzke
barvhaim asked this question in Q&A
Discussion options

You must be logged in to vote

All node conversion methods of a backend have a parameter state (e.g. convert_condition_field_eq_val_str. This is a ConversionState object that contains a processing_state property.

The first step of the solution of your problem would be to add a negation toggle to this property that is set to False at the beginning of the conversion. The best place for this would be the convert_condition method of a backend by overriding it and first adding this property and then calling super().convert_condition(...).

Then you override the convert_condition_not method in a similar way, but now use it to toggle the state.

Finally, you have to override the methods for converting OR, AND and field=value no…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by barvhaim
Comment options

You must be logged in to vote
2 replies
@thomaspatzke
Comment options

@josh-panther
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants