Source File
types.go
Belonging Package
github.com/freeeve/gochickpeas
// Package chickpeas is a high-performance in-memory graph database: the Go// implementation of RustyChickpeas. Graphs are built with a Builder,// finalized into an immutable read-optimized Snapshot (CSR adjacency,// columnar properties, lazy indexes), and exchanged as RCPG files (package// rcpg) byte-compatibly with the Rust implementation.package chickpeas// NodeID identifies a node. u32 bounds the graph at ~4.3B nodes and keeps// roaring bitmaps and CSR arrays compact.type NodeID = uint32// PropertyKey is an interned property-key atom.type PropertyKey = uint32// Direction selects which adjacency a traversal follows.type Direction uint8const (// Outgoing follows rels from source to destination.Outgoing Direction = iota// Incoming follows rels from destination to source.Incoming// Both follows rels in either direction.Both)// Reverse flips Outgoing and Incoming; Both is its own reverse.func ( Direction) () Direction {switch {case Outgoing:return Incomingcase Incoming:return Outgoing}return Both}// String implements fmt.Stringer.func ( Direction) () string {switch {case Outgoing:return "outgoing"case Incoming:return "incoming"case Both:return "both"}return "invalid"}// Label is an interned node-label atom. Resolve text via the snapshot.type Label uint32// ID is the raw atom id.func ( Label) () uint32 { return uint32() }// RelType is an interned relationship-type atom. Resolve text via the// snapshot.type RelType uint32// ID is the raw atom id.func ( RelType) () uint32 { return uint32() }
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |