membtree

package
v0.0.0-...-c484601 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2015 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DriverItem

type DriverItem struct {
	*datasource.SqlDriverMessageMap
}

func (*DriverItem) Less

func (m *DriverItem) Less(than btree.Item) bool

type Key

type Key struct {
	Id uint64
}

func NewKey

func NewKey(key uint64) *Key

func (*Key) Key

func (m *Key) Key() driver.Value

func (*Key) Less

func (m *Key) Less(than btree.Item) bool

type StaticDataSource

type StaticDataSource struct {
	*datasource.Schema
	// contains filtered or unexported fields
}

Static DataSource, implements qlbridge DataSource to allow in memory native go data

to have a Schema and implement and be operated on by Sql Operations

Features - only a single column may (and must) be identified as the "Indexed" column - NOT threadsafe

This is meant as an example of the interfaces of qlbridge DataSources

func NewStaticData

func NewStaticData(name string) *StaticDataSource

func NewStaticDataSource

func NewStaticDataSource(name string, indexedCol int, data [][]driver.Value, cols []string) *StaticDataSource

func NewStaticDataValue

func NewStaticDataValue(name string, data interface{}) *StaticDataSource

StaticDataValue is used

func (*StaticDataSource) CanSeek

func (m *StaticDataSource) CanSeek(sql *expr.SqlSelect) bool

interface for Seeker

func (*StaticDataSource) Close

func (m *StaticDataSource) Close() error

func (*StaticDataSource) Columns

func (m *StaticDataSource) Columns() []string

func (*StaticDataSource) CreateIterator

func (m *StaticDataSource) CreateIterator(filter expr.Node) datasource.Iterator

func (*StaticDataSource) Delete

func (m *StaticDataSource) Delete(key driver.Value) (int, error)

Interface for Deletion

func (*StaticDataSource) DeleteExpression

func (m *StaticDataSource) DeleteExpression(where expr.Node) (int, error)

Delete using a Where Expression

func (*StaticDataSource) Get

func (*StaticDataSource) Length

func (m *StaticDataSource) Length() int

func (*StaticDataSource) MesgChan

func (m *StaticDataSource) MesgChan(filter expr.Node) <-chan datasource.Message

func (*StaticDataSource) MultiGet

func (m *StaticDataSource) MultiGet(keys []driver.Value) ([]datasource.Message, error)

func (*StaticDataSource) Next

func (*StaticDataSource) Open

func (m *StaticDataSource) Open(connInfo string) (datasource.SourceConn, error)

func (*StaticDataSource) Put

func (m *StaticDataSource) Put(ctx context.Context, key datasource.Key, row interface{}) (datasource.Key, error)

interface for Upsert.Put()

func (*StaticDataSource) PutMulti

func (m *StaticDataSource) PutMulti(ctx context.Context, keys []datasource.Key, src interface{}) ([]datasource.Key, error)

func (*StaticDataSource) SetColumns

func (m *StaticDataSource) SetColumns(cols []string)

func (*StaticDataSource) Tables

func (m *StaticDataSource) Tables() []string

Jump to

Keyboard shortcuts

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