service

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2019 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBCHTable

func CheckBCHTable(engine *xorm.Engine) error

func CheckBSVTable

func CheckBSVTable(engine *xorm.Engine) error

func CheckBTCTable

func CheckBTCTable(engine *xorm.Engine) error

func CheckDOGETable

func CheckDOGETable(engine *xorm.Engine) error

func CheckEOSTable

func CheckEOSTable(engine *xorm.Engine) error

func CheckETCTable

func CheckETCTable(engine *xorm.Engine) error

func CheckETHTable

func CheckETHTable(engine *xorm.Engine) error

func CheckLTCTable

func CheckLTCTable(engine *xorm.Engine) error

func CheckTRONTable

func CheckTRONTable(engine *xorm.Engine) error

func CheckXLMTable

func CheckXLMTable(engine *xorm.Engine) error

func CheckXRPTable

func CheckXRPTable(engine *xorm.Engine) error

func GetTable

func GetTable(tableName string) interface{}

func GetTableInfo

func GetTableInfo(engine *xorm.Engine, tableName string) *xorm.Table

func InitDB

func InitDB(cfg *DatabaseConfig) error

func NewEngine

func NewEngine(cfg *DatabaseConfig) (*xorm.Engine, error)

Types

type BatchRange

type BatchRange struct {
	Start int
	End   int
}

type Database

type Database struct {
	*xorm.Engine
}

func NewDatabase

func NewDatabase(e ...*xorm.Engine) *Database

func (*Database) BatchInsert

func (d *Database) BatchInsert(data interface{}) (int64, error)

type DatabaseConfig

type DatabaseConfig struct {
	Type         string
	Host         string
	Port         string
	Database     string
	User         string
	Password     string
	MaxOpenConns int
	MaxIdleConns int
	SQLLogFile   string
	Debug        bool
}

func (*DatabaseConfig) Valid

func (c *DatabaseConfig) Valid() bool

type Transaction

type Transaction struct {
	*xorm.Session
	// contains filtered or unexported fields
}

func NewTransaction

func NewTransaction(e ...*xorm.Engine) *Transaction

func (*Transaction) BatchInsert

func (t *Transaction) BatchInsert(data interface{}) (int64, error)

func (*Transaction) Execute

func (t *Transaction) Execute(sqlStr string, args ...interface{}) (int64, error)

Directories

Path Synopsis
model
bch
bsv
btc
eos
etc
eth
ltc
xlm
xrp

Jump to

Keyboard shortcuts

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