sqlbase

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

README

sqlbase

对gorm得简单封装,比较简单,自娱自乐

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func NewStorage

func NewStorage(engine string, port int, dbName string,
	user string, host string, passWd string) (*Storage, error)

func (*Storage) Close

func (p *Storage) Close()

func (*Storage) Delete

func (p *Storage) Delete(dbType interface{}, params map[string]string) (rowsAffected int64, err error)

func (*Storage) SaveOrCreate

func (p *Storage) SaveOrCreate(params map[string]string, data interface{}) error

func (*Storage) Search

func (p *Storage) Search(dbType interface{}, params map[string]string, needCount bool, preLoads []string, data interface{}) (int, error)

func (*Storage) Update

func (p *Storage) Update(data interface{}) error

Jump to

Keyboard shortcuts

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