database

package
v0.0.0-...-ce289cb Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDatabase

func CreateDatabase(path string, name string) error

Types

type Database

type Database struct {
	Name string
	// contains filtered or unexported fields
}

func NewDatabase

func NewDatabase(name string, path string, logger idbutil.Logger, metrics *metrics.Metrics, cacheSize uint) (*Database, int, error)

func (*Database) CreateTable

func (d *Database) CreateTable(name string, fields map[string]field.Field, options request.TableOptions) error

func (*Database) Delete

func (d *Database) Delete() error

func (*Database) DeleteTable

func (d *Database) DeleteTable(tableName string) error

func (*Database) Get

func (d *Database) Get(tableName string, request table.Request) ([]map[string]json.RawMessage, error)

func (*Database) GetTable

func (d *Database) GetTable(tableName string) (map[string]request.Field, *request.TableOptions, error)

func (*Database) GetTableNames

func (d *Database) GetTableNames() []string

func (*Database) Insert

func (d *Database) Insert(tableName string, o map[string]json.RawMessage) error

func (*Database) Kill

func (d *Database) Kill()

func (*Database) Remove

func (d *Database) Remove(tableName string, request table.Request) (int64, error)

func (*Database) Update

func (d *Database) Update(tableName string, o map[string]json.RawMessage) error

Jump to

Keyboard shortcuts

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