db

package
v0.0.0-...-1b73bc2 Latest Latest
Warning

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

Go to latest
Published: May 6, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map struct {
	DBName     string
	Version    uint16
	TableCount uint32
	Tables     []Table
}

Map - database map structure

func CreateIndexMap

func CreateIndexMap(dbname string) Map

CreateIndexMap - creates the initial index map for the database

func OpenIndexMap

func OpenIndexMap(dbname string) Map

OpenIndexMap - reads the index map and returns a struct

func (*Map) CreateTable

func (m *Map) CreateTable(tableName string) bool

CreateTable - creates a table for a given database

func (*Map) Insert

func (m *Map) Insert(tableName, key, value string)

func (*Map) MapNewTable

func (m *Map) MapNewTable(tableName string) bool

MapNewTable - maps the new table into the index map

func (*Map) UpdateIndex

func (m *Map) UpdateIndex(tableName string, hash uint32, location int64)

UpdateIndex - updates the index file with a newely inserted value

type Table

type Table struct {
	ID        uint16
	TableName string
}

Table - Table info structure

Jump to

Keyboard shortcuts

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