Skip to content

Commit f135a8a

Browse files
committed
Fix typos in MySQL and Oracle function tokens and streamline token addition
1 parent 8892a79 commit f135a8a

File tree

4 files changed

+7
-45
lines changed

4 files changed

+7
-45
lines changed

src/main/java/org/domaframework/doma/intellij/tokens/MySqlFunctionToken.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public class MySqlFunctionToken {
9898
"atan",
9999
"atan2",
100100
"ceil",
101-
"celing",
101+
"ceiling",
102102
"conv",
103103
"cos",
104104
"cot",

src/main/java/org/domaframework/doma/intellij/tokens/OracleFunctionToken.java

Lines changed: 6 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,7 @@ public class OracleFunctionToken {
2525
static {
2626
// Mathematical Functions
2727
{
28-
TOKENS.addAll(
29-
Set.of(
30-
"abs",
31-
"ceil",
32-
"floor",
33-
"mod",
34-
"power",
35-
"sqrt",
36-
"sign",
37-
"trunc"
38-
));
28+
TOKENS.addAll(Set.of("abs", "ceil", "floor", "mod", "power", "sqrt", "sign", "trunc"));
3929
}
4030
// Conversion Functions
4131
{
@@ -54,41 +44,19 @@ public class OracleFunctionToken {
5444
"to_char",
5545
"to_date",
5646
"to_number",
57-
"unistr"
58-
));
47+
"unistr"));
5948
}
6049
// String Functions
6150
{
62-
TOKENS.addAll(
63-
Set.of(
64-
"substr",
65-
"substrb",
66-
"substr4"
67-
));
51+
TOKENS.addAll(Set.of("substr", "substrb", "substr4"));
6852
}
6953
// Lob Functions
7054
{
71-
TOKENS.addAll(
72-
Set.of(
73-
"empty_blob",
74-
"empty_clob",
75-
"to_blob",
76-
"to_clob",
77-
"to_lob",
78-
"to_nclob"
79-
));
55+
TOKENS.addAll(Set.of("empty_blob", "empty_clob", "to_blob", "to_clob", "to_lob", "to_nclob"));
8056
}
8157
// Comparison functions
8258
{
83-
TOKENS.addAll(
84-
Set.of(
85-
"decode",
86-
"greatest",
87-
"least",
88-
"coalesce",
89-
"nullif",
90-
"nvl"
91-
));
59+
TOKENS.addAll(Set.of("decode", "greatest", "least", "coalesce", "nullif", "nvl"));
9260
}
9361
// Date/Time Functions
9462
{
@@ -102,8 +70,7 @@ public class OracleFunctionToken {
10270
"getdate",
10371
"timestampadd",
10472
"timestampdiff",
105-
"to_date"
106-
));
73+
"to_date"));
10774
}
10875
}
10976

src/main/java/org/domaframework/doma/intellij/tokens/SqlFunctionToken.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public class SqlFunctionToken {
3434
"max",
3535
"min",
3636
"log",
37-
"subset",
3837
"substring",
3938
"trim",
4039
"ltrim",

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ class SqlFormattingModelBuilder : FormattingModelBuilder {
129129
SqlTypes.ASTERISK,
130130
TokenType.WHITE_SPACE,
131131
SqlCustomSpacingBuilder.nonSpacing,
132-
).withSpacing(
133-
SqlTypes.FUNCTION_NAME,
134-
SqlTypes.LEFT_PAREN,
135-
SqlCustomSpacingBuilder.nonSpacing,
136132
)
137133
// Table And Column Rules
138134
// WORD And OTHER Rules

0 commit comments

Comments
 (0)