This is the most basic for defining condition:
->addCondition('my_field', $value);
This condition will work across all persistence drivers universally.
In some cases a more complex logic can be used:
->addCondition('my_field', '>', $value);
->addCondition('my_field', '!=', $value);
->addCondition('my_field', 'in', [$value1, $value2]);
Second argument could be '=', '>', '<', '>=', '<=', '!=' or 'in'.
Those conditions are still supported by most of persistence drivers.
There are also vendor-specific expression support:
->addCondition('my_field', $expr);
->addCondition($expr);
To use those, you should consult with documentation of your
persistence driver.