mirror of
https://github.com/BlockWorldGroup/Ledger-Databases.git
synced 2025-10-14 21:00:01 +08:00
Minor fixes
This commit is contained in:
@@ -26,6 +26,9 @@ object MySQL : LedgerDatabase {
|
||||
addDataSourceProperty("useLocalSessionState", true)
|
||||
addDataSourceProperty("elideSetAutoCommits", true)
|
||||
addDataSourceProperty("alwaysSendSetIsolation", false)
|
||||
addDataSourceProperty("useJDBCCompliantTimezoneShift", true)
|
||||
addDataSourceProperty("useLegacyDatetimeCode", false)
|
||||
addDataSourceProperty("serverTimezone", "UTC")
|
||||
for ((key, value) in Ledger.config[DatabaseExtensionSpec.properties]) {
|
||||
addDataSourceProperty(key, value)
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@ object PostgreSQL : LedgerDatabase {
|
||||
username = Ledger.config[DatabaseExtensionSpec.userName]
|
||||
password = Ledger.config[DatabaseExtensionSpec.password]
|
||||
maximumPoolSize = Ledger.config[DatabaseExtensionSpec.maxPoolSize]
|
||||
addDataSourceProperty("reWriteBatchedInserts", "true")
|
||||
for ((key, value) in Ledger.config[DatabaseExtensionSpec.properties]) {
|
||||
addDataSourceProperty(key, value)
|
||||
}
|
||||
|
@@ -3,10 +3,11 @@ package net.quiltservertools.ledger.databases.databases
|
||||
import com.github.quiltservertools.ledger.Ledger
|
||||
import org.sqlite.SQLiteDataSource
|
||||
import java.nio.file.Path
|
||||
import kotlin.io.path.pathString
|
||||
|
||||
object SQLite : LedgerDatabase {
|
||||
override fun getDataSource(savePath: Path) = SQLiteDataSource().apply {
|
||||
url = "jdbc:sqlite:$savePath"
|
||||
url = "jdbc:sqlite:${savePath.pathString}"
|
||||
}
|
||||
|
||||
override fun getDatabaseIdentifier() = Ledger.identifier(Ledger.DEFAULT_DATABASE)
|
||||
|
@@ -9,8 +9,8 @@
|
||||
"yitzy299"
|
||||
],
|
||||
"contact": {
|
||||
"homepage": "https://fabricmc.net/",
|
||||
"sources": "https://github.com/FabricMC/fabric-example-mod"
|
||||
"homepage": "https://modrinth.com/project/ledger-databases",
|
||||
"sources": "https://github.com/QuiltServerTools/Ledger-Databases"
|
||||
},
|
||||
|
||||
"license": "LGPL-3.0",
|
||||
|
Reference in New Issue
Block a user