pg

package
v0.0.0-...-dd30ea9 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2022 License: MIT Imports: 6 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 {
	DbMap *gorp.DbMap
	// contains filtered or unexported fields
}

func New

func New(dbMap *gorp.DbMap) *Db

func (*Db) Begin

func (r *Db) Begin() (interface{}, error)

func (*Db) Close

func (r *Db) Close()

func (*Db) Commit

func (r *Db) Commit(tran interface{}) error

func (*Db) CountRows

func (r *Db) CountRows(tx interface{}, tableName string) (rowCount int64, err error)

Cuenta todos los registros fisicamente de una tabla

func (*Db) CurrentSession

func (r *Db) CurrentSession() *domain.Session

func (*Db) Executor

func (r *Db) Executor(tran interface{}) gorp.SqlExecutor

func (*Db) GetTransaction

func (r *Db) GetTransaction(tx interface{}) gorp.SqlExecutor

func (*Db) Register

func (r *Db) Register()

func (*Db) Rollback

func (r *Db) Rollback(tran interface{}) error

func (*Db) SequenceExists

func (r *Db) SequenceExists(tx interface{}, sequenceName string) bool

func (*Db) SequenceLastValue

func (r *Db) SequenceLastValue(tx interface{}, sequenceName string) (curr int64, err error)

Devuelve el actual valor, en caso que no tenga ninguno devuelve cero

func (*Db) SequenceNextValue

func (r *Db) SequenceNextValue(tx interface{}, sequenceName string) (next int64, err error)

func (*Db) SequenceRemove

func (r *Db) SequenceRemove(tx interface{}, seqName string) (err error)

func (*Db) SetCurrentSession

func (r *Db) SetCurrentSession(session *domain.Session)

func (*Db) SqlTraceOff

func (r *Db) SqlTraceOff()

func (*Db) SqlTraceOn

func (r *Db) SqlTraceOn()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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