Skip to content

Commit

Permalink
ugh
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Sep 26, 2020
1 parent 6800daf commit 5b37444
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group 'kweb'
version '0.4.5'
version '0.4.6'

buildscript {
ext.kotlin_version = '1.4.10'
Expand Down
7 changes: 6 additions & 1 deletion src/main/kotlin/kweb/shoebox/stores/MapDBStore.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ import org.mapdb.Serializer
@ExperimentalSerializationApi
class MapDBStore<T : Any>(val db : DB, val name : String, val serializer: KSerializer<T>) : Store<T> {

private val map = db.hashMap(name).keySerializer(Serializer.STRING).valueSerializer(Serializer.BYTE_ARRAY).create()
private val map =
db
.hashMap(name)
.keySerializer(Serializer.STRING)
.valueSerializer(Serializer.BYTE_ARRAY)
.createOrOpen()

override val entries: Iterable<KeyValue<T>>
get() = map.map { (k, v) ->
Expand Down

0 comments on commit 5b37444

Please sign in to comment.