Record

class Record(    val key: String,     val fields: Map<String, Any?>,     val mutationId: Uuid? = null) : Map<String, Any?>

A normalized entry that corresponds to a response object. Object fields are stored if they are a GraphQL Scalars. If a field is a GraphQL Object a CacheKey will be stored instead.

Constructors

Link copied to clipboard
fun Record(    key: String,     fields: Map<String, Any?>,     mutationId: Uuid?,     date: Map<String, Long?>)
Link copied to clipboard
fun Record(    key: String,     fields: Map<String, Any?>,     mutationId: Uuid? = null)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun containsKey(key: String): Boolean
Link copied to clipboard
open override fun containsValue(value: Any?): Boolean
Link copied to clipboard
fun fieldKeys(): Set<String>

Returns a set of all field keys. A field key incorporates any GraphQL arguments in addition to the field name.

Link copied to clipboard
open operator override fun get(key: String): Any?
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
fun mergeWith(newRecord: Record): Pair<Record, Set<String>>

fun mergeWith(newRecord: Record, newDate: Long?): Pair<Record, Set<String>>

Returns a merge result record and a set of field keys which have changed, or were added. A field key incorporates any GraphQL arguments in addition to the field name.

Link copied to clipboard
fun referencedFields(): List<CacheKey>

Returns the list of referenced cache fields

Properties

Link copied to clipboard
var date: Map<String, Long?>? = null
Link copied to clipboard
open override val entries: Set<Map.Entry<String, Any?>>
Link copied to clipboard
val fields: Map<String, Any?>

a list of fields. Values can be

Link copied to clipboard
val key: String
Link copied to clipboard
open override val keys: Set<String>
Link copied to clipboard
val mutationId: Uuid? = null
Link copied to clipboard
open override val size: Int
Link copied to clipboard
val sizeInBytes: Int
Link copied to clipboard
open override val values: Collection<Any?>