ecodeclub / eorm

简单 ORM 框架
Apache License 2.0
194 stars 64 forks source link

Delete() 完善 #96

Closed archer-wyz closed 2 years ago

archer-wyz commented 2 years ago

之前申请合并成main分支了,新开一个,sorry...

codecov[bot] commented 2 years ago

Codecov Report

Merging #96 (80121df) into main (b538198) will decrease coverage by 0.10%. The diff coverage is 85.00%.

@@            Coverage Diff             @@
##             main      #96      +/-   ##
==========================================
- Coverage   81.72%   81.61%   -0.11%     
==========================================
  Files          17       17              
  Lines        1067     1077      +10     
==========================================
+ Hits          872      879       +7     
- Misses        167      169       +2     
- Partials       28       29       +1     
Impacted Files Coverage Δ
db.go 73.58% <ø> (-3.09%) :arrow_down:
delete.go 76.92% <85.00%> (+4.19%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

flycash commented 2 years ago

Format Go code 错误就是指你在本地运行一下 make check,这个命令会帮你格式化好代码,然后重新提交一下就可以了

flycash commented 2 years ago

重新 rebase 过去最新代码

flycash commented 2 years ago

@TopWay2Hogwarts 你这个还改吗?

archer-wyz commented 2 years ago

主要是卡在了返回结果比较的问题上,直接比较会有如下:

image

尝试使用反射:

image image
flycash commented 2 years ago

看起来还不太行,你就用原来的比较方式吧,后面我看看怎么优化这段测试代码 @TopWay2Hogwarts

flycash commented 2 years ago

image 这个例子改成 ExampleNewDeleter()

flycash commented 2 years ago

deepsource 刚才是检测到我们删除了 DB 上的 Delete 方法,所以 ExampleDB_Delete 就不符合规范了。我们改成 ExampleNewDeleter 就没问题了