mysql

package
v0.0.0-...-68be207 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2019 License: GPL-3.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const PRUNE_QUERY = "DELETE FROM goflow_records WHERE last_switched <= DATE_SUB(CURDATE(), INTERVAL %v DAY)"
View Source
const TEST_QUERY = "" /* 157-byte string literal not displayed */
View Source
const USE_QUERY = "USE %v"

MySQL Backend

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryColumn

type BinaryColumn struct {
	Name    string
	Options string
	Type    string
	Wrap    string
	Field   uint16
}

# Binary Binary columns for binary data #

func (*BinaryColumn) GetName

func (c *BinaryColumn) GetName() string

func (*BinaryColumn) GetOptions

func (c *BinaryColumn) GetOptions() string

func (*BinaryColumn) GetType

func (c *BinaryColumn) GetType() string

func (*BinaryColumn) Init

func (c *BinaryColumn) Init() string

func (*BinaryColumn) InsertValue

func (c *BinaryColumn) InsertValue(v fields.Value) string

InsertValue Retrieves the string required to insert a value in a column using normal insert statement

type Column

type Column interface {
	InsertValue(value fields.Value) string
	GetName() string
	GetType() string
	GetOptions() string

	Init() string
	// contains filtered or unexported methods
}

type IntColumn

type IntColumn struct {
	Name    string
	Options string
	Type    string
	Wrap    string
	Field   uint16
}

# INTCOLMUMN Integer-based column and methods #

func (*IntColumn) GetName

func (c *IntColumn) GetName() string

func (*IntColumn) GetOptions

func (c *IntColumn) GetOptions() string

func (*IntColumn) GetType

func (c *IntColumn) GetType() string

func (*IntColumn) Init

func (c *IntColumn) Init() string

func (*IntColumn) InsertValue

func (c *IntColumn) InsertValue(v fields.Value) string

InsertValue Retrieves the string required to insert a value in a column using normal insert statement

type Mysql

type Mysql struct {
	Dbname string
	Dbpass string
	Dbuser string
	Server string

	CheckQuery    string
	AlterQuery    string
	InitQuery     string
	AddIndexQuery string
	InsertQuery   string
	DropQuery     string
	AlterColQuery string
	// contains filtered or unexported fields
}

func (*Mysql) Add

func (b *Mysql) Add(values map[uint16]fields.Value)

func (*Mysql) CheckSchema

func (b *Mysql) CheckSchema()

func (*Mysql) Configure

func (b *Mysql) Configure(config map[string]string)

func (*Mysql) Init

func (b *Mysql) Init()

func (*Mysql) Prune

func (b *Mysql) Prune(interval string)

func (*Mysql) Reinit

func (b *Mysql) Reinit()

Re-initilize the database by dropping, and then re-adding, the schema This will remove all data within the DB.

func (*Mysql) Status

func (b *Mysql) Status() string

Status Returns information about this backend

type Schema

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

func (*Schema) AddBinaryColumn

func (s *Schema) AddBinaryColumn(f uint16, n string, t string, o string) *BinaryColumn

func (*Schema) AddIntColumn

func (s *Schema) AddIntColumn(f uint16, n string, t string, o string) *IntColumn

func (*Schema) GetColumn

func (s *Schema) GetColumn(c string) Column

func (*Schema) GetColumnStrings

func (s *Schema) GetColumnStrings(t string) string

func (*Schema) InsertQuery

func (s *Schema) InsertQuery(t string, v map[uint16]fields.Value) string

func (*Schema) InsertQueryFields

func (s *Schema) InsertQueryFields() string

Jump to

Keyboard shortcuts

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