GOLF(2gg)

πŸ“¦ version 601.4.41, in ubuntu questing

πŸ’– GOLF(2gg) πŸ’–

okay bestie, welcome to the golf manual, section 2gg β€” Development vibes only ✨


✨ NAME ✨

get-tree β€” it's giving (tree) 🌳


🎯 PURPOSE 🎯

Get information about a tree. that's it, that's the whole job, and she does it flawlessly πŸ’…


πŸŽ€ SYNTAX πŸŽ€

get-tree <tree> \
    ( count <count> ) | ( hops <hops> )

🌸 DESCRIPTION 🌸

get-tree hands you the tea about <tree> β€” and like, only trees that were created by new-tree, okay? no random trees allowed πŸ™ˆ

  • <count> (the one living in the "count" clause) gives you the number of keys β€” i.e. nodes β€” in the tree. count 'em up, queen πŸ‘‘
  • <hops> (the one living in the "hops" clause) gives you the number of nodes that got accessed to find a key in the last tree statement executed prior to get-tree. so like, the hops from the statement right before. πŸ¦‹
⚠️ bestie listen β€” <hops> is only available in a debug Golf build (peep installing from source). if you're not on a debug build, it's literally always zero. no hops for you, sorry babe πŸ’€

🌈 EXAMPLES 🌈

Get the number of nodes (keys) in a tree:

new-tree mytree
...
get-tree mytree count c

see? iconic. slay. periodt 🫢


πŸ’œ SEE ALSO πŸ’œ

  • Tree
  • delete-tree get-tree new-tree purge-tree read-tree use-cursor write-tree
  • See all documentation

and that's the whole page, bestie!! this was $VERSION of golf(2gg), dated $DATE β€” go forth and tree responsibly πŸŒŸπŸ‘‘πŸ’–

πŸ“¦ where this page comes from