sqlh

package module
v0.0.0-...-5f4419f Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

README

sqlh

A Go simple sql helper

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GlobalDateFormat = "2006-01-02 15:04:05"
)

Functions

func Connect

func Connect(driver, connection string) (*sql.DB, error)

Types

type ExecTypeEnum

type ExecTypeEnum int
const (
	ExecQuery ExecTypeEnum = 0
	//ExecQuerySingle              = 1
	ExecNonScalar = 2
)

type QueryResult

type QueryResult struct {
	DateFormat string
	// contains filtered or unexported fields
}

func Exec

func Exec(db *sql.DB, execType ExecTypeEnum, sql string, args ...interface{}) *QueryResult

func (*QueryResult) CUDAResult

func (q *QueryResult) CUDAResult() sql.Result

func (*QueryResult) Close

func (q *QueryResult) Close()

func (*QueryResult) Error

func (q *QueryResult) Error() error

func (*QueryResult) Fetch

func (q *QueryResult) Fetch(objs interface{}, n int) error

Jump to

Keyboard shortcuts

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