mysql

package
v0.0.0-...-acef7dd Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2014 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package mysql provides an implementation of sorted.KeyValue on top of MySQL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKeyValue

func NewKeyValue(cfg Config) (sorted.KeyValue, error)

NewKeyValue returns a sorted.KeyValue implementation of the described MySQL database.

func SQLCreateTables

func SQLCreateTables() []string

Note: using character set "binary", as any knowledge of character set encodings is handled by higher layers. At this layer we're just obeying the IndexStorage interface, which is purely about bytes.

func SchemaVersion

func SchemaVersion() int

Types

type Config

type Config struct {
	Host     string // Optional. Defaults to "localhost" in ConfigFromJSON.
	Database string // Required.
	User     string // Required.
	Password string // Optional.
}

Config holds the parameters used to connect to the MySQL db.

func ConfigFromJSON

func ConfigFromJSON(config jsonconfig.Obj) (Config, error)

ConfigFromJSON populates Config from config, and validates config. It returns an error if config fails to validate.

Jump to

Keyboard shortcuts

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