Table

inner class Table : AutoCloseable

Per-table staging area for a tx's writes.

Rows are written column-by-column into a shared relation.

writePut / writeDelete / writeErase — and the batch writePuts / writeDeletes / writeErases / patchDocs — wrap this protocol for callers that don't need the column-level (zero-alloc) control.

If you elect to write the values directly, each op must have exactly one value written to each of the columns:

Then, a terminal endPut / endDelete / endErase — this is what records the row.

In columnar style, you may choose to write all your IDs first, then all the valid-times, then all the documents, then the batch endPuts / endDeletes / endErases - it is your responsibility to ensure a consistent number of values in each column.

In any event, you must write all the batch's row data before calling the corresponding end methods.

Properties

Link copied to clipboard

The document-column sink for a put: write the doc's columns here, between the id/valid-time writes and endPut.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
fun endDelete()

Ends a DELETE operation.

Link copied to clipboard
fun endDeletes(count: Int)

Ends count DELETE operations.

Link copied to clipboard
fun endErase()

Ends an ERASE operation.

Link copied to clipboard
fun endErases(count: Int)

Ends count ERASE operations.

Link copied to clipboard
fun endPut()
Link copied to clipboard
fun endPuts(count: Int)
Link copied to clipboard
fun patchDocs(docs: RelationReader, validFrom: Instant? = null, validTo: Instant? = null)

Instant-based overload of patchDocs for end-user callers working with java.time.Instant. Null on either bound means the same as passing systemTimeMicros / MAX_LONG to the µs overload.

fun patchDocs(docs: RelationReader, validFromMicros: Long, validToMicros: Long)

Bulk-patch docs into this table, keyed by _iid, preserving existing columns where the patched doc doesn't supply a new value.

Link copied to clipboard
Link copied to clipboard
fun writeDelete(id: Any, validFrom: Instant? = null, validTo: Instant? = null)

Single delete of id over the given valid-time range.

Link copied to clipboard
fun writeDeletes(rel: RelationReader, defaultValidFromMicros: Long = systemTimeMicros, defaultValidToMicros: Long = MAX_LONG)

Batch delete: deletes every row in rel (keyed by _iid).

Link copied to clipboard
fun writeErase(id: Any)

Single erase of id across all valid time, in one call.

Link copied to clipboard

Batch erase: erases every iid in iids across all valid time.

Link copied to clipboard
fun writeId(id: Any)

Writes the row's entity id.

Link copied to clipboard
fun writePut(doc: Map<String, *>, validFrom: Instant? = null, validTo: Instant? = null)

Single document put:

Link copied to clipboard
fun writePuts(rel: RelationReader, defaultValidFromMicros: Long = systemTimeMicros, defaultValidToMicros: Long = MAX_LONG)

Batch put: writes every row in rel, content from doc.

Link copied to clipboard
fun writeValidTimeMicros(validFrom: Long, validTo: Long)
Link copied to clipboard
fun writeValidTimes(validFrom: Instant? = null, validTo: Instant? = null)