-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Transaction Durability and Write Transaction Mutual Exclusion (#137)
* Expose transaction durability, fix write transaction exclusion * Durability jsValue as extension val * Use cheaper dummy query for mutex
- Loading branch information
1 parent
eb45b5e
commit 12ea9ee
Showing
3 changed files
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.juul.indexeddb | ||
|
||
import com.juul.indexeddb.Durability.Default | ||
import com.juul.indexeddb.Durability.Relaxed | ||
import com.juul.indexeddb.Durability.Strict | ||
|
||
/** https://developer.mozilla.org/en-US/docs/Web/API/IDBTransaction/durability */ | ||
public enum class Durability { | ||
Default, | ||
Strict, | ||
Relaxed, | ||
} | ||
|
||
internal val Durability.jsValue: String | ||
get() = when (this) { | ||
Default -> "default" | ||
Strict -> "strict" | ||
Relaxed -> "relaxed" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters