Popularity
1.4
Declining
Activity
0.0
Stable
13
3
2
Programming language: Go
License: MIT License
Tags:
Database
mpath alternatives and similar packages
Based on the "Database" category.
Alternatively, view mpath alternatives based on common mentions on social networks and blogs.
-
Milvus
Milvus is a high-performance, cloud-native vector database built for scalable vector ANN search -
cockroach
CockroachDB — the cloud native, distributed SQL database designed for high availability, effortless scale, and control over data placement. -
tidb
TiDB - the open-source, cloud-native, distributed SQL database designed for modern applications. -
TinyGo
Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM. -
groupcache
groupcache is a caching and cache-filling library, intended as a replacement for memcached in many cases. -
bytebase
World's most advanced database DevSecOps solution for Developer, Security, DBA and Platform Engineering teams. The GitHub/GitLab for database DevSecOps. -
go-cache
An in-memory key:value store/cache (similar to Memcached) library for Go, suitable for single-machine applications. -
immudb
immudb - immutable database based on zero trust, SQL/Key-Value/Document model, tamperproof, data change history -
buntdb
BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support -
pREST
PostgreSQL ➕ REST, low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new -
xo
Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server -
nutsdb
A simple, fast, embeddable, persistent key/value store written in pure Go. It supports fully serializable transactions and many data structures such as list, set, sorted set. -
lotusdb
Most advanced key-value database written in Go, extremely fast, compatible with LSM tree and B+ tree. -
gocraft/dbr (database records)
Additions to Go's database/sql for super fast performance and convenience.
CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
Promo
coderabbit.ai

Do you think we are missing an alternative of mpath or a related project?
README
mpath-go
Golang realisation of MPTT (or modified preorder tree traversal) in materialized path way.
About
It provides interfaces which yor database object should implement.
Your database object should store:
path
property as slice of uint64 IDs of materialized path to this object in traversal tree;position
property as integer for determine the order of leafs in tree
Usage
Implementation example and tests are in test file.
package main
import (
"fmt"
"github.com/spacetab-io/mpath"
)
type TestItems []*TestItem
type TestItem struct {
ID uint64
Path []uint64
Position int
Siblings TestItems
Name string
}
// Leaf interface implementation for TestItem
// ...
// Leafs interface implementation for TestItems
// ...
func main() {
flatItemsSlice := getTestItems()
var parent = TestItem{}
if err := mpath.InitTree(&parent, flatItemsSlice); err != nil {
panic("error tree init")
}
fmt.Print(parent)
}
func getTestItems() *TestItems {
return &TestItems{
{ID: 1, Position: 0, Name: "item 1", Path: []uint64{1}},
{ID: 2, Position: 0, Name: "item 2", Path: []uint64{1, 2}},
{ID: 3, Position: 1, Name: "item 3", Path: []uint64{1, 3}},
{ID: 4, Position: 0, Name: "item 4", Path: []uint64{1, 2, 4}},
{ID: 5, Position: 1, Name: "item 5", Path: []uint64{1, 2, 5}},
{ID: 6, Position: 0, Name: "item 6", Path: []uint64{1, 3, 6}},
}
}
Tests
go test ./... -v -race