table

package module
v0.0.0-...-5f34eba Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: BSD-3-Clause Imports: 12 Imported by: 3

Documentation

Overview

* Copyright © 2020. TIBCO Software Inc. * This file is subject to the license terms contained * in the license file that is distributed with this file.

* Copyright © 2020. TIBCO Software Inc. * This file is subject to the license terms contained * in the license file that is distributed with this file.

* Copyright © 2020. TIBCO Software Inc. * This file is subject to the license terms contained * in the license file that is distributed with this file.

Index

Constants

View Source
const (
	REDIS     = "Redis"
	IN_MEMORY = "InMemory"
)

Variables

This section is empty.

Functions

func ConstructKey

func ConstructKey(keyNameStrs []string, tuple map[string]interface{}) (CompositKey, CompositKey)

Types

type CompositKey

type CompositKey struct {
	Id uint64
}

func KeyFromDataArray

func KeyFromDataArray(elements []interface{}) CompositKey

type InMemoryTable

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

func NewInMenmory

func NewInMenmory(properties map[string]interface{}) (*InMemoryTable, error)

func (*InMemoryTable) AddIndex

func (this *InMemoryTable) AddIndex(keyName []string) bool

func (*InMemoryTable) Delete

func (this *InMemoryTable) Delete(data map[string]interface{}) *Record

func (*InMemoryTable) GenerateKeys

func (this *InMemoryTable) GenerateKeys(arr []string, data []string, start int, end int, index int, r int)

func (*InMemoryTable) Get

func (this *InMemoryTable) Get(searchKey []string, data map[string]interface{}) ([]*Record, bool)

func (*InMemoryTable) GetAll

func (this *InMemoryTable) GetAll() ([]*Record, bool)

func (*InMemoryTable) GetPkeyNames

func (this *InMemoryTable) GetPkeyNames() []string

func (*InMemoryTable) Insert

func (this *InMemoryTable) Insert(data map[string]interface{}) (*Record, *Record)

func (*InMemoryTable) Load

func (this *InMemoryTable) Load(file *os.File)

func (*InMemoryTable) RemoveIndex

func (this *InMemoryTable) RemoveIndex(keyName []string) bool

func (*InMemoryTable) RowCount

func (this *InMemoryTable) RowCount() int

func (*InMemoryTable) SaveData

func (this *InMemoryTable) SaveData(file *os.File)

func (*InMemoryTable) SaveSchema

func (this *InMemoryTable) SaveSchema(file *os.File)

func (*InMemoryTable) Upsert

func (this *InMemoryTable) Upsert(data map[string]interface{}) (*Record, *Record)

type Record

type Record map[string]interface{}

func (*Record) Clone

func (this *Record) Clone() *Record

type Redis

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

func NewRedis

func NewRedis(properties map[string]interface{}) (*Redis, error)

func (*Redis) AddIndex

func (this *Redis) AddIndex(keyName []string) bool

func (*Redis) Delete

func (this *Redis) Delete(data map[string]interface{}) *Record

func (*Redis) Get

func (this *Redis) Get(searchKey []string, data map[string]interface{}) ([]*Record, bool)

func (*Redis) GetAll

func (this *Redis) GetAll() ([]*Record, bool)

func (*Redis) GetPkeyNames

func (this *Redis) GetPkeyNames() []string

func (*Redis) Insert

func (this *Redis) Insert(data map[string]interface{}) (*Record, *Record)

func (*Redis) RemoveIndex

func (this *Redis) RemoveIndex(keyName []string) bool

func (*Redis) RowCount

func (this *Redis) RowCount() int

func (*Redis) Upsert

func (this *Redis) Upsert(data map[string]interface{}) (*Record, *Record)

type Schema

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

func CreateSchema

func CreateSchema(schema *[]map[string]interface{}) *Schema

func (*Schema) DataSchemas

func (this *Schema) DataSchemas() *[](map[string]interface{})

func (*Schema) Length

func (this *Schema) Length() int

type Table

type Table interface {
	AddIndex(keyName []string) bool
	RemoveIndex(keyName []string) bool
	GetPkeyNames() []string
	GetAll() ([]*Record, bool)
	Get(searchKey []string, data map[string]interface{}) ([]*Record, bool)
	Insert(data map[string]interface{}) (*Record, *Record)
	Upsert(data map[string]interface{}) (*Record, *Record)
	Delete(data map[string]interface{}) *Record
	RowCount() int
}

type TableManager

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

func GetTableManager

func GetTableManager() *TableManager

func (*TableManager) CreateTable

func (this *TableManager) CreateTable(properties map[string]interface{}) (Table, error)

func (*TableManager) GetTable

func (this *TableManager) GetTable(tablename string) Table

Jump to

Keyboard shortcuts

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