storages

package
v0.0.0-...-e6fb8a6 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SystemDatabasesStorageEngineName = "SYSTEM_DATABASES"
	SystemTablesStorageEngineName    = "SYSTEM_TABLES"
	SystemNumbersStorageEngineName   = "SYSTEM_NUMBERS"
)
View Source
const (
	MemoryStorageEngineName = "MEMORY"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IStorage

type IStorage interface {

	// Name 使用的存储介质的名字
	Name() string

	// Columns 列都有哪些
	Columns() []*columns.Column

	// GetInputStream 输入流
	GetInputStream(*sessions.Session) (datastreams.IDataBlockInputStream, error)

	// GetOutputStream 输出流
	GetOutputStream(*sessions.Session) (datastreams.IDataBlockOutputStream, error)

	// Close 关闭存储介质
	Close()
}

IStorage 存储层抽象定义

func NewMemoryStorage

func NewMemoryStorage(ctx *StorageContext, cols []*columns.Column) IStorage

func NewSystemDatabasesStorage

func NewSystemDatabasesStorage(ctx *StorageContext, cols []*columns.Column) IStorage

func NewSystemNumbersStorage

func NewSystemNumbersStorage(ctx *StorageContext, cols []*columns.Column) IStorage

func NewSystemTablesStorage

func NewSystemTablesStorage(ctx *StorageContext, cols []*columns.Column) IStorage

func StorageFactory

func StorageFactory(ctx *StorageContext, engine string, columns []*columns.Column) (IStorage, error)

type StorageContext

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

func NewStorageContext

func NewStorageContext(log *xlog.Log, conf *config.Config) *StorageContext

func (*StorageContext) SetDatabasesFillFunc

func (ctx *StorageContext) SetDatabasesFillFunc(fn system.DatabasesFillFunc)

func (*StorageContext) SetTablesFillFunc

func (ctx *StorageContext) SetTablesFillFunc(fn system.TablesFillFunc)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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