Documentation ¶
Index ¶
- type ApplyOption
- type BatchReadOnlyTransaction
- type BatchReadOnlyTransactionID
- type BatchReadOnlyTransactionMock
- func (mock *BatchReadOnlyTransactionMock) AnalyzeQuery(ctx context.Context, statement Statement) (*QueryPlan, error)
- func (mock *BatchReadOnlyTransactionMock) Cleanup(ctx context.Context)
- func (mock *BatchReadOnlyTransactionMock) Close()
- func (mock *BatchReadOnlyTransactionMock) Execute(ctx context.Context, p *Partition) RowIterator
- func (mock *BatchReadOnlyTransactionMock) GetID() BatchReadOnlyTransactionID
- func (mock *BatchReadOnlyTransactionMock) PartitionQuery(ctx context.Context, statement Statement, opts PartitionOptions) ([]*Partition, error)
- func (mock *BatchReadOnlyTransactionMock) PartitionRead(ctx context.Context, table string, keys KeySet, columns []string, ...) ([]*spanner.Partition, error)
- func (mock *BatchReadOnlyTransactionMock) PartitionReadUsingIndex(ctx context.Context, table, index string, keys KeySet, columns []string, ...) ([]*spanner.Partition, error)
- func (mock *BatchReadOnlyTransactionMock) Query(ctx context.Context, statement Statement) RowIterator
- func (mock *BatchReadOnlyTransactionMock) QueryWithStats(ctx context.Context, statement Statement) RowIterator
- func (mock *BatchReadOnlyTransactionMock) Read(ctx context.Context, table string, keys KeySet, columns []string) RowIterator
- func (mock *BatchReadOnlyTransactionMock) ReadRow(ctx context.Context, table string, key Key, columns []string) (Row, error)
- func (mock *BatchReadOnlyTransactionMock) ReadUsingIndex(ctx context.Context, table, index string, keys KeySet, columns []string) RowIterator
- func (mock *BatchReadOnlyTransactionMock) ReadWithOptions(ctx context.Context, table string, keys KeySet, columns []string, ...) RowIterator
- type Client
- type ClientMock
- func (mock *ClientMock) Apply(ctx context.Context, ms []*Mutation, opts ...ApplyOption) (time.Time, error)
- func (mock *ClientMock) BatchReadOnlyTransaction(ctx context.Context, tb TimestampBound) (BatchReadOnlyTransaction, error)
- func (mock *ClientMock) BatchReadOnlyTransactionFromID(tid BatchReadOnlyTransactionID) BatchReadOnlyTransaction
- func (mock *ClientMock) Close()
- func (mock *ClientMock) PartitionedUpdate(ctx context.Context, statement Statement) (int64, error)
- func (mock *ClientMock) ReadOnlyTransaction() ReadOnlyTransaction
- func (mock *ClientMock) ReadWriteTransaction(ctx context.Context, ...) (time.Time, error)
- func (mock *ClientMock) Single() ReadOnlyTransaction
- type Key
- type KeyRange
- type KeySet
- type Mutation
- func Delete(table string, ks KeySet) *Mutation
- func Insert(table string, cols []string, vals []interface{}) *Mutation
- func InsertMap(table string, in map[string]interface{}) *Mutation
- func InsertOrUpdate(table string, cols []string, vals []interface{}) *Mutation
- func InsertOrUpdateMap(table string, in map[string]interface{}) *Mutation
- func InsertOrUpdateStruct(table string, in interface{}) (*Mutation, error)
- func InsertStruct(table string, in interface{}) (*Mutation, error)
- func Replace(table string, cols []string, vals []interface{}) *Mutation
- func ReplaceMap(table string, in map[string]interface{}) *Mutation
- func ReplaceStruct(table string, in interface{}) (*Mutation, error)
- func Update(table string, cols []string, vals []interface{}) *Mutation
- func UpdateMap(table string, in map[string]interface{}) *Mutation
- func UpdateStruct(table string, in interface{}) (*Mutation, error)
- type Partition
- type PartitionOptions
- type QueryPlan
- type ReadOnlyTransaction
- type ReadOnlyTransactionMock
- func (mock *ReadOnlyTransactionMock) AnalyzeQuery(ctx context.Context, statement spanner.Statement) (*QueryPlan, error)
- func (mock *ReadOnlyTransactionMock) Close()
- func (mock *ReadOnlyTransactionMock) Query(ctx context.Context, statement spanner.Statement) RowIterator
- func (mock *ReadOnlyTransactionMock) QueryWithStats(ctx context.Context, statement Statement) RowIterator
- func (mock *ReadOnlyTransactionMock) Read(ctx context.Context, table string, keys KeySet, columns []string) RowIterator
- func (mock *ReadOnlyTransactionMock) ReadRow(ctx context.Context, table string, key spanner.Key, columns []string) (Row, error)
- func (mock *ReadOnlyTransactionMock) ReadUsingIndex(ctx context.Context, table, index string, keys KeySet, columns []string) RowIterator
- func (mock *ReadOnlyTransactionMock) ReadWithOptions(ctx context.Context, table string, keys KeySet, columns []string, ...) RowIterator
- func (mock *ReadOnlyTransactionMock) Timestamp() (time.Time, error)
- func (mock *ReadOnlyTransactionMock) WithTimestampBound(tb TimestampBound) ReadOnlyTransaction
- type ReadOptions
- type ReadWriteTransaction
- type Row
- type RowIterator
- type RowIteratorMock
- type RowMock
- func (mock *RowMock) Column(i int, ptr interface{}) error
- func (mock *RowMock) ColumnByName(name string, ptr interface{}) error
- func (mock *RowMock) ColumnIndex(name string) (int, error)
- func (mock *RowMock) ColumnName(i int) string
- func (mock *RowMock) ColumnNames() []string
- func (mock *RowMock) Columns(ptrs ...interface{}) error
- func (mock *RowMock) Size() int
- func (mock *RowMock) ToStruct(ptr interface{}) error
- type Statement
- type TimestampBound
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyOption ¶
type ApplyOption = spanner.ApplyOption
type BatchReadOnlyTransaction ¶
type BatchReadOnlyTransaction interface { GetID() BatchReadOnlyTransactionID AnalyzeQuery(context.Context, Statement) (*QueryPlan, error) Cleanup(context.Context) Close() Execute(context.Context, *Partition) RowIterator PartitionQuery(context.Context, Statement, PartitionOptions) ([]*Partition, error) PartitionRead(context.Context, string, KeySet, []string, PartitionOptions) ([]*Partition, error) PartitionReadUsingIndex(context.Context, string, string, KeySet, []string, PartitionOptions) ([]*Partition, error) Query(context.Context, Statement) RowIterator QueryWithStats(context.Context, Statement) RowIterator Read(context.Context, string, KeySet, []string) RowIterator ReadRow(context.Context, string, Key, []string) (Row, error) ReadUsingIndex(context.Context, string, string, KeySet, []string) RowIterator ReadWithOptions(context.Context, string, KeySet, []string, *ReadOptions) RowIterator }
type BatchReadOnlyTransactionID ¶
type BatchReadOnlyTransactionID = spanner.BatchReadOnlyTransactionID
type BatchReadOnlyTransactionMock ¶
func (*BatchReadOnlyTransactionMock) AnalyzeQuery ¶
func (*BatchReadOnlyTransactionMock) Cleanup ¶
func (mock *BatchReadOnlyTransactionMock) Cleanup(ctx context.Context)
func (*BatchReadOnlyTransactionMock) Close ¶
func (mock *BatchReadOnlyTransactionMock) Close()
func (*BatchReadOnlyTransactionMock) Execute ¶
func (mock *BatchReadOnlyTransactionMock) Execute(ctx context.Context, p *Partition) RowIterator
func (*BatchReadOnlyTransactionMock) GetID ¶
func (mock *BatchReadOnlyTransactionMock) GetID() BatchReadOnlyTransactionID
func (*BatchReadOnlyTransactionMock) PartitionQuery ¶
func (mock *BatchReadOnlyTransactionMock) PartitionQuery( ctx context.Context, statement Statement, opts PartitionOptions, ) ([]*Partition, error)
func (*BatchReadOnlyTransactionMock) PartitionRead ¶
func (mock *BatchReadOnlyTransactionMock) PartitionRead( ctx context.Context, table string, keys KeySet, columns []string, opts PartitionOptions, ) ([]*spanner.Partition, error)
func (*BatchReadOnlyTransactionMock) PartitionReadUsingIndex ¶
func (mock *BatchReadOnlyTransactionMock) PartitionReadUsingIndex( ctx context.Context, table, index string, keys KeySet, columns []string, opts PartitionOptions, ) ([]*spanner.Partition, error)
func (*BatchReadOnlyTransactionMock) Query ¶
func (mock *BatchReadOnlyTransactionMock) Query(ctx context.Context, statement Statement) RowIterator
func (*BatchReadOnlyTransactionMock) QueryWithStats ¶
func (mock *BatchReadOnlyTransactionMock) QueryWithStats(ctx context.Context, statement Statement) RowIterator
func (*BatchReadOnlyTransactionMock) Read ¶
func (mock *BatchReadOnlyTransactionMock) Read( ctx context.Context, table string, keys KeySet, columns []string, ) RowIterator
func (*BatchReadOnlyTransactionMock) ReadUsingIndex ¶
func (mock *BatchReadOnlyTransactionMock) ReadUsingIndex( ctx context.Context, table, index string, keys KeySet, columns []string, ) RowIterator
func (*BatchReadOnlyTransactionMock) ReadWithOptions ¶
func (mock *BatchReadOnlyTransactionMock) ReadWithOptions( ctx context.Context, table string, keys KeySet, columns []string, opts *ReadOptions) RowIterator
type Client ¶
type Client interface { Apply(context.Context, []*Mutation, ...ApplyOption) (time.Time, error) BatchReadOnlyTransaction(context.Context, TimestampBound) (BatchReadOnlyTransaction, error) BatchReadOnlyTransactionFromID(BatchReadOnlyTransactionID) BatchReadOnlyTransaction Close() PartitionedUpdate(context.Context, Statement) (int64, error) ReadOnlyTransaction() ReadOnlyTransaction ReadWriteTransaction(context.Context, func(context.Context, *ReadWriteTransaction) error) (time.Time, error) Single() ReadOnlyTransaction }
type ClientMock ¶
func (*ClientMock) Apply ¶
func (mock *ClientMock) Apply(ctx context.Context, ms []*Mutation, opts ...ApplyOption) (time.Time, error)
func (*ClientMock) BatchReadOnlyTransaction ¶
func (mock *ClientMock) BatchReadOnlyTransaction(ctx context.Context, tb TimestampBound) (BatchReadOnlyTransaction, error)
func (*ClientMock) BatchReadOnlyTransactionFromID ¶
func (mock *ClientMock) BatchReadOnlyTransactionFromID(tid BatchReadOnlyTransactionID) BatchReadOnlyTransaction
func (*ClientMock) Close ¶
func (mock *ClientMock) Close()
func (*ClientMock) PartitionedUpdate ¶
func (*ClientMock) ReadOnlyTransaction ¶
func (mock *ClientMock) ReadOnlyTransaction() ReadOnlyTransaction
func (*ClientMock) ReadWriteTransaction ¶
func (*ClientMock) Single ¶
func (mock *ClientMock) Single() ReadOnlyTransaction
type Mutation ¶
func InsertOrUpdate ¶
func InsertOrUpdateMap ¶
func InsertOrUpdateStruct ¶
func InsertStruct ¶
func ReplaceMap ¶
func ReplaceStruct ¶
func UpdateStruct ¶
type PartitionOptions ¶
type PartitionOptions = spanner.PartitionOptions
type ReadOnlyTransaction ¶
type ReadOnlyTransaction interface { AnalyzeQuery(context.Context, Statement) (*QueryPlan, error) Close() Query(context.Context, Statement) RowIterator QueryWithStats(context.Context, Statement) RowIterator Read(context.Context, string, KeySet, []string) RowIterator ReadRow(context.Context, string, Key, []string) (Row, error) ReadUsingIndex(context.Context, string, string, KeySet, []string) RowIterator ReadWithOptions(context.Context, string, KeySet, []string, *ReadOptions) RowIterator Timestamp() (time.Time, error) WithTimestampBound(TimestampBound) ReadOnlyTransaction }
type ReadOnlyTransactionMock ¶
func (*ReadOnlyTransactionMock) AnalyzeQuery ¶
func (*ReadOnlyTransactionMock) Close ¶
func (mock *ReadOnlyTransactionMock) Close()
func (*ReadOnlyTransactionMock) Query ¶
func (mock *ReadOnlyTransactionMock) Query(ctx context.Context, statement spanner.Statement) RowIterator
func (*ReadOnlyTransactionMock) QueryWithStats ¶
func (mock *ReadOnlyTransactionMock) QueryWithStats(ctx context.Context, statement Statement) RowIterator
func (*ReadOnlyTransactionMock) Read ¶
func (mock *ReadOnlyTransactionMock) Read( ctx context.Context, table string, keys KeySet, columns []string, ) RowIterator
func (*ReadOnlyTransactionMock) ReadUsingIndex ¶
func (mock *ReadOnlyTransactionMock) ReadUsingIndex( ctx context.Context, table, index string, keys KeySet, columns []string, ) RowIterator
func (*ReadOnlyTransactionMock) ReadWithOptions ¶
func (mock *ReadOnlyTransactionMock) ReadWithOptions( ctx context.Context, table string, keys KeySet, columns []string, opts *ReadOptions, ) RowIterator
func (*ReadOnlyTransactionMock) Timestamp ¶
func (mock *ReadOnlyTransactionMock) Timestamp() (time.Time, error)
func (*ReadOnlyTransactionMock) WithTimestampBound ¶
func (mock *ReadOnlyTransactionMock) WithTimestampBound(tb TimestampBound) ReadOnlyTransaction
type ReadOptions ¶
type ReadOptions = spanner.ReadOptions
type ReadWriteTransaction ¶
type ReadWriteTransaction = spanner.ReadWriteTransaction
type RowIterator ¶
type RowIteratorMock ¶
func NewRowIteratorMock ¶
func NewRowIteratorMock() *RowIteratorMock
func (*RowIteratorMock) Next ¶
func (mock *RowIteratorMock) Next() (Row, error)
func (*RowIteratorMock) Stop ¶
func (mock *RowIteratorMock) Stop()
type RowMock ¶
func NewRowMock ¶
func NewRowMock() *RowMock
func (*RowMock) ColumnByName ¶
func (*RowMock) ColumnName ¶
func (*RowMock) ColumnNames ¶
type TimestampBound ¶
type TimestampBound = spanner.TimestampBound
Source Files ¶
Click to show internal directories.
Click to hide internal directories.