Skip to content

1.0.5

Latest
Compare
Choose a tag to compare
@boz14676 boz14676 released this 02 Sep 06:15
3df522c

Change FuzzySearch.

Diffrent from previous:
Old:

$this->userRepository->pushCriteria(new FuzzySearch('Jack', [ 'name', 'pinyin' ]));
$this->userRepository->pushCriteria(new AttributeSearch(['city' => '北京']));

// sql executed: select * from `users` where `name` LIKE "%Jack%" OR `pinyin` LIKE "%%Jack" AND `city` = " 北京";

New

$this->userRepository->pushCriteria(new FuzzySearch('Jack', [ 'name', 'pinyin' ]));
$this->userRepository->pushCriteria(new AttributeSearch(['city' => '北京']));

// sql executed: select * from `users` where (`name` LIKE "%Jack%" OR `pinyin` LIKE "%%Jack") AND `city` = " 北京";