postgresql

package
v0.0.0-...-4df7676 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repository

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

Repository that access to a PostgreSQL database

func New

func New(dbURL string) *Repository

New postgresql repository

func (*Repository) Count

func (r *Repository) Count(value string) int

Count the number of phones that have the given phone number

func (*Repository) Delete

func (r *Repository) Delete(id int)

Delete a phone in the db by its id

func (*Repository) GetAll

func (r *Repository) GetAll() []*phone.Phone

GetAll phones from PostgreSQL database

func (*Repository) Update

func (r *Repository) Update(p *phone.Phone)

Update a phone in the db

Jump to

Keyboard shortcuts

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