Alzabo::Schema(3pm)

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

πŸ’– Alzabo::Schema β€” the whole vibe πŸ’–

okay bestie, so this is the manual page for Alzabo::Schema (yes, the (3pm) one, the User Contributed Perl Documentation one, that's the girlies we're talking about) and she is literally the blueprint for schema objects. like, the base class. the mother of all schemas. main character energy, no cap. πŸ’…


✨ SYNOPSIS ✨

use base qw(Alzabo::Schema);

that's it. that's the whole entrance. she said "inherit from me, bestie" πŸŽ€


🌸 DESCRIPTION 🌸

This is the base class for schema objects..

yes there are two periods at the end, i'm not fixing her, she's iconic πŸ’€


πŸ‘‘ METHODS πŸ‘‘

πŸ¦‹ name

Returns a string containing the name of the schema. that's it, that's her name, that's what she answers to. simple. elegant. slay. ✨

πŸ¦‹ table ($name)

Returns an Alzabo::Table object representing the specified table.

🚨 heads up bestie: an Alzabo::Exception::Params exception is throws if the schema does not contain the table. (the original page says "is throws" and honestly? we respect her grammar choices, but the vibe is: it throws. it will absolutely throw at you. πŸ™ˆ)

πŸ¦‹ tables (@optional_list)

okay so this one has range:

  • If no arguments are given, this method returns a list of all the Alzabo::Table objects in the schema β€” or, in a scalar context, the number of such tables. πŸ’–
  • If one or more arguments are given, it returns a list of table objects with those names, in the same order given (or, in a scalar context, the number of such tables β€” but ngl, that's not terribly useful, the page said it, not me 🫠).
🚨 and again: an Alzabo::Exception::Params exception is throws if the schema does not contain one or more of the specified tables. she does not do half-friendships with tables that don't exist. periodt.

πŸ¦‹ has_table ($name)

Returns a boolean value indicating whether the table exists in the schema. a simple yes/no, exists/doesn't, real/fake, in/out. vibe check for tables. 🧚

πŸ¦‹ begin_work

Starts a transaction. Calls to this function may be nested and it will be handled properly. so go ahead and nest them, she can hold all those thoughts at once, multitasking queen. πŸ‘‘

πŸ¦‹ rollback

Rollback a transaction. we're undoing it. we're pretending it never happened. no evidence, no receipts. 🌈

πŸ¦‹ commit

Finishes a transaction with a commit.

⚠️ real talk: if you make multiple calls to begin_work(), make sure to call this method the same number of times. count them. keep the count. do not lose the count. 😭

πŸ¦‹ run_in_transaction ( sub { code... } )

This method takes a subroutine reference and wraps it in a transaction.

It will preserve the context of the caller and returns whatever the wrapped code would have returned. so she matches your energy and hands you back exactly what your code gave her. obsessed. 🫢

πŸ¦‹ driver

Returns the Alzabo::Driver object for the schema. πŸ”₯

πŸ¦‹ rules

Returns the Alzabo::RDBMSRules object for the schema. πŸ“œ

πŸ¦‹ sqlmaker

Returns the Alzabo::SQLMaker object for the schema. making that SQL, bestie. ⭐


πŸ’œ AUTHOR πŸ’œ

Dave Rolsky, <autarch@urth.org> β€” the actual author, the one who wrote all this, credit where credit is due, respect the architect. πŸ’


and that's a wrap!! this page is from perl v5.34.0, dated 2022-06-14, filed under Alzabo::Schema(3pm) β€” go forth and schema responsibly, bestie, you're gonna do amazing πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from