realcluster

package
v0.0.0-...-5d62787 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractPhysical

func ExtractPhysical(ts uint64) int64

ExtractPhysical returns a ts's physical part.

func GetTimeFromTS

func GetTimeFromTS(ts uint64) time.Time

GetTimeFromTS extracts time.Time from a timestamp.

Types

type TestDB

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

TestDB is a test database

func OpenTestDB

func OpenTestDB(t *testing.T, configModifier ...func(*mysqldriver.Config, *gorm.Config)) *TestDB

OpenTestDB opens a test database

func (*TestDB) Gorm

func (db *TestDB) Gorm() *gorm.DB

Gorm returns the underlying gorm.DB

func (*TestDB) MustClose

func (db *TestDB) MustClose()

MustClose closes the test database

func (*TestDB) MustExec

func (db *TestDB) MustExec(sql string, values ...any)

MustExec executes a query

Jump to

Keyboard shortcuts

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