Skip to content

Commit d6aae48

Browse files
committed
1 parent d8895f1 commit d6aae48

3 files changed

Lines changed: 5 additions & 11 deletions

File tree

pom.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,6 @@
6262
</developers>
6363

6464
<properties>
65-
<!--<project.bujava.versionild.sourceEncoding>UTF-8</project.bujava.versionild.sourceEncoding>-->
66-
<!--<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>-->
67-
<!--<dbh2.version>1.4.187</dbh2.version>-->
6865
<docker.image.prefix>mgramin</docker.image.prefix>
6966

7067
<github.global.server>github</github.global.server>
@@ -78,7 +75,7 @@
7875
<parent>
7976
<groupId>org.springframework.boot</groupId>
8077
<artifactId>spring-boot-starter-parent</artifactId>
81-
<version>2.2.0.M1</version>
78+
<version>2.1.3.RELEASE</version>
8279
<relativePath/>
8380
</parent>
8481

src/main/kotlin/com/github/mgramin/sqlboot/model/connection/DbConnectionList.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,8 @@ import org.springframework.stereotype.Service
3838
@ConfigurationProperties(prefix = "conf")
3939
open class DbConnectionList(val connections: List<SimpleDbConnection>) {
4040

41-
fun getConnectionByName(name: String): SimpleDbConnection {
42-
return connections.first { v -> v.getName().equals(name, ignoreCase = true) }
43-
}
41+
fun getConnectionByName(name: String) = connections.first { v -> v.getName().equals(name, ignoreCase = true) }
42+
43+
fun getConnectionsByMask(name: String) = connections.filter { v -> v.getName().matches(name.toRegex()) }
4444

45-
fun getConnectionsByMask(name: String): List<SimpleDbConnection> {
46-
return connections.filter { v -> v.getName().matches(name.toRegex()) }
47-
}
4845
}

src/test/kotlin/com/github/mgramin/sqlboot/model/resourcetype/impl/sql/SqlResourceTypeTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ class SqlResourceTypeTest {
8989
aliases = arrayListOf("column"),
9090
sql = sql,
9191
connections = listOf(db))
92-
assertEquals(356, type.read(DbUri("column/main_schema.users")).count().block())
92+
assertEquals(347, type.read(DbUri("column/main_schema.users")).count().block())
9393
}
9494

9595
@Test

0 commit comments

Comments
 (0)