CQL::Node(3pm)

πŸ“¦
version 1.13 Β· 2 versions
  • 1.13 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.13 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– CQL::Node πŸ’–

okay bestie, welcome to CQL::Node β€” straight out of the User Contributed Perl Documentation collection (that's the 3pm vibe, iykyk). pull up a chair, grab a strawberry πŸ“, and let's get into it.


✨ NAME ✨

CQL::Node β€” it's the base class for nodes in a CQL parse tree. the mother of the whole family tree, literally. πŸŒ³πŸ‘‘


🌸 SYNOPSIS 🌸

n/a

that's it. that's the synopsis. no example, no little snippet, nothing. not every icon needs a demo, periodt. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea: every single CQL node class inherits from CQL::Node. all of them. the whole squad. 🫢

and what does CQL::Node actually do for them? it essentially guarantees that its children implements some methods. that's its whole job β€” it's the friend who makes sure everybody in the group chat actually shows up and does their part. no deadbeats allowed. 😭✨

the methods in question are the ones below. πŸ‘‡

🌈 toCQL()

yep, it's on the list. the base class promises its children have it. πŸ”₯

⭐ toXCQL()

also on the list. guaranteed. no cap.

πŸŽ€ toSwish()

yep, this one too. bestie said "you WILL implement this." πŸ‘‘

πŸ’œ toLucene()

and this one. all four of the to* methods are part of the package deal. πŸ¦‹

πŸ’… clone()

okay this one actually gets an explanation, slay:

Creates a copy of a node, and it's children. so like, the whole subtree comes along for the ride. 🌳✨

Useful if you want to modify the tree but keep a copy of the original. this is giving "screenshot before you edit the doc" energy and honestly? iconic. keep your original safe, mess around with the duplicate, nobody gets hurt. πŸ™ˆπŸ’–


πŸ’€ quick reminder bestie: don't sleep on clone() when you're about to mutate a tree. your future self will thank you. fr fr.

mwah πŸ’‹ that's the whole page. this one shipped as part of perl v5.36.0, dated 2022-12-11, and it lives in the CQL::Node(3pm) section of the manual. go forth and parse, main character. πŸŒˆβœ¨πŸ‘‘

πŸ“¦ where this page comes from