Documentation ¶
Overview ¶
Package bttest contains test helpers for working with the bigtable package.
To use a Server, create it, and then connect to it with no security: (The project/instance values are ignored.)
srv, err := bttest.NewServer("localhost:0") ... conn, err := grpc.Dial(srv.Addr, grpc.WithInsecure()) ... client, err := bigtable.NewClient(ctx, proj, instance, option.WithGRPCConn(conn)) ...
Index ¶
- func CreateTables(ctx context.Context, db *sql.DB) error
- type Item
- type ItemIterator
- type Server
- type SqlRows
- func (db *SqlRows) Ascend(iterator ItemIterator)
- func (db *SqlRows) AscendGreaterOrEqual(pivot Item, iterator ItemIterator)
- func (db *SqlRows) AscendLessThan(pivot Item, iterator ItemIterator)
- func (db *SqlRows) AscendRange(greaterOrEqual, lessThan Item, iterator ItemIterator)
- func (db *SqlRows) Delete(item Item)
- func (db *SqlRows) DeleteAll()
- func (db *SqlRows) Get(key Item) Item
- func (db *SqlRows) Len() int
- func (db *SqlRows) ReplaceOrInsert(item Item) Item
- type SqlTables
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ItemIterator ¶
type ItemIterator = btree.ItemIterator
type Server ¶
type Server struct { Addr string // contains filtered or unexported fields }
Server is an in-memory Cloud Bigtable fake. It is unauthenticated, and only a rough approximation.
type SqlRows ¶
type SqlRows struct {
// contains filtered or unexported fields
}
SqlRows is a backend modeled on the github.com/google/btree interface all errors are considered fatal
rows are persisted in rows_t
func (*SqlRows) Ascend ¶
func (db *SqlRows) Ascend(iterator ItemIterator)
func (*SqlRows) AscendGreaterOrEqual ¶
func (db *SqlRows) AscendGreaterOrEqual(pivot Item, iterator ItemIterator)
func (*SqlRows) AscendLessThan ¶
func (db *SqlRows) AscendLessThan(pivot Item, iterator ItemIterator)
func (*SqlRows) AscendRange ¶
func (db *SqlRows) AscendRange(greaterOrEqual, lessThan Item, iterator ItemIterator)
func (*SqlRows) ReplaceOrInsert ¶
type SqlTables ¶
type SqlTables struct {
// contains filtered or unexported fields
}
SqlTables persists tables to tables_t
func NewSqlTables ¶
Click to show internal directories.
Click to hide internal directories.