-
Notifications
You must be signed in to change notification settings - Fork 1
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
implement SliceableRepository #6
base: master
Are you sure you want to change the base?
Conversation
@@ -18,7 +18,7 @@ | |||
<logger name="org.springframework" level="INFO" /> | |||
<logger name="jp.xet.springframework.data.mirage" level="DEBUG" /> | |||
|
|||
<logger name="com.miragesql.miragesql" level="WARN" /> | |||
<logger name="com.miragesql.miragesql" level="DEBUG" /> |
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.
test 時は 発行する SQL が見えた方が良いと思われた
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.
nitsのみ
Class<?> returnedDomainType, SliceableParameterAccessor accessor) { | ||
Sliceable sliceable = accessor.getSliceable(); | ||
if (sliceable != null) { | ||
addSliceParam(parameterMap, sliceable); | ||
} else if (accessor.getSort() != null) { |
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.
このアクセサからソートが取得できたときのsortなんですが、sliceableがなかった時のelseの場合だけ適用されるの中途半端な気がしていて、sliceableでかつsort、みたいなことができないのであればとりあえずこのsliceableがなかったらsort、はなくてもよいかなと思いました(なんか違う意図があったら教えてもらえると)
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.
消しました(多分 Sort パラメータの存在を知ってる人はいない)
26bf016
/** | ||
* SliceableRepository のメソッド定義無し. | ||
*/ | ||
public interface TaskRepository extends WritableRepository<Task, String>, SliceableRepository<Task, String> { |
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.
なんとなくTaskSliceableRepositoryのが規則性がある感じがしました
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.
修正しました
26bf016
@inabajunmr |
概要
#2
classmethod/spar-wings#6 の対応済みの spar-wings が必要
内容
SliceableRepository#findAll や
メソッドの戻り値に Slice を指定したメソッドに対して
Slice 形式の結果を返す