File tree Expand file tree Collapse file tree
main/kotlin/com/github/mgramin/sqlboot/model/connection
test/kotlin/com/github/mgramin/sqlboot/model/resourcetype/impl/sql Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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>
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
Original file line number Diff line number Diff line change @@ -38,11 +38,8 @@ import org.springframework.stereotype.Service
3838@ConfigurationProperties(prefix = " conf" )
3939open 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}
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments