Format OpenNxtStore

Signed-off-by: Graham <gpe@openrs2.org>
master
Graham 2 years ago
parent dc8fcd09f6
commit fd2545bc9d
  1. 12
      cache/src/main/kotlin/org/openrs2/cache/OpenNxtStore.kt

@ -28,11 +28,13 @@ public object OpenNxtStore {
}
private fun unpackArchive(connection: Connection, archive: Int, output: Store) {
connection.prepareStatement("""
connection.prepareStatement(
"""
SELECT data, crc
FROM cache_index
WHERE key = 1
""".trimIndent()).use { stmt ->
""".trimIndent()
).use { stmt ->
stmt.executeQuery().use { rows ->
if (rows.next()) {
val checksum = rows.getInt(2)
@ -51,10 +53,12 @@ public object OpenNxtStore {
}
}
connection.prepareStatement("""
connection.prepareStatement(
"""
SELECT key, data, crc, version
FROM cache
""".trimIndent()).use { stmt ->
""".trimIndent()
).use { stmt ->
stmt.executeQuery().use { rows ->
while (rows.next()) {
val group = rows.getInt(1)

Loading…
Cancel
Save