database

package
v0.0.0-...-cd8b1d2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDB

type IDB interface {
	Ping() error
	Close() error
	PrepareContext(ctx context.Context, query string) (IStmt, error)
}

IDB ...

func NewSQLlib

func NewSQLlib(driverName, connectionString string) (IDB, error)

NewSQLlib ....

type IResult

type IResult interface {
	LastInsertId() (int64, error)
	RowsAffected() (int64, error)
}

IResult ...

type IRow

type IRow interface {
	Scan(dest ...interface{}) error
}

IRow ...

type IRows

type IRows interface {
	Next() bool
	Close() error
	IRow
}

IRows ...

type IStmt

type IStmt interface {
	ExecContext(ctx context.Context, args ...interface{}) (IResult, error)
	QueryRowContext(ctx context.Context, args ...interface{}) IRow
	QueryContext(ctx context.Context, args ...interface{}) (IRows, error)
}

IStmt ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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