Skip to content
This repository was archived by the owner on Oct 24, 2020. It is now read-only.

Commit 586751b

Browse files
committed
Remove unncessary configuration items
1 parent 8419b0f commit 586751b

File tree

5 files changed

+23
-53
lines changed

5 files changed

+23
-53
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,20 @@ You can write the following configurations in your application.properties file:
2626
quarkus.doma.datasource-name=default
2727
quarkus.doma.dialect=h2
2828
quarkus.doma.sql-file-repository=greedy-cache
29-
quarkus.doma.naming=default
29+
quarkus.doma.naming=none
3030
quarkus.doma.exception-sql-log-type=none
3131
quarkus.doma.batch-size=0
3232
quarkus.doma.fetch-size=0
3333
quarkus.doma.max-rows=0
3434
quarkus.doma.query-timeout=0
3535
36-
quarkus.doma.log.sql=true
37-
quarkus.doma.log.dao=true
38-
quarkus.doma.log.closing-failure=true
36+
quarkus.doma.log.sql=false
37+
quarkus.doma.log.dao=false
38+
quarkus.doma.log.closing-failure=false
3939
```
4040

4141
The above properties are all optional.
4242

43-
Our extension infers the `quarkus.doma.datasource-name` and `quarkus.doma.dialect` properties
44-
from the `quarkus.datasource` properties.
45-
4643
See [quarkus-doma.adoc](./quarkus-doma.adoc) for more details.
4744

4845
### Support for native images

quarkus-doma.adoc

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.dialect]]`lin
1313
[.description]
1414
--
1515
The SQL dialect.
16-
--|`standard`, `sqlite`, `db2`, `mssql`, `mssql2008`, `mysql`, `postgres`, `oracle`, `h2`, `hsql`
17-
|
16+
--|`standard`, `mssql`, `mysql`, `postgres`, `h2`
17+
|`depends on 'quarkus.datasource.db-kind'`
1818

1919

2020
a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.sql-file-repository]]`link:#quarkus-doma_quarkus.doma.sql-file-repository[quarkus.doma.sql-file-repository]`
2121

2222
[.description]
2323
--
2424
The SQL file repository.
25-
--|`no-cache`, `greedy-cache`
25+
--|`no-cache`, `greedy-cache`
2626
|`greedy-cache`
2727

2828

@@ -31,16 +31,16 @@ a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.naming]]`link
3131
[.description]
3232
--
3333
The naming convention controller.
34-
--|`none`, `lower-case`, `upper-case`, `snake-lower-case`, `snake-upper-case`, `lenient-snake-lower-case`, `lenient-snake-upper-case`, `default`
35-
|`default`
34+
--|`none`, `lower-case`, `upper-case`, `snake-lower-case`, `snake-upper-case`
35+
|`none`
3636

3737

3838
a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.exception-sql-log-type]]`link:#quarkus-doma_quarkus.doma.exception-sql-log-type[quarkus.doma.exception-sql-log-type]`
3939

4040
[.description]
4141
--
4242
The SQL log type that determines the SQL log format in exceptions.
43-
--|`raw`, `formatted`, `none`
43+
--|`raw`, `formatted`, `none`
4444
|`none`
4545

4646

@@ -49,16 +49,16 @@ a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.datasource-na
4949
[.description]
5050
--
5151
The name of the data source.
52-
--|string
53-
|
52+
--|string
53+
|`depends on 'quarkus.datasource."datasource-name".db-kind'`
5454

5555

5656
a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.batch-size]]`link:#quarkus-doma_quarkus.doma.batch-size[quarkus.doma.batch-size]`
5757

5858
[.description]
5959
--
6060
The batch size.
61-
--|int
61+
--|int
6262
|`0`
6363

6464

@@ -67,7 +67,7 @@ a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.fetch-size]]`
6767
[.description]
6868
--
6969
The fetch size.
70-
--|int
70+
--|int
7171
|`0`
7272

7373

@@ -76,7 +76,7 @@ a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.max-rows]]`li
7676
[.description]
7777
--
7878
The max rows.
79-
--|int
79+
--|int
8080
|`0`
8181

8282

@@ -85,25 +85,16 @@ a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.query-timeout
8585
[.description]
8686
--
8787
The query timeout limit in seconds.
88-
--|int
88+
--|int
8989
|`0`
9090

9191

92-
a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.log.level]]`link:#quarkus-doma_quarkus.doma.log.level[quarkus.doma.log.level]`
93-
94-
[.description]
95-
--
96-
The level of log.
97-
--|`fatal`, `error`, `warn`, `info`, `debug`, `trace`
98-
|`debug`
99-
100-
10192
a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.log.sql]]`link:#quarkus-doma_quarkus.doma.log.sql[quarkus.doma.log.sql]`
10293

10394
[.description]
10495
--
10596
Shows SQL logs.
106-
--|boolean
97+
--|boolean
10798
|`false`
10899

109100

@@ -112,7 +103,7 @@ a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.log.dao]]`lin
112103
[.description]
113104
--
114105
Shows DAO logs.
115-
--|boolean
106+
--|boolean
116107
|`false`
117108

118109

@@ -121,7 +112,7 @@ a|icon:lock[title=Fixed at build time] [[quarkus-doma_quarkus.doma.log.closing-f
121112
[.description]
122113
--
123114
Shows the logs of the failure to close JDBC resource.
124-
--|boolean
115+
--|boolean
125116
|`false`
126117

127118
|===

runtime/src/main/java/org/seasar/doma/quarkus/runtime/DomaConfiguration.java

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,11 @@
1010
import org.seasar.doma.jdbc.NoCacheSqlFileRepository;
1111
import org.seasar.doma.jdbc.SqlFileRepository;
1212
import org.seasar.doma.jdbc.SqlLogType;
13-
import org.seasar.doma.jdbc.dialect.Db2Dialect;
1413
import org.seasar.doma.jdbc.dialect.Dialect;
1514
import org.seasar.doma.jdbc.dialect.H2Dialect;
16-
import org.seasar.doma.jdbc.dialect.HsqldbDialect;
17-
import org.seasar.doma.jdbc.dialect.Mssql2008Dialect;
1815
import org.seasar.doma.jdbc.dialect.MssqlDialect;
1916
import org.seasar.doma.jdbc.dialect.MysqlDialect;
20-
import org.seasar.doma.jdbc.dialect.OracleDialect;
2117
import org.seasar.doma.jdbc.dialect.PostgresDialect;
22-
import org.seasar.doma.jdbc.dialect.SqliteDialect;
2318
import org.seasar.doma.jdbc.dialect.StandardDialect;
2419

2520
@ConfigRoot
@@ -47,7 +42,7 @@ public class DomaConfiguration {
4742
*
4843
* @see Config#getNaming()
4944
*/
50-
@ConfigItem(defaultValue = "default")
45+
@ConfigItem(defaultValue = "none")
5146
public NamingType naming;
5247

5348
/**
@@ -130,15 +125,10 @@ public String toString() {
130125

131126
public enum DialectType {
132127
STANDARD(StandardDialect::new),
133-
SQLITE(SqliteDialect::new),
134-
DB2(Db2Dialect::new),
135128
MSSQL(MssqlDialect::new),
136-
MSSQL2008(Mssql2008Dialect::new),
137129
MYSQL(MysqlDialect::new),
138130
POSTGRES(PostgresDialect::new),
139-
ORACLE(OracleDialect::new),
140-
H2(H2Dialect::new),
141-
HSQL(HsqldbDialect::new);
131+
H2(H2Dialect::new);
142132

143133
private final Supplier<Dialect> constructor;
144134

@@ -171,10 +161,7 @@ public enum NamingType {
171161
LOWER_CASE(Naming.LOWER_CASE),
172162
UPPER_CASE(Naming.UPPER_CASE),
173163
SNAKE_LOWER_CASE(Naming.SNAKE_LOWER_CASE),
174-
SNAKE_UPPER_CASE(Naming.SNAKE_UPPER_CASE),
175-
LENIENT_SNAKE_LOWER_CASE(Naming.LENIENT_SNAKE_LOWER_CASE),
176-
LENIENT_SNAKE_UPPER_CASE(Naming.LENIENT_SNAKE_UPPER_CASE),
177-
DEFAULT(Naming.DEFAULT);
164+
SNAKE_UPPER_CASE(Naming.SNAKE_UPPER_CASE);
178165

179166
private final Naming naming;
180167

runtime/src/main/java/org/seasar/doma/quarkus/runtime/JBossJdbcLogger.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class JBossJdbcLogger extends AbstractJdbcLogger<Logger.Level> {
1717
}
1818

1919
public JBossJdbcLogger(LogConfiguration logConfiguration) {
20-
super(logConfiguration.level);
20+
super(Logger.Level.DEBUG);
2121
this.logConfiguration = logConfiguration;
2222
}
2323

runtime/src/main/java/org/seasar/doma/quarkus/runtime/LogConfiguration.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,10 @@
22

33
import io.quarkus.runtime.annotations.ConfigGroup;
44
import io.quarkus.runtime.annotations.ConfigItem;
5-
import org.jboss.logging.Logger;
65

76
@ConfigGroup
87
public class LogConfiguration {
98

10-
/** The level of log. */
11-
@ConfigItem(defaultValue = "DEBUG")
12-
public Logger.Level level = Logger.Level.DEBUG;
13-
149
/** Shows SQL logs. */
1510
@ConfigItem public boolean sql;
1611

0 commit comments

Comments
 (0)