memdb

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 11 Imported by: 4 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Memdb package implements a Qlbridge Datasource in-memory implemenation using the hashicorp go-memdb (immuteable radix tree's). Qlbridge Exec allows key-value datasources to have full SQL functionality.

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 Statements.

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) Init

func (m *MemDb) Init()

Init initilize this db

func (*MemDb) Open

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

Open a Conn for this source @table name

func (*MemDb) Setup

func (m *MemDb) Setup(*schema.Schema) error

Setup this db with parent schema.

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