postgres

package
v0.0.0-...-09ecf48 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Link struct{}

Link is used to insert and update in mysql

func (*Link) Create

func (link *Link) Create(
	ctx context.Context,
	tx *sqlx.Tx,
	actionID int,
	statusID int,
) (int64, error)

Create will insert a new entity in the DB along with the status

func (*Link) MigrateDown

func (link *Link) MigrateDown(ctx context.Context, exec sqlx.ExecerContext) (errExec error)

MigrateDown destroys the needed tables

func (*Link) MigrateUp

func (link *Link) MigrateUp(ctx context.Context, exec sqlx.ExecerContext) (errExec error)

MigrateUp creates the needed tables

func (*Link) SaveStatus

func (link *Link) SaveStatus(
	ctx context.Context,
	exec *sqlx.Tx,
	entityID int64,
	actionID int,
	statusID int,
) error

SaveStatus will save the status in database for the selected entity

func (*Link) SelectEntityone

func (link *Link) SelectEntityone(
	ctx context.Context,
	q *sqlx.DB,
	entityIDs []int64,
	isStatusIDs []int,
	notStatusIDs []int,
	neverStatusIDs []int,
	hasStatusIDs []int,
	limit int,
) (*sqlx.Rows, error)

SelectEntityone returns sqlx.Rows

Jump to

Keyboard shortcuts

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