database

package
v0.0.0-...-696a884 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2014 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package database provides methods for querying an SQL database through a stable interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

func (*Database) Delete

func (d *Database) Delete(p Request) (interface{}, error)

func (*Database) Get

func (d *Database) Get(p Request) (interface{}, error)

func (*Database) Put

func (d *Database) Put(p Request) (interface{}, error)

func (*Database) Query

func (d *Database) Query(p Request) (interface{}, error)

func (*Database) Setup

func (d *Database) Setup(config *config.Config) error

type JoinRequest

type JoinRequest struct {
	Table      string
	Conditions []string
	Type       string
}

type OrderRequest

type OrderRequest struct {
	Column string
	Order  string
}

type Request

type Request struct {
	Sig        string
	Auth       string
	Db         string
	Table      string
	Select     []interface{}
	Distinct   bool
	Join       []JoinRequest
	Filter     []interface{}
	Group      []string
	Having     []interface{}
	Order      []OrderRequest
	Limit      int64
	Offset     int64
	Data       map[string]interface{}
	Query      string
	Parameters []interface{}
}

Jump to

Keyboard shortcuts

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