Problem/Motivation
While not using a lot this modules, I found useful to allow altering the generated query for count and for querying.
Proposed resolution
Add query tags to allow hangin to hook_query_TAG_alter.
as use case, one can add "is not null" as condition using:
function mymodule_query_node_llibre_restws_alter($query) {
foreach($query->conditions() as &$condition){
if ($condition['field'] == "field_data_field_tags0.field_tags_tid" && $condition['value'] == "notnull") {
$condition['value'] = NULL;
$condition['operator'] = "IS NOT NULL";
}
}
}
Comments