MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / AddTable

Method AddTable

internal/utils/kvstore/db.go:34–42  ·  view source on GitHub ↗
(table TableInterface)

Source from the content-addressed store, hash-verified

32}
33
34func (this *DB) AddTable(table TableInterface) {
35 table.SetNamespace([]byte(this.Namespace() + table.Name() + "$"))
36 table.SetDB(this)
37
38 this.mu.Lock()
39 defer this.mu.Unlock()
40
41 this.tableMap[table.Name()] = table
42}
43
44func (this *DB) Name() string {
45 return this.name

Callers 15

TestTable_SetFunction · 0.95
TestTable_GetFunction · 0.95
TestTable_ExistFunction · 0.95
TestTable_DeleteFunction · 0.95
TestTable_Delete_EmptyFunction · 0.95
BenchmarkTable_SetFunction · 0.95
BenchmarkTable_GetFunction · 0.95
testOpenStoreTableFunction · 0.95
BenchmarkQuery_FindAllFunction · 0.95

Calls 6

NamespaceMethod · 0.95
SetNamespaceMethod · 0.65
NameMethod · 0.65
SetDBMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by 13

TestTable_SetFunction · 0.76
TestTable_GetFunction · 0.76
TestTable_ExistFunction · 0.76
TestTable_DeleteFunction · 0.76
TestTable_Delete_EmptyFunction · 0.76
BenchmarkTable_SetFunction · 0.76
BenchmarkTable_GetFunction · 0.76
testOpenStoreTableFunction · 0.76
BenchmarkQuery_FindAllFunction · 0.76