Is there a method similar to the D7 dynamic query where method to allow us to use arbitrary snippets of SQL to restrict the result set?
Take the following MYSQL query as an example:
SELECT id, publish_date FROM teaching_period WHERE publish_date IS NULL OR UNIX_TIMESTAMP(STR_TO_DATE(CONCAT(publish_date, ' 23:59:59'), '%Y-%m-%d %H:%i:%s')) > UNIX_TIMESTAMP(CURRENT_TIMESTAMP) ORDER BY created DESC LIMIT 0, 1
How can I create the where statement in this query using the D8 entity query API? Is it even possible?