dbinterface

package module
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: MIT Imports: 0 Imported by: 10

README

Go Report Card

Database Interface MySQL module

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	Connect() bool
	BeginTransaction() Transaction
	Test(query string, args ...interface{}) *DbRow
	Insert(query string, args ...interface{}) (bool, int64)
	Update(query string, args ...interface{}) bool
	Get(query string, args ...interface{}) *DbRow
	GetList(query string, args ...interface{}) *DbRows
	Delete(query string, args ...interface{}) bool
	Close() bool
}

Database Database

type DbRow

type DbRow struct {
	Columns []string
	Row     []string
}

DbRow database row

type DbRows

type DbRows struct {
	Columns []string
	Rows    [][]string
}

DbRows array of database rows

type Transaction added in v1.0.4

type Transaction interface {
	Insert(query string, args ...interface{}) (bool, int64)
	Update(query string, args ...interface{}) bool
	Delete(query string, args ...interface{}) bool
	Commit() bool
	Rollback() bool
}

Transaction transaction

Jump to

Keyboard shortcuts

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