File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed
kotlin/org/domaframework/doma/intellij/formatter Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change @@ -262,6 +262,10 @@ class SqlFormatterTest : BasePlatformTestCase() {
262262 formatSqlFile(" FunctionKeywordInConditionDirective.sql" , " FunctionKeywordInConditionDirective$formatDataPrefix .sql" )
263263 }
264264
265+ fun testFunctionNameColumnFormatter () {
266+ formatSqlFile(" FunctionNameColumn.sql" , " FunctionNameColumn$formatDataPrefix .sql" )
267+ }
268+
265269 private fun formatSqlFile (
266270 beforeFile : String ,
267271 afterFile : String ,
Original file line number Diff line number Diff line change 1+ SELECT id
2+ , [age]
3+ , /* %if maxAge*/
4+ number + age(/* timestamp1 */ ' 2099-12-31'
5+ , /* timestamp2 */ ' 2099-12-31' )
6+ /* %else*/
7+ name
8+ ,
9+ /* %end*/ " age"
10+ FROM employee
11+ WHERE (/* %for age : ages */
12+ " age"
13+ = /* age */ 30
14+ /* %if age_has_next *//* # "and" *//* %else */
15+ /* %end */
16+ /* %end */ )
17+ AND (/* %for age : ages */
18+ abs = /* abs */ 30
19+ AND age >= 20
20+ /* %if age_has_next */
21+ /* # "or" */
22+ /* %else */
23+ /* %end */
24+ /* %end */ )
Original file line number Diff line number Diff line change 1+ SELECT id
2+ , [age]
3+ , /* %if maxAge*/
4+ number + age(/* timestamp1 */ ' 2099-12-31'
5+ , /* timestamp2 */ ' 2099-12-31' )
6+ /* %else*/
7+ name
8+ ,
9+ /* %end*/
10+ " age"
11+ FROM employee
12+ WHERE (/* %for age : ages */
13+ " age" = /* age */ 30
14+ /* %if age_has_next */
15+ /* # "and" */
16+ /* %else */
17+ /* %end */
18+ /* %end */ )
19+ AND (/* %for age : ages */
20+ abs = /* abs */ 30
21+ AND age >= 20
22+ /* %if age_has_next */
23+ /* # "or" */
24+ /* %else */
25+ /* %end */
26+ /* %end */ )
You can’t perform that action at this time.
0 commit comments