db

package
v0.0.0-...-0b8055e Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EmptyConnection = Connection{}

Functions

func FieldEq

func FieldEq(record interface{}, fieldName string, fieldValue interface{}) squirrel.Eq

Types

type Connection

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

Connection stateful connection to our db

func Get

func Get(user string, password string, host string) (Connection, error)

Get snags us a connection to our wonderful backend, or an error if something goes terribly wrong

func (*Connection) Bind

func (c *Connection) Bind(tableName string, schema structable.Record) structable.Recorder

func (*Connection) RunQuery

func (c *Connection) RunQuery(builder squirrel.SelectBuilder) (*sql.Rows, error)

Jump to

Keyboard shortcuts

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