-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
v0.4.0 release
- Loading branch information
Showing
18 changed files
with
423 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.gradle | ||
.kotlin | ||
build | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
lib/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/ConnectionConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.huanshankeji.exposedvertxsqlclient | ||
|
||
sealed interface ConnectionConfig { | ||
val userAndRole: String | ||
val database: String | ||
|
||
class Socket( | ||
val host: String, | ||
val port: Int? = null, // `null` for the default port | ||
val user: String, | ||
val password: String, | ||
override val database: String | ||
) : ConnectionConfig { | ||
override val userAndRole: String get() = user | ||
} | ||
|
||
class UnixDomainSocketWithPeerAuthentication( | ||
val path: String, | ||
val role: String, | ||
override val database: String | ||
) : ConnectionConfig { | ||
override val userAndRole: String get() = role | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
lib/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/ConnectionType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.huanshankeji.exposedvertxsqlclient | ||
|
||
enum class ConnectionType { | ||
Socket, UnixDomainSocketWithPeerAuthentication | ||
} |
Oops, something went wrong.