diff --git a/cache/src/main/kotlin/org/openrs2/cache/OpenNxtStore.kt b/cache/src/main/kotlin/org/openrs2/cache/OpenNxtStore.kt index 0546ca20..ccf79551 100644 --- a/cache/src/main/kotlin/org/openrs2/cache/OpenNxtStore.kt +++ b/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)