db

package
v0.0.0-...-984e724 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBPostgres

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

func NewDBPostgres

func NewDBPostgres(connString string) *DBPostgres

func (*DBPostgres) Begin

func (db *DBPostgres) Begin() (Tx, error)

func (*DBPostgres) Dependencies

func (db *DBPostgres) Dependencies() []service.Service

func (*DBPostgres) ExecContext

func (db *DBPostgres) ExecContext(ctx context.Context, query string, args ...interface{}) (Result, error)

func (*DBPostgres) Name

func (db *DBPostgres) Name() string

func (*DBPostgres) QueryContext

func (db *DBPostgres) QueryContext(ctx context.Context, query string, args ...interface{}) (Rows, error)

func (*DBPostgres) QueryRowContext

func (db *DBPostgres) QueryRowContext(ctx context.Context, query string, args ...interface{}) Row

func (*DBPostgres) Start

func (db *DBPostgres) Start() error

func (*DBPostgres) Stop

func (db *DBPostgres) Stop() error

type Result

type Result interface {
	sql.Result
}

type Row

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

type Rows

type Rows interface {
	Row
	Close() error
	Err() error
	Next() bool
}

type Service

type Service interface {
	service.Service

	Begin() (Tx, error)
	// contains filtered or unexported methods
}

type Tx

type Tx interface {
	Commit() error
	Rollback() error
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

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