samehada_util

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const SIGN_MASK_BIG uint32 = 0x80000000
View Source
const SIGN_MASK_SMALL byte = 0x80

Variables

This section is empty.

Functions

func ChoiceKeyFromMap added in v0.0.4

func ChoiceKeyFromMap[T int32 | float32 | string, V int32 | float32 | string | bool | uint32](m map[T]V) T

func EncodeValueAndRIDToDicOrderComparableVarchar added in v0.0.4

func EncodeValueAndRIDToDicOrderComparableVarchar(orgVal *types.Value, rid *page.RID) *types.Value

func ExtractOrgKeyFromDicOrderComparableEncodedVarchar added in v0.0.4

func ExtractOrgKeyFromDicOrderComparableEncodedVarchar(encodedVal *types.Value, valType types.TypeID) *types.Value

func FileExists

func FileExists(filename string) bool

func GetPonterOfValue

func GetPonterOfValue(value types.Value) *types.Value

func GetRandomPrimitiveVal

func GetRandomPrimitiveVal[T int32 | float32 | string](keyType types.TypeID, maxVal interface{}) T

maxVal is *int32 when get int32 and float32

func GetRandomStr

func GetRandomStr(maxLength int32) *string

min length is 1

func GetValueForSkipListEntry

func GetValueForSkipListEntry(val interface{}) uint64

func IsContainList

func IsContainList[T comparable](list interface{}, searchItem interface{}) bool

func IsFlagUp added in v0.0.4

func IsFlagUp(val uint32) bool

func PackRIDtoUint32

func PackRIDtoUint32(value *page.RID) uint32

func PackRIDtoUint64

func PackRIDtoUint64(value *page.RID) uint64

func RemovePrimitiveFromList

func RemovePrimitiveFromList[T int32 | float32 | string](list []T, elem T) []T

func SetFlag added in v0.0.4

func SetFlag(val uint32) uint32

func StrideAdd

func StrideAdd(base interface{}, k interface{}) interface{}

func StrideMul

func StrideMul(base interface{}, k interface{}) interface{}

func TimeoutPanic

func TimeoutPanic()

func UnpackUint32toRID

func UnpackUint32toRID(value uint32) page.RID

func UnpackUint64toRID

func UnpackUint64toRID(value uint64) page.RID

func UnsetFlag added in v0.0.4

func UnsetFlag(val uint32) uint32

Types

This section is empty.

Jump to

Keyboard shortcuts

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