INTERNAL: Move create clause and overflow action validation out of CollectionCreate#1103
Merged
Merged
Conversation
oliviarla
previously approved these changes
Jul 15, 2026
jhpark816
reviewed
Jul 15, 2026
| * @return {@code <exp> <maxcount> [overflow action] [unreadable]} (no flags / create / noreply) | ||
| */ | ||
| public String stringify() { | ||
| return clause; |
Collaborator
There was a problem hiding this comment.
stringify() 메서드에 실제 string화하는 코드를 두는 것이 자연스럽지 않는 지 ?
if (clause == null) {
StringBuilder sb = new StringBuilder();
sb.append(expireTime).append(' ').append(maxCount);
if (overflowAction != null) {
sb.append(' ').append(overflowAction);
}
if (!readable) {
sb.append(' ').append("unreadable");
}
clause = sb.toString();
}
return clause;
Collaborator
Author
There was a problem hiding this comment.
의미상 stringify() 에서 진행하는게 더 적합해보입니다.
수정하도록 하겠습니다.
…ollectionCreate` - Move create clause serialization to CreateAttributes - Move overflow action validation to CollectionType
f1v3-dev
force-pushed
the
internal/attributes
branch
from
July 15, 2026 09:30
f149bc9 to
84ca887
Compare
jhpark816
approved these changes
Jul 15, 2026
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.
🔗 Related Issue
⌨️ What I did
CollectionCreate에 몰려 있던 책임을 각 클래스로 옮겨 응집도를 높이고 중복을 제거했습니다.AS-IS
CollectionCreate가 정적 유틸(makeCreateClause,checkOverflowAction) 메서드를 가지고 있어, 남의 책임까지 가지고 있는 상황TO-BE
CreateAttributes,CollectionType)에게 이동시키고,CollectionCreate는 "명령을 어떻게 조립할 것인가" 만을 남기는 형태로 전환CreateAttributes: 속성 직렬화 담당 (stringify,toCreateClause)CollectionType: 자신의 타입이 허용할 수 있는 overflow action 검증 담당 (checkOverflowAction)CollectionCreate: 명령 조립만 담당 (속성 부분은CreateAttributes에 위임)