-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add method ScanAndCount
and AllAndCount
for Model package gdb
#2635
Conversation
Codecov ReportPatch coverage:
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. Additional details and impacted files@@ Coverage Diff @@
## master #2635 +/- ##
==========================================
- Coverage 78.88% 78.87% -0.02%
==========================================
Files 631 631
Lines 51784 51809 +25
==========================================
+ Hits 40849 40862 +13
- Misses 8913 8921 +8
- Partials 2022 2026 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议补上对应的单元测试代码
3db3d04
to
77b56fc
Compare
单元测试有例子吗,我看 Scan 和 All 之前没有单元测试,担心 orm 依赖数据库,可以不依赖数据库写单元测试吗? |
Are there any examples of unit tests? I see that Scan and All have no unit tests before. I am worried that orm depends on the database. Can you write unit tests without relying on the database? |
有安装 mysql 的数据库的,你直接模拟先写书 20 条,在按照条件去查询就可以了 |
If you have a mysql database installed, you can directly simulate writing 20 books first, and then query according to the conditions |
77b56fc
to
128ff22
Compare
在 sqlite 上补充单元测试代码 |
Supplement the unit test code on sqlite |
128ff22
to
34ab0e2
Compare
@gqcn 大佬审核下 pr |
@gqcn boss review the pr |
34ab0e2
to
235ab5d
Compare
@lusson-luo The feature is awesome, but the CI failed, please have a check. |
0f40ad1
to
69d01a8
Compare
@gqcn ok, i finish ci failed |
69d01a8
to
9ea5611
Compare
@gqcn 大佬审核下 pr |
@gqcn boss review the pr |
d6a1109
to
876cc69
Compare
@lusson-luo I'm watching this PR. |
@lusson-luo I'm watching this. |
@gqcn 嗯嗯,上面的问题我都答复了,我认为 count(1) 可能比 count(filed) 更适合一点,理由也在上面 |
@gqcn Well, I have answered all the above questions, I think count(1) may be more suitable than count(filed), the reason is also above |
29d744a
to
d58f6fa
Compare
d58f6fa
to
e6c8145
Compare
ScanAndCount
and AllAndCount
for Model package gdb
ScanAndCount
and AllAndCount
for Model package gdbScanAndCount
and AllAndCount
for Model package gdb
feat: 添加方法两个 ScanAndCount, AllAndCount.