mockcsv

package
v0.0.0-...-261b5b0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MockCsvGlobal = NewMockSource()
)

Functions

func LoadTable

func LoadTable(name, csvRaw string)

MockCsv is used for mocking so has a global data source we can load data into

Types

type MockCsvSource

type MockCsvSource struct {
	// contains filtered or unexported fields
}

Mock Data source for testing

  • creates an in memory b-tree per "table"
  • not thread safe

func NewMockSource

func NewMockSource() *MockCsvSource

func (*MockCsvSource) Close

func (m *MockCsvSource) Close() error

func (*MockCsvSource) CreateTable

func (m *MockCsvSource) CreateTable(tableName, csvRaw string)

func (*MockCsvSource) Open

func (m *MockCsvSource) Open(tableName string) (schema.Conn, error)

func (*MockCsvSource) Table

func (m *MockCsvSource) Table(tableName string) (*schema.Table, error)

func (*MockCsvSource) Tables

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

type MockCsvTable

type MockCsvTable struct {
	*membtree.StaticDataSource
}

A table

Jump to

Keyboard shortcuts

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