Skip to content

Commit 9fc459b

Browse files
committed
Add method to retrieve the last group filter 'SqlElConditionLoopCommentBlock', excluding comments
1 parent 2f7af06 commit 9fc459b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/kotlin/org/domaframework/doma/intellij/formatter/builder/SqlBlockBuilder.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ open class SqlBlockBuilder {
4242

4343
fun getGroupTopNodeIndexHistory(): List<SqlBlock> = groupTopNodeIndexHistory
4444

45+
fun getLastGroupFilterDirective(): SqlBlock? = getGroupTopNodeIndexHistory().lastOrNull { it !is SqlElConditionLoopCommentBlock }
46+
4547
fun addGroupTopNodeIndexHistory(block: SqlBlock) {
4648
groupTopNodeIndexHistory.add(block)
4749
}

0 commit comments

Comments
 (0)