[wp-trac] [WordPress Trac] #53450: [WP_Meta_Query] Add faster LIKE based 'STARTSWITH' and 'ENDSWITH' compare modes for value query

WordPress Trac noreply at wordpress.org
Thu Feb 24 10:45:36 UTC 2022


#53450: [WP_Meta_Query] Add faster LIKE based 'STARTSWITH' and 'ENDSWITH' compare
modes for value query
-------------------------------------------------+-------------------------
 Reporter:  janthiel                             |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  Future
                                                 |  Release
Component:  Query                                |     Version:  5.7.2
 Severity:  trivial                              |  Resolution:
 Keywords:  dev-feedback has-patch needs-docs    |     Focuses:
  needs-codex has-unit-tests early early-like-   |  performance
  actually-early                                 |
-------------------------------------------------+-------------------------

Comment (by janthiel):

 Replying to [comment:24 janthiel]:
 > Replying to [comment:23 ironprogrammer]:
 > > Nice work on the unit tests! I think they could be a little more
 consistent by using `factory()->post->create_many`, `$query`, and
 `$expected` across the eight new tests. This would help readability.
 >
 > Hey @ironprogrammer Thanks for your feedback. Updating the PR for 6.0.0
 is not an issue at all.
 > Yet I do not understand what you mean with `$query` and `$expected`.
 `create_many` is an obvious change. The other two are not.
 > Can you please provide me with reference to the changes you propose for
 `$query` and `$expected`?
 >
 > Thanks :-)

 Ah ... never mind. Just saw what you mean. As I only copied the tests just
 the last ones were missing `$query` and `$expected` :-)

 Fixed that too.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53450#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list