Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ open class SqlLineCommentBlock(
return it.indent.groupIndentLen.minus(2)
}
}
return 1
return it.indent.indentLen
}
return 1
}
Expand Down
4 changes: 4 additions & 0 deletions src/test/testData/sql/formatter/FormattedSelect.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ SELECT COUNT(DISTINCT (x))
, ISNULL(s.fiberid
, 0) AS fiberid
FROM phototag p
-- Line1
JOIN usno u
-- Line2
ON p.objid = u.objid
/** Join */
LEFT OUTER JOIN specobj s
Expand All @@ -24,9 +26,11 @@ SELECT COUNT(DISTINCT (x))
AND p.plate = s.plate
/** Where */
WHERE p.TYPE = DBO.FPHOTOTYPE('Star')
-- Line3
OR (p.flags & DBO.FPHOTOFLAGS('EDGE') = 0
AND (p.psfmag_g - p.extinction_g) BETWEEN 15 AND 20)
/*%if status == 2 */
-- Line4
AND u.propermotion > 2.
/** And Group */
AND (p.psfmag_g - p.extinction_g + 5 * LOG(u.propermotion / 100.) + 5 > 16.136 + 2.727 * (p.psfmag_g - p.extinction_g - (p.psfmag_i - p.extinction_i))
Expand Down
7 changes: 4 additions & 3 deletions src/test/testData/sql/formatter/Select.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,22 @@ SELECT COUNT( DISTINCT (x)),o.*
, 0) AS fiberid

FROM phototag p

-- Line1
JOIN usno u

-- Line2
ON p.objid = u.objid
/** Join */
LEFT OUTER JOIN specobj s
/** ON */
ON p.objid = s.bestobjid AND p.plate = s.plate
/** Where */
WHERE p.TYPE = DBO.FPHOTOTYPE('Star')

-- Line3
OR (p.flags & DBO.FPHOTOFLAGS('EDGE') = 0

AND (p.psfmag_g - p.extinction_g) BETWEEN 15 AND 20)
/*%if status == 2 */
-- Line4
AND u.propermotion > 2.
/** And Group */
AND (p.psfmag_g - p.extinction_g + 5 * LOG(u.propermotion / 100.) + 5 > 16.136 + 2.727 * (p.psfmag_g - p.extinction_g - (p.psfmag_i - p.extinction_i))
Expand Down