package planimport ()// eqFold is a case-insensitive name compare (function/procedure names).func eqFold(, string) bool { returnstrings.EqualFold(, ) }// lower is ASCII lowercasing for name dispatch.func lower( string) string { returnstrings.ToLower() }// sortSlice sorts s by less (a stable order is not required by callers).func sortSlice[ any]( [], func(, ) bool) {sort.Slice(, func(, int) bool { return ([], []) })}// exprEqual is structural expression equality (the Rust derived ==),// used to match an ORDER BY key against a projected expression.func exprEqual(, ast.Expr) bool { returnreflect.DeepEqual(, ) }// setLen is a nil-tolerant nodeset length (a nil set is empty).func setLen( *nodeset.Set) int {if == nil {return0 }return .Len()}// setSlice is a nil-tolerant nodeset materialization.func setSlice( *nodeset.Set) []uint32 {if == nil {returnnil }return .ToSlice()}// seekProbes is the set of index keys a single-value property seek must// probe for v: the value itself plus its numeric twin when one exists// (the index matches stored values exactly; equality coerces).func seekProbes( value.Value) []value.Value {if , := value.NumericTwin(); {return []value.Value{, } }return []value.Value{}}// seekCard is the posting count a single-value property seek yields for v// across all its probes.func seekCard( graph.Graph, , string, value.Value) uint64 {varuint64for , := rangeseekProbes() { += uint64(setLen(.NodesWithProperty(, , ))) }return}// seekNodes is the sorted, deduplicated id set a single-value property// seek yields for v across all its probes (the exact set the built scan// serves).func seekNodes( graph.Graph, , string, value.Value) []graph.NodeID {var []graph.NodeIDfor , := rangeseekProbes() { = append(, setSlice(.NodesWithProperty(, , ))...) }slices.Sort()returnslices.Compact()}
The pages are generated with Goldsv0.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.