sql

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2017 License: MIT Imports: 11 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

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

Connection represents a sql connection.

func Dial

func Dial(config *conf.GlobalConfiguration) (*Connection, error)

Dial will connect to that storage engine

func (*Connection) Automigrate

func (conn *Connection) Automigrate() error

Automigrate creates any missing tables and/or columns.

func (*Connection) Close

func (conn *Connection) Close() error

Close closes the database connection.

func (*Connection) CreateInstance

func (conn *Connection) CreateInstance(instance *models.Instance) error

func (*Connection) DeleteInstance

func (conn *Connection) DeleteInstance(instance *models.Instance) error

func (*Connection) GetInstance

func (conn *Connection) GetInstance(instanceID string) (*models.Instance, error)

GetInstance finds an instance by ID

func (*Connection) GetInstanceByUUID

func (conn *Connection) GetInstanceByUUID(uuid string) (*models.Instance, error)

func (*Connection) UpdateInstance

func (conn *Connection) UpdateInstance(instance *models.Instance) error

Jump to

Keyboard shortcuts

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