db_utils

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 7 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRecord added in v1.0.1

func GetRecord(svc CommonSvc, queryId string, keyId string) (utils.Map, error)

Get or Find Record depends on the QueryId

func GetUniqueKeyId added in v1.0.1

func GetUniqueKeyId(svc CommonSvc, key string, value string) string

func IsFindValueExist added in v1.0.1

func IsFindValueExist(svc CommonSvc, key string, value string, shouldExist bool) (utils.Map, error)

func IsGetValueExist added in v1.0.1

func IsGetValueExist(svc CommonSvc, value string, shouldExist bool) (utils.Map, error)

Types

type CommonSvc added in v1.0.1

type CommonSvc interface {
	// Get - Find By Code
	Get(keyId string) (utils.Map, error)
	// Find - Find by filter
	Find(filter string) (utils.Map, error)
}

type DatabaseService

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

func (*DatabaseService) BeginTransaction

func (p *DatabaseService) BeginTransaction()

Begin Transaction

func (*DatabaseService) CloseDatabaseService

func (p *DatabaseService) CloseDatabaseService()

CloseDatabaseService

func (*DatabaseService) CommitTransaction

func (p *DatabaseService) CommitTransaction()

Commit Transaction

func (*DatabaseService) GetClient

func (p *DatabaseService) GetClient() utils.Map

GetClient

func (*DatabaseService) OpenDatabaseService

func (p *DatabaseService) OpenDatabaseService(props utils.Map) error

OpenDatabaseService

func (*DatabaseService) RollbackTransaction

func (p *DatabaseService) RollbackTransaction()

Rollback Transaction

Jump to

Keyboard shortcuts

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