db

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2020 License: MIT Imports: 12 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBHandle

type DBHandle struct {
	*gorm.DB
	// contains filtered or unexported fields
}

func GetConfiguredDatabase

func GetConfiguredDatabase(c *config.Configurator) (*DBHandle, error)

func (*DBHandle) DateFromUsecTimestamp

func (h *DBHandle) DateFromUsecTimestamp(fieldName string) string

func (*DBHandle) Transaction

func (dbh *DBHandle) Transaction(txn txRunner) error

func (*DBHandle) TransactionWithOptions

func (dbh *DBHandle) TransactionWithOptions(opts Options, txn txRunner) error

type Options

type Options interface {
	ReadOnly() bool
	AllowStaleReads() bool
}

func ReadWriteOptions

func ReadWriteOptions() Options

func StaleReadOptions

func StaleReadOptions() Options

Jump to

Keyboard shortcuts

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