utility

package
v2.23.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendIfMissing

func AppendIfMissing(slice []qb.TableField, i qb.TableField) []qb.TableField

AppendIfMissing field to the list of fields

func CommitOrRollback

func CommitOrRollback(tx CommitRollback, err error,
	logger log.Logger) errors.TracerError

CommitOrRollback will rollback on an errors.TracerError otherwise commit

func ObfuscateConnection

func ObfuscateConnection(connection string) string

ObfuscateConnection string so that it can be used in log statements.

func SetMultiStatement

func SetMultiStatement(connectionString string) string

SetMultiStatement on the passed connection so that multiple ';' delimited statements can be sent to the database at a time.

Types

type CommitRollback

type CommitRollback interface {
	// Commit this transaction
	Commit() errors.TracerError
	// Rollback this transaction
	Rollback() errors.TracerError
}

CommitRollback exposes the commit and rollback methods that are a subset of a the transaction methods

Jump to

Keyboard shortcuts

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