pg

package
v0.0.0-...-a1db402 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	DB *sqlx.DB
}

Store holds the DB connection.

func NewStore

func NewStore(dsn string) (*Store, error)

NewStore connects to DB for to use store

func (*Store) Close

func (s *Store) Close() error

Close closes the connection

func (*Store) CreateSchema

func (s *Store) CreateSchema(sourcePath string) error

CreateSchema creates the Database Schema in the desired DB.

func (*Store) DropSchema

func (s *Store) DropSchema(sourcePath string) error

DropSchema drops the Database schema.

func (*Store) InsertWebsiteResult

func (s *Store) InsertWebsiteResult(ctx context.Context, wp domain.WebsiteParams, wr domain.WebsiteResult) error

InsertWebsiteResult inserts the website and website_results in the respective tables.

Jump to

Keyboard shortcuts

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