utils

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterQueryForSelectBuilder

func FilterQueryForSelectBuilder(sl squirrel.SelectBuilder, filter *base.TupleFilter) squirrel.SelectBuilder

FilterQueryForSelectBuilder -

func FilterQueryForUpdateBuilder

func FilterQueryForUpdateBuilder(sl squirrel.UpdateBuilder, filter *base.TupleFilter) squirrel.UpdateBuilder

FilterQueryForUpdateBuilder -

func GarbageCollectQuery

func GarbageCollectQuery(window time.Duration, tenantID string) squirrel.DeleteBuilder

GarbageCollectQuery -

func NewContinuousToken

func NewContinuousToken(value string) database.ContinuousToken

NewContinuousToken - Creates a new continuous token

func Rollback

func Rollback(tx *sql.Tx, logger logger.Interface)

Rollback - Rollbacks a transaction and logs the error

func SnapshotQuery

func SnapshotQuery(sl squirrel.SelectBuilder, value uint64) squirrel.SelectBuilder

SnapshotQuery adds conditions to a SELECT query for checking transaction visibility based on created and expired transaction IDs. The query checks if transactions are visible in a snapshot associated with the provided value.

Types

type ContinuousToken

type ContinuousToken struct {
	Value string
}

ContinuousToken - Structure for continuous token

func (ContinuousToken) Encode

Encode - Encodes the token to a string

type EncodedContinuousToken

type EncodedContinuousToken struct {
	Value string
}

EncodedContinuousToken - Structure for encoded continuous token

func (EncodedContinuousToken) Decode

Decode decodes the token from a string

func (EncodedContinuousToken) String

func (t EncodedContinuousToken) String() string

Decode decodes the token from a string

Jump to

Keyboard shortcuts

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