pgsql

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2020 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 Database

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

func NewDatabase

func NewDatabase() *Database

NewDatabase creates and initializes a new Database

func (*Database) Close

func (d *Database) Close() error

Close closes connections to the database

func (*Database) GetCounterVal

func (d *Database) GetCounterVal(counterId int) (int, error)

GetCounterVal gets the value of a counter with ID counterId

func (*Database) IncrementCounter

func (d *Database) IncrementCounter(counterId int) error

IncrementCounter increments the value in the counter table

func (*Database) Init

func (d *Database) Init()

Init connects to a PostgreSQL instance and creates the tables this service relies on if they don't already exist

Jump to

Keyboard shortcuts

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