mirror of
https://github.com/BlockWorldGroup/Ledger-Databases.git
synced 2025-10-14 04:39:59 +08:00
Fix SQLite and H2 file paths
This commit is contained in:
@@ -8,7 +8,7 @@ import kotlin.io.path.pathString
|
||||
|
||||
object H2Database : LedgerDatabase {
|
||||
override fun getDataSource(savePath: Path): DataSource = JdbcDataSource().apply {
|
||||
setURL("jdbc:h2:${savePath.pathString};MODE=MySQL")
|
||||
setURL("jdbc:h2:${savePath.resolve("ledger.h2").pathString};MODE=MySQL")
|
||||
}
|
||||
|
||||
override fun getDatabaseIdentifier() = LedgerDatabases.identifier("h2")
|
||||
|
@@ -7,7 +7,7 @@ import kotlin.io.path.pathString
|
||||
|
||||
object SQLite : LedgerDatabase {
|
||||
override fun getDataSource(savePath: Path) = SQLiteDataSource().apply {
|
||||
url = "jdbc:sqlite:${savePath.pathString}"
|
||||
url = "jdbc:sqlite:${savePath.resolve("ledger.sqlite").pathString}"
|
||||
}
|
||||
|
||||
override fun getDatabaseIdentifier() = Ledger.identifier(Ledger.DEFAULT_DATABASE)
|
||||
|
Reference in New Issue
Block a user