mysql

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

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

Go to latest
Published: Feb 22, 2015 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package mysql provides the underlying connection used by the Database interface, using a MySQL connection.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseConnection

type DatabaseConnection struct {
	// Config stores the current configuration values being used
	Config *misc.Configuration
	// contains filtered or unexported fields
}

DatabaseConnection provides an implementation of the Connection interface using a MySQL database

func (*DatabaseConnection) Connect

func (c *DatabaseConnection) Connect() error

Connect tries to establish a connection to the MySQL backend, returning an error if the attempt failed

func (*DatabaseConnection) LoadAllLootPastes

func (c *DatabaseConnection) LoadAllLootPastes() ([]*models.LootPaste, error)

LoadAllLootPastes retrieves all loot pastes from the MySQL database, returning an error if the query failed

func (*DatabaseConnection) RawQuery

func (c *DatabaseConnection) RawQuery(query string, v ...interface{}) ([]map[string]interface{}, error)

RawQuery performs a raw MySQL query and returns a map of interfaces containing the retrieve data. An error is returned if the query failed

func (*DatabaseConnection) SaveLootPaste

func (c *DatabaseConnection) SaveLootPaste(lootPaste *models.LootPaste) (*models.LootPaste, error)

SaveLootPaste saves a loot paste to the MySQL database, returning the updated model or an error if the query failed

Jump to

Keyboard shortcuts

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