Versions in this module Expand all Collapse all v0 v0.10.0 Jun 30, 2017 v0.9.0 Jun 21, 2017 v0.8.0 Jun 14, 2017 Changes in this version type Key + func (k Key) AsPrefix() KeyRange type KeySet + func KeySets(keySets ...KeySet) KeySet v0.7.0 Mar 10, 2017 Changes in this version + const AdminScope + const Scope + func ErrCode(err error) codes.Code + func ErrDesc(err error) string + type ApplyOption func(*applyOption) + func ApplyAtLeastOnce() ApplyOption + type Client struct + func NewClient(ctx context.Context, database string, opts ...option.ClientOption) (*Client, error) + func NewClientWithConfig(ctx context.Context, database string, config ClientConfig, ...) (*Client, error) + func (c *Client) Apply(ctx context.Context, ms []*Mutation, opts ...ApplyOption) (time.Time, error) + func (c *Client) Close() + func (c *Client) ReadOnlyTransaction() *ReadOnlyTransaction + func (c *Client) ReadWriteTransaction(ctx context.Context, f func(t *ReadWriteTransaction) error) (time.Time, error) + func (c *Client) Single() *ReadOnlyTransaction + type ClientConfig struct + NumChannels int + type Error struct + Code codes.Code + Desc string + func (e *Error) Error() string + type GenericColumnValue struct + Type *sppb.Type + Value *proto3.Value + func NewGenericColumnValue(v interface{}) (*GenericColumnValue, error) + func (v GenericColumnValue) Decode(ptr interface{}) error + type Key []interface + func (key Key) String() string + type KeyRange struct + End Key + Kind KeyRangeKind + Start Key + func (r KeyRange) String() string + type KeyRangeKind int + const ClosedClosed + const ClosedOpen + const OpenClosed + const OpenOpen + type KeySet struct + All bool + Keys []Key + Ranges []KeyRange + func AllKeys() KeySet + func Keys(keys ...Key) KeySet + func PrefixRange(prefix Key) KeySet + func Range(r KeyRange) KeySet + func UnionKeySets(keySets ...KeySet) KeySet + type Mutation struct + func Delete(table string, key Key) *Mutation + func DeleteKeyRange(table string, r KeyRange) *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 NullBool struct + Bool bool + Valid bool + func (n NullBool) String() string + type NullDate struct + Date civil.Date + Valid bool + func (n NullDate) String() string + type NullFloat64 struct + Float64 float64 + Valid bool + func (n NullFloat64) String() string + type NullInt64 struct + Int64 int64 + Valid bool + func (n NullInt64) String() string + type NullRow struct + Row Row + Valid bool + type NullString struct + StringVal string + Valid bool + func (n NullString) String() string + type NullTime struct + Time time.Time + Valid bool + func (n NullTime) String() string + type ReadOnlyTransaction struct + func (t *ReadOnlyTransaction) Close() + func (t *ReadOnlyTransaction) Query(ctx context.Context, statement Statement) *RowIterator + func (t *ReadOnlyTransaction) Read(ctx context.Context, table string, keys KeySet, columns []string) *RowIterator + func (t *ReadOnlyTransaction) ReadRow(ctx context.Context, table string, key Key, columns []string) (*Row, error) + func (t *ReadOnlyTransaction) ReadUsingIndex(ctx context.Context, table, index string, keys KeySet, columns []string) *RowIterator + func (t *ReadOnlyTransaction) Timestamp() (time.Time, error) + func (t *ReadOnlyTransaction) WithTimestampBound(tb TimestampBound) *ReadOnlyTransaction + type ReadWriteTransaction struct + func (t *ReadWriteTransaction) BufferWrite(ms []*Mutation) error + func (t *ReadWriteTransaction) Query(ctx context.Context, statement Statement) *RowIterator + func (t *ReadWriteTransaction) Read(ctx context.Context, table string, keys KeySet, columns []string) *RowIterator + func (t *ReadWriteTransaction) ReadRow(ctx context.Context, table string, key Key, columns []string) (*Row, error) + func (t *ReadWriteTransaction) ReadUsingIndex(ctx context.Context, table, index string, keys KeySet, columns []string) *RowIterator + type Row struct + func NewRow(columnNames []string, columnValues []interface{}) (*Row, error) + func (r *Row) Column(i int, ptr interface{}) error + func (r *Row) ColumnByName(name string, ptr interface{}) error + func (r *Row) ColumnIndex(name string) (int, error) + func (r *Row) ColumnName(i int) string + func (r *Row) ColumnNames() []string + func (r *Row) Columns(ptrs ...interface{}) error + func (r *Row) Size() int + func (r *Row) ToStruct(p interface{}) error + type RowIterator struct + func (r *RowIterator) Do(f func(r *Row) error) error + func (r *RowIterator) Next() (*Row, error) + func (r *RowIterator) Stop() + type SessionPoolConfig struct + HealthCheckInterval time.Duration + HealthCheckWorkers int + MaxBurst uint64 + MaxOpened uint64 + MaxSessionAge time.Duration + MinOpened uint64 + WriteSessions float64 + type Statement struct + Params map[string]interface{} + SQL string + func NewStatement(sql string) Statement + type TimestampBound struct + func ExactStaleness(d time.Duration) TimestampBound + func MaxStaleness(d time.Duration) TimestampBound + func MinReadTimestamp(t time.Time) TimestampBound + func ReadTimestamp(t time.Time) TimestampBound + func StrongRead() TimestampBound + func (tb TimestampBound) String() string