File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
main/java/org/seasar/doma/gradle/codegen/util
test/java/org/seasar/doma/gradle/codegen/util Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -115,6 +115,8 @@ public static String inferDriverClassName(String url) {
115115 return "org.sqlite.JDBC" ;
116116 case "mysql" :
117117 return "com.mysql.cj.jdbc.Driver" ;
118+ case "mariadb" :
119+ return "org.mariadb.jdbc.Driver" ;
118120 case "postgresql" :
119121 return "org.postgresql.Driver" ;
120122 case "sqlserver" :
Original file line number Diff line number Diff line change @@ -43,6 +43,12 @@ public void testInferDriverClassName_mysql() throws Exception {
4343 assertEquals ("com.mysql.cj.jdbc.Driver" , driverClassName );
4444 }
4545
46+ @ Test
47+ public void testInferDriverClassName_mariadb () throws Exception {
48+ String driverClassName = JdbcUtil .inferDriverClassName ("jdbc:mariadb://localhost:3306/hoge" );
49+ assertEquals ("org.mariadb.jdbc.Driver" , driverClassName );
50+ }
51+
4652 @ Test
4753 public void testInferDriverClassName_unknown () throws Exception {
4854 String driverClassName = JdbcUtil .inferDriverClassName ("jdbc:unknown://localhost/hoge" );
You can’t perform that action at this time.
0 commit comments