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