[ENHANCEMENT]: Support for LIKE operator in Dynamic Get -> Tweak -> WHERE #1226
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Enhancement Details
Currently, it is not possible to use the LIKE operator in the dynamic query builder (Tweak → WHERE) within JCB.
I encountered a situation where I needed to search in a database column that stores a JSON array of multiple GUIDs. Since I couldn't use LIKE in the JCB UI, I had to manually adjust the query like this:
$query->where('a.author_guid = ' . $db->quote('%' . $this->_item[$this->input->getInt('id')]->guid . '%'));
to this
$query->where('a.author_guid LIKE ' . $db->quote('%' . $this->_item[$this->input->getInt('id')]->guid . '%'));
I would like to request that the LIKE operator be supported in the dynamic Tweak → WHERE UI and logic, similar to how = is currently supported. This would allow more flexible queries, especially for use cases involving JSON fields, partial matches, or substring searches.
Thank you!
Which part of the extension will be affected by this enhancement?
Compilation of component, Placeholder(admin_view)
Additional Context
No response
We can add this before the next stable release :)
This is the purposed new list:
And this is the new compiler array:
This is the Dynamicget class that needs updating.
@oxido We have rolled out this requested feature in JCB 5.1.1-beta2. Please download and test the latest package and let us know if all works as expected.
This is good, it is working as expected.
Thank you!