db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(user, passwd, host, dbName string, port int) error

func Query

func Query(sql string, args ...interface{}) (record.ActiveRecordList,
	error)

func QueryFirst

func QueryFirst(sql string, args ...interface{}) (*record.ActiveRecord,
	error)

func Update

func Update(sql string, args ...interface{}) (int64, error)

Types

type DB

type DB interface {
	Query(sql string, args ...interface{}) (record.ActiveRecordList, error)
	QueryFirst(sql string, args ...interface{}) (*record.ActiveRecord, error)
	Update(sql string, args ...interface{}) (int64, error)
}

DB interface is portal to use active-record

func GetDB

func GetDB() (DB, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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