D

package
v1.4701.2038 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 16 Imported by: 0

README

Glossary

List of all databases wrapper, will break as needed, so use with caution

  • As = Aerospike (inmem, row-based)
  • Ca = Cassandra (columnar)
  • Ch = Clickhouse (columnar)
  • Co = Cockroachdb (row-based)
  • Dg = DragonflyDB (inmem, key-value)
  • Es = ElasticSearch (search-engine)
  • In = Influxdb (time-series)
  • Ma = MariaDB (row-based)
  • Mi = Minio (blob-storage)
  • Mo = MongoDB (document-based)
  • Ms = MeiliSearch (search-engine)
  • My = MySQL (row-based)
  • Pg = PostgreSQL (row-based)
  • Ql = QLDB (ledger)
  • Ra = RabbitMQ (queue)
  • Rd = Redis (key-value)
  • Rp = RedPanda (message-queue)
  • Rq = Rqlite (row-based)
  • Sc = ScyllaDB (columnar)
  • Su = SurrealDB (row-based)
  • Ts = Typesense (search-engine)
  • Tt = Tarantool (key-value, row-based)

Documentation

Index

Constants

View Source
const AEROSP = `As`
View Source
const ARANGO = `Ar`
View Source
const DUMMY = `Du`
View Source
const POSTGRE = `Pg`
View Source
const REDIS = `Rd`
View Source
const SCYLLA = `Sc`

Variables

View Source
var DEBUG bool
View Source
var Z func(string) string
View Source
var ZI func(int64) string
View Source
var ZJ func(string) string
View Source
var ZLIKE func(string) string
View Source
var ZS func(string) string
View Source
var ZZ func(string) string

Functions

func WhereIn

func WhereIn(vals []string) string

func WhereInIds

func WhereInIds(ids []int64) string

func WhereInStrIds

func WhereInStrIds(ids []string) string

Types

type DockerTest

type DockerTest struct {
	Pool      *dockertest.Pool
	Network   *docker.Network
	Uniq      string
	Resources []*dockertest.Resource
}

func InitDockerTest

func InitDockerTest(endpoint string) *DockerTest

func (*DockerTest) Cleanup

func (d *DockerTest) Cleanup()

func (*DockerTest) HostPort

func (d *DockerTest) HostPort(port string) string

func (*DockerTest) Spawn

func (d *DockerTest) Spawn(options *dockertest.RunOptions, checkFunc func(res *dockertest.Resource) error)

type DummyRecord

type DummyRecord struct {
	Value     any
	ExpiredAt int64
}

type DummySession

type DummySession struct {
	Pool *cmap.CMap
}

in memory data session (used when no database installed), gone when program exit

func NewDummy

func NewDummy() *DummySession

func (DummySession) Del

func (sess DummySession) Del(key string)

func (DummySession) Expiry

func (sess DummySession) Expiry(key string) int64

func (DummySession) FadeInt

func (sess DummySession) FadeInt(key string, val int64, sec int64)

func (DummySession) FadeMSX

func (sess DummySession) FadeMSX(key string, val M.SX, sec int64)

func (DummySession) FadeStr

func (sess DummySession) FadeStr(key, val string, sec int64)

func (DummySession) FadeVal

func (sess DummySession) FadeVal(key string, val any, sec int64)

func (DummySession) GetInt

func (sess DummySession) GetInt(key string) int64

func (DummySession) GetMSX

func (sess DummySession) GetMSX(key string) M.SX

func (DummySession) GetStr

func (sess DummySession) GetStr(key string) string

func (DummySession) GetVal

func (sess DummySession) GetVal(key string) any

func (DummySession) Inc

func (sess DummySession) Inc(key string) int64

func (*DummySession) Product

func (sess *DummySession) Product() string

func (DummySession) SetInt

func (sess DummySession) SetInt(key string, val int64)

func (DummySession) SetMSX

func (sess DummySession) SetMSX(key string, val M.SX)

func (DummySession) SetStr

func (sess DummySession) SetStr(key, val string)

type RamCache

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

func NewRamCache

func NewRamCache(dur time.Duration, sizeMB int) *RamCache

func (*RamCache) ClearAll

func (r *RamCache) ClearAll()

func (*RamCache) Delete

func (r *RamCache) Delete(k string)

func (*RamCache) Get

func (r *RamCache) Get(key string) any

func (*RamCache) Set

func (r *RamCache) Set(key string, value any)

type Record

type Record interface {
	GetStr(string) string
	GetFloat(string) float64
	GetInt(string) int64
	GetArr(string) []any
	GetBool(string) bool
}

Directories

Path Synopsis
Pg
Tt

Jump to

Keyboard shortcuts

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