...

Package txn

import "bitbucket.org/twicedb/twicedb-go/client/txn"
Overview
Index

Overview ▾

Package txn provides a struct and utilities for working with transactions in TwiceDB.

type Txn

type Txn struct {
    // contains filtered or unexported fields
}

func NewEventTxn

func NewEventTxn(ev shared.Event) *Txn

func NewTxn

func NewTxn() *Txn

func (*Txn) Delete

func (t *Txn) Delete(objectId shared.ObjectId, lastRead shared.Tt, vtFrom shared.Vt)

func (*Txn) DeleteObject

func (t *Txn) DeleteObject(object capi.Indexable, vtFrom shared.Vt) error

func (*Txn) Event

func (t *Txn) Event() (shared.Event, error)

func (*Txn) HasEvent

func (t *Txn) HasEvent() bool

func (*Txn) Objects

func (t *Txn) Objects() []capi.Indexable

func (*Txn) Put

func (t *Txn) Put(objectId shared.ObjectId, lastRead shared.Tt, vtFrom shared.Vt, blob *shared.Blob)

func (*Txn) PutObject

func (t *Txn) PutObject(object capi.Indexable, vtFrom shared.Vt) error

func (*Txn) Reinstate

func (t *Txn) Reinstate(objectId shared.ObjectId, lastRead shared.Tt, vtFrom shared.Vt)

func (*Txn) ReinstateObject

func (t *Txn) ReinstateObject(object capi.Indexable, vtFrom shared.Vt) error

func (*Txn) SetEvent

func (t *Txn) SetEvent(ev shared.Event) error

func (*Txn) WriteCommands

func (t *Txn) WriteCommands() []*writerp.WriteRequest_WriteCommand