memdb

package
v0.0.0-...-8371fe2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2016 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Memdb package implements a Datasource in-memory implemenation using the hashicorp go-memdb (immuteable radix tree's).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemDb

type MemDb struct {
	*schema.Schema // schema
	// contains filtered or unexported fields
}

MemDb implements qlbridge `Source` to allow in-memory native go data

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

Features - ues immuteable radix-tree/db mvcc under the hood

func NewMemDb

func NewMemDb(name string, cols []string) (*MemDb, error)

NewMemDb creates a MemDb with given indexes, columns

func NewMemDbData

func NewMemDbData(name string, data [][]driver.Value, cols []string) (*MemDb, error)

NewMemDbData creates a MemDb with given indexes, columns, and values

func NewMemDbForSchema

func NewMemDbForSchema(name string, cols []string) (*MemDb, error)

NewMemDbForSchema creates a MemDb with given indexes, columns

func (*MemDb) Close

func (m *MemDb) Close() error

Close this source

func (*MemDb) Open

func (m *MemDb) Open(table string) (schema.Conn, error)

Open a Conn for this source @table name

func (*MemDb) Table

func (m *MemDb) Table(table string) (*schema.Table, error)

Table by name

func (*MemDb) Tables

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

Tables list, should be single table

Jump to

Keyboard shortcuts

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