postgres

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateTable

func CreateTable(db *sql.DB, tableName string) error

CreateTable creates the table that will persist the peers

func Migrations added in v0.8.0

func Migrations(db *sql.DB) error

Migrations is the function used for DB migration with postgres driver

func NewDB

func NewDB(dburl string, logger *zap.Logger) (*sql.DB, error)

NewDB connects to postgres DB in the specified path

func NewMockPgDB added in v0.9.0

func NewMockPgDB() *sql.DB

func NewQueries

func NewQueries(tbl string, db *sql.DB) (*persistence.Queries, error)

NewQueries creates a new SQL set of queries for the passed table

func ResetDefaultTestPostgresDB added in v0.9.0

func ResetDefaultTestPostgresDB(dropDBUrl string) error

Types

This section is empty.

Directories

Path Synopsis
sql

Jump to

Keyboard shortcuts

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