Conversation
使用mongo驱动时 `think\model\concern\DbConnect` 第40行需要调用mongo的自动递增主键的方法,会报方法不存在的错误, 补充了这3个对应方法解决此bug
Refactor 'like' query handling to escape non-regex strings before creating Regex object. mongodb的like查询,如果$value是字符串判断是否正则表达式,否则做一下正则特殊字符转义处理,避免$value中包含了正则特殊字符,导致查询未达预期
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.0 #829 +/- ##
=========================================
Coverage 52.06% 52.06%
- Complexity 3513 3514 +1
=========================================
Files 74 74
Lines 8323 8278 -45
=========================================
- Hits 4333 4310 -23
+ Misses 3990 3968 -22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
在实际使用中,$value可能包含了正则的特殊字符,导致查询报错或未能达预期,因此增加判断$value是否为
/.../的正则表达式,否则做一下preg_quote处理