OpenTx
class OpenTx @JvmOverloads constructor(allocator: BufferAllocator, nodeBase: NodeBase, dbStorage: DatabaseStorage, dbState: DatabaseState, val txKey: TransactionKey, val externalSourceToken: ExternalSourceToken?, tracer: Tracer? = null, resolvedTxs: List<ResolvedTx> = emptyList()) : AutoCloseable
The per-transaction write/read handle passed to an external-source writer.
Stage writes per table via table; openQuery / executeSql run SQL against the live index with read-your-writes visibility into those staged writes. TxIndexer owns opening, committing and closing the OpenTx — a writer is handed one, it never constructs its own.
Constructors
Link copied to clipboard
constructor(allocator: BufferAllocator, nodeBase: NodeBase, dbStorage: DatabaseStorage, dbState: DatabaseState, txKey: TransactionKey, externalSourceToken: ExternalSourceToken?, tracer: Tracer? = null, resolvedTxs: List<ResolvedTx> = emptyList())
Types
Properties
Functions
Link copied to clipboard
fun executeSql(sql: String, args: RelationReader? = null, opts: OpenTx.QueryOpts = QueryOpts(), user: String? = null)
Link copied to clipboard
fun openQuery(sql: String, args: RelationReader? = null, opts: OpenTx.QueryOpts = QueryOpts()): ResultCursor
Run SQL against the database's live index, with visibility into writes made earlier in this transaction.
Link copied to clipboard
The staging area for writes to table in this tx, created on first access.