From fd2545bc9dad5aaf4bdd14770a5dcf3b182a0fb5 Mon Sep 17 00:00:00 2001 From: Graham Date: Fri, 30 Sep 2022 19:48:34 +0100 Subject: [PATCH] Format OpenNxtStore Signed-off-by: Graham --- .../main/kotlin/org/openrs2/cache/OpenNxtStore.kt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cache/src/main/kotlin/org/openrs2/cache/OpenNxtStore.kt b/cache/src/main/kotlin/org/openrs2/cache/OpenNxtStore.kt index 0546ca2050..ccf7955165 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)