postgresql

package
v0.0.0-...-13e599b Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	DSN string

	Now func() time.Time
	// contains filtered or unexported fields
}

func NewDB

func NewDB(dsn string) *DB

func (*DB) BeginTX

func (db *DB) BeginTX(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) DB

func (db *DB) DB() *sql.DB

func (*DB) Open

func (db *DB) Open() (err error)

type PostgreSqlStoreService

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

PostgreSqlStoreService

func NewPostgresqlStore

func NewPostgresqlStore(db *DB, cache service.Cache) *PostgreSqlStoreService

func (*PostgreSqlStoreService) AddFriendship

func (s *PostgreSqlStoreService) AddFriendship(ctx context.Context, friendship internal.Friendship) error

AddFriendship

func (*PostgreSqlStoreService) AddPerson

func (s *PostgreSqlStoreService) AddPerson(ctx context.Context, person *internal.Person) error

AddPerson

func (*PostgreSqlStoreService) RemovePerson

func (s *PostgreSqlStoreService) RemovePerson(ctx context.Context, id int64) error

RemovePerson

type Tx

type Tx struct {
	*sql.Tx
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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