Documentation ¶
Index ¶
- type IndexBucket
- type IndexItem
- type QueryCache
- func (c QueryCache) BuildIndexKey(connectionName, table string, qualMap map[string]*proto.Quals) string
- func (c QueryCache) BuildResultKey(connectionName, table string, qualMap map[string]*proto.Quals, ...) string
- func (c QueryCache) Get(connectionName, table string, qualMap map[string]*proto.Quals, ...) *QueryResult
- func (c QueryCache) Set(connectionName, table string, qualMap map[string]*proto.Quals, ...)
- type QueryResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IndexBucket ¶
type IndexBucket struct {
Items []*IndexItem
}
each index bucket contains index items for all cache results for a given table and qual set
func (*IndexBucket) Append ¶
func (b *IndexBucket) Append(item *IndexItem)
func (*IndexBucket) Get ¶
func (b *IndexBucket) Get(columns []string) *IndexItem
find an index item which satisfies all columns
type IndexItem ¶
each index item has the columns and cached index for a single cached query result note - this index item it tied to a specific table and set of quals
func (IndexItem) SatisfiesColumns ¶
type QueryCache ¶
type QueryCache struct {
// contains filtered or unexported fields
}
func NewQueryCache ¶
func NewQueryCache() (*QueryCache, error)
func (QueryCache) BuildIndexKey ¶
func (QueryCache) BuildResultKey ¶
func (QueryCache) Get ¶
func (c QueryCache) Get(connectionName, table string, qualMap map[string]*proto.Quals, columns []string) *QueryResult
type QueryResult ¶
type QueryResult struct {
Rows []map[string]interface{}
}
func (*QueryResult) Append ¶
func (q *QueryResult) Append(row map[string]interface{})
Click to show internal directories.
Click to hide internal directories.