datastore

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(ctx context.Context, projectID string) (tuple.Store, error)

func OpenClient

func OpenClient(cli *datastore.Client) tuple.Store

Types

type Iterator

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

func (*Iterator) Close

func (it *Iterator) Close() error

func (*Iterator) Data

func (it *Iterator) Data() tuple.Data

func (*Iterator) Err

func (it *Iterator) Err() error

func (*Iterator) Key

func (it *Iterator) Key() tuple.Key

func (*Iterator) Next

func (it *Iterator) Next(ctx context.Context) bool

func (*Iterator) Reset added in v0.2.0

func (it *Iterator) Reset()

type Table

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

func (*Table) Clear

func (tbl *Table) Clear(ctx context.Context) error

func (*Table) DeleteTuples

func (tbl *Table) DeleteTuples(ctx context.Context, f *tuple.Filter) error

func (*Table) DeleteTuplesByKey

func (tbl *Table) DeleteTuplesByKey(ctx context.Context, keys []tuple.Key) error

func (*Table) Drop

func (tbl *Table) Drop(ctx context.Context) error

func (*Table) GetTuple

func (tbl *Table) GetTuple(ctx context.Context, key tuple.Key) (tuple.Data, error)

func (*Table) GetTupleBatch

func (tbl *Table) GetTupleBatch(ctx context.Context, keys []tuple.Key) ([]tuple.Data, error)

func (*Table) Header

func (tbl *Table) Header() tuple.Header

func (*Table) InsertTuple

func (tbl *Table) InsertTuple(ctx context.Context, t tuple.Tuple) (tuple.Key, error)

func (*Table) Open

func (tbl *Table) Open(ctx context.Context, tx tuple.Tx) (tuple.Table, error)

func (*Table) Scan

func (tbl *Table) Scan(ctx context.Context, opt *tuple.ScanOptions) tuple.Iterator

func (*Table) UpdateTuple

func (tbl *Table) UpdateTuple(ctx context.Context, t tuple.Tuple, opt *tuple.UpdateOpt) error

type TupleStore

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

func (*TupleStore) Close

func (s *TupleStore) Close() error

func (*TupleStore) ListTables

func (s *TupleStore) ListTables(ctx context.Context) ([]tuple.TableInfo, error)

func (*TupleStore) Table

func (s *TupleStore) Table(ctx context.Context, name string) (tuple.TableInfo, error)

func (*TupleStore) Tx

func (s *TupleStore) Tx(ctx context.Context, rw bool) (tuple.Tx, error)

func (*TupleStore) Update

func (s *TupleStore) Update(ctx context.Context, fn func(tx tuple.Tx) error) error

func (*TupleStore) View

func (s *TupleStore) View(ctx context.Context, fn func(tx tuple.Tx) error) error

type Tx

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

func (*Tx) Close

func (tx *Tx) Close() error

func (*Tx) Commit

func (tx *Tx) Commit(ctx context.Context) error

func (*Tx) CreateTable

func (tx *Tx) CreateTable(ctx context.Context, table tuple.Header) (tuple.Table, error)

func (*Tx) ListTables

func (tx *Tx) ListTables(ctx context.Context) ([]tuple.Table, error)

func (*Tx) Table

func (tx *Tx) Table(ctx context.Context, name string) (tuple.Table, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL