goDB

package module
Version: v0.0.0-...-3871416 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DB_HEAD_SIZE = 128
View Source
const DEFAULT_PAGE_SIZE uint16 = 4096

DEFAULT_PAGE_SIZE (= 4096)

View Source
const IV_SIZE = 16

IV_SIZE is the size of the iv used for encryption

View Source
const MAJOR uint8 = 1

MAJOR part of Version number

View Source
const MASTER_KEY_SIZE = 32

MASTER_KEY_SIZE is the size of the master encryption key

View Source
const MINOR uint8 = 00

MINOR part of Version number

View Source
const NULL_POINTER_PAGE = 0

NULL_POINTER_PAGE is a page that doesnt exist

View Source
const PAGE_HEAD_SIZE = 64

PAGE_HEAD_SIZE represents the length of a pageHead (including place for iv)

View Source
const PATCH uint8 = 00

PATCH part of Version number

View Source
const TYPE_EMPTY_PAGES_LIST = 2

TYPE_EMPTY_PAGES_LIST holds the id of a empty_pages_list page

View Source
const TYPE_TABLE_LIST = 0

TYPE_TABLE_LIST holds the id of a table_List page

View Source
const TYPE_TABLE_ROWS = 3

TYPE_TABLE_ROWS holds the id of a table_rows page

View Source
const TYPE_TABLE_SCHEMA = 1

TYPE_TABLE_SCHEMA holds the id of a table_schema page

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

Database is the general struct you interact with

func NewDB

func NewDB() *Database

NewDB is the factory for a new database

func NewEncDB

func NewEncDB(passphrase string) *Database

NewEncDB is the factory for a new encrypted database

func (*Database) Open

func (db *Database) Open(filename string) error

Open initialises a database from the provided file

func (*Database) Vacuum

func (db *Database) Vacuum()

Vacuum optimizes the database by removing mostly trim spaces and empty pages

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL