postgres

package module
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: BSD-2-Clause Imports: 5 Imported by: 0

README

dbinterface_postgres

Postgres Module for dbinterface

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PgDB added in v1.0.2

type PgDB struct {
	Host     string
	User     string
	Port     string
	Password string
	Database string
	// contains filtered or unexported fields
}

PgDB PgDB

func (*PgDB) BeginTransaction added in v1.0.2

func (m *PgDB) BeginTransaction() di.Transaction

BeginTransaction BeginTransaction

func (*PgDB) Close added in v1.0.2

func (m *PgDB) Close() bool

Close Close

func (*PgDB) Connect added in v1.0.2

func (m *PgDB) Connect() bool

Connect Connect

func (*PgDB) Delete added in v1.0.2

func (m *PgDB) Delete(query string, args ...interface{}) bool

Delete Delete

func (*PgDB) Get added in v1.0.2

func (m *PgDB) Get(query string, args ...interface{}) *di.DbRow

Get Get

func (*PgDB) GetList added in v1.0.2

func (m *PgDB) GetList(query string, args ...interface{}) *di.DbRows

GetList GetList

func (*PgDB) GetNewDatabase added in v1.0.2

func (m *PgDB) GetNewDatabase() di.Database

GetNewDatabase GetNewDatabase

func (*PgDB) Insert added in v1.0.2

func (m *PgDB) Insert(query string, args ...interface{}) (bool, int64)

Insert Insert

func (*PgDB) Test added in v1.0.2

func (m *PgDB) Test(query string, args ...interface{}) *di.DbRow

Test Test

func (*PgDB) Update added in v1.0.2

func (m *PgDB) Update(query string, args ...interface{}) bool

Update Update

type PgDBMock added in v1.0.2

type PgDBMock struct {
	Host     string
	User     string
	Password string
	Database string

	MockConnectSuccess  bool
	MockCloseSuccess    bool
	MockCommitSuccess   bool
	MockRollbackSuccess bool

	MockInsertSuccess1 bool
	MockInsertSuccess2 bool
	MockInsertSuccess3 bool
	MockInsertSuccess4 bool
	MockInsertSuccess5 bool
	MockInsertSuccess6 bool
	MockInsertSuccess7 bool
	MockInsertSuccess8 bool

	MockInsertID1 int64
	MockInsertID2 int64
	MockInsertID3 int64
	MockInsertID4 int64
	MockInsertID5 int64
	MockInsertID6 int64
	MockInsertID7 int64
	MockInsertID8 int64

	MockUpdateSuccess1 bool
	MockUpdateSuccess2 bool
	MockUpdateSuccess3 bool
	MockUpdateSuccess4 bool

	MockDeleteSuccess1 bool
	MockDeleteSuccess2 bool
	MockDeleteSuccess3 bool
	MockDeleteSuccess4 bool
	MockDeleteSuccess5 bool
	MockDeleteSuccess6 bool
	MockDeleteSuccess7 bool
	MockDeleteSuccess8 bool

	MockTestRow *di.DbRow

	MockRow1 *di.DbRow
	MockRow2 *di.DbRow
	MockRow3 *di.DbRow
	MockRow4 *di.DbRow
	MockRow5 *di.DbRow
	MockRow6 *di.DbRow
	MockRow7 *di.DbRow
	MockRow8 *di.DbRow

	MockRows1 *di.DbRows
	MockRows2 *di.DbRows
	MockRows3 *di.DbRows
	MockRows4 *di.DbRows
	MockRows5 *di.DbRows
	MockRows6 *di.DbRows
	MockRows7 *di.DbRows
	MockRows8 *di.DbRows
	// contains filtered or unexported fields
}

PgDBMock PgDBMock

func (*PgDBMock) BeginTransaction added in v1.0.2

func (m *PgDBMock) BeginTransaction() di.Transaction

BeginTransaction BeginTransaction

func (*PgDBMock) Close added in v1.0.2

func (m *PgDBMock) Close() bool

Close Close

func (*PgDBMock) Connect added in v1.0.2

func (m *PgDBMock) Connect() bool

Connect Connect

func (*PgDBMock) Delete added in v1.0.2

func (m *PgDBMock) Delete(query string, args ...interface{}) bool

Delete Delete

func (*PgDBMock) Get added in v1.0.2

func (m *PgDBMock) Get(query string, args ...interface{}) *di.DbRow

Get Get

func (*PgDBMock) GetList added in v1.0.2

func (m *PgDBMock) GetList(query string, args ...interface{}) *di.DbRows

GetList GetList

func (*PgDBMock) GetNewDatabase added in v1.0.2

func (m *PgDBMock) GetNewDatabase() di.Database

GetNewDatabase GetNewDatabase

func (*PgDBMock) Insert added in v1.0.2

func (m *PgDBMock) Insert(query string, args ...interface{}) (bool, int64)

Insert Insert

func (*PgDBMock) Test added in v1.0.2

func (m *PgDBMock) Test(query string, args ...interface{}) *di.DbRow

Test Test

func (*PgDBMock) Update added in v1.0.2

func (m *PgDBMock) Update(query string, args ...interface{}) bool

Update Update

type PgDbTx added in v1.0.2

type PgDbTx struct {
	Tx *sql.Tx
}

PgDbTx PgDbTx

func (*PgDbTx) Commit added in v1.0.2

func (t *PgDbTx) Commit() bool

Commit Commit

func (*PgDbTx) Delete added in v1.0.2

func (t *PgDbTx) Delete(query string, args ...interface{}) bool

Delete Delete

func (*PgDbTx) Insert added in v1.0.2

func (t *PgDbTx) Insert(query string, args ...interface{}) (bool, int64)

Insert Insert

func (*PgDbTx) Rollback added in v1.0.2

func (t *PgDbTx) Rollback() bool

Rollback Rollback

func (*PgDbTx) Update added in v1.0.2

func (t *PgDbTx) Update(query string, args ...interface{}) bool

Update Update

type PgDbTxMock added in v1.0.2

type PgDbTxMock struct {
	Tx       *sql.Tx
	PgDBMock *PgDBMock
}

PgDbTxMock PgDbTxMock

func (*PgDbTxMock) Commit added in v1.0.2

func (t *PgDbTxMock) Commit() bool

Commit Commit

func (*PgDbTxMock) Delete added in v1.0.2

func (t *PgDbTxMock) Delete(query string, args ...interface{}) bool

Delete Delete

func (*PgDbTxMock) Insert added in v1.0.2

func (t *PgDbTxMock) Insert(query string, args ...interface{}) (bool, int64)

Insert Insert

func (*PgDbTxMock) Rollback added in v1.0.2

func (t *PgDbTxMock) Rollback() bool

Rollback Rollback

func (*PgDbTxMock) Update added in v1.0.2

func (t *PgDbTxMock) Update(query string, args ...interface{}) bool

Update Update

Jump to

Keyboard shortcuts

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