utils

package
v0.6.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	BulkEntityFilterTemplate = `` /* 503-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func AttributesFilterQueryForSelectBuilder added in v0.5.0

func AttributesFilterQueryForSelectBuilder(sl squirrel.SelectBuilder, filter *base.AttributeFilter) squirrel.SelectBuilder

AttributesFilterQueryForSelectBuilder -

func AttributesFilterQueryForUpdateBuilder added in v0.5.0

func AttributesFilterQueryForUpdateBuilder(sl squirrel.UpdateBuilder, filter *base.AttributeFilter) squirrel.UpdateBuilder

AttributesFilterQueryForUpdateBuilder -

func BulkEntityFilterQuery added in v0.5.0

func BulkEntityFilterQuery(tenantID, entityType string, snap uint64) string

BulkEntityFilterQuery -

func GenerateGCQuery added in v0.5.0

func GenerateGCQuery(table string, value uint64) squirrel.DeleteBuilder

GenerateGCQuery generates a Squirrel DELETE query builder for garbage collection. It constructs a query to delete expired records from the specified table based on the provided value, which represents a transaction ID.

func HandleError added in v0.6.2

func HandleError(span trace.Span, err error, errorCode base.ErrorCode) error

HandleError records an error in the given span, logs the error, and returns a standardized error. This function is used for consistent error handling across different parts of the application.

func NewContinuousToken

func NewContinuousToken(value string) database.ContinuousToken

NewContinuousToken - Creates a new continuous token

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.

func TuplesFilterQueryForSelectBuilder added in v0.5.0

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

TuplesFilterQueryForSelectBuilder -

func TuplesFilterQueryForUpdateBuilder added in v0.5.0

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

TuplesFilterQueryForUpdateBuilder -

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