meteringDB

package
v0.0.0-...-cee649a Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBInfo

type DBInfo struct {
	TheDB     *sqlx.DB
	TableName string
}

type MeteringDB

type MeteringDB interface {
	MeteringReadOnlyDB

	Insert(ms metering.Statement) (mid int, err error)
}

type MeteringPg

type MeteringPg struct {
	DBInfo
}

func NewMeteringPg

func NewMeteringPg(sqlxdb *sqlx.DB, tn string) MeteringPg

func (MeteringPg) Close

func (mpg MeteringPg) Close()

func (MeteringPg) Insert

func (mpg MeteringPg) Insert(ms metering.Statement) (mid int, err error)

func (MeteringPg) Query

func (mpg MeteringPg) Query(projectID int, mType int, typeInfo string) (ms metering.Statement, err error)

func (MeteringPg) QueryAll

func (mpg MeteringPg) QueryAll(projectID int, mType int) (mss []metering.Statement, err error)

type MeteringReadOnlyDB

type MeteringReadOnlyDB interface {
	Query(projectID int, mType int, typeInfo string) (ms metering.Statement, err error)
	QueryAll(projectID int, mType int) (mss []metering.Statement, err error)
	Close()
}

Jump to

Keyboard shortcuts

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