PGObje...String(3pm)

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

πŸ’– PGObject::Type::ByteString πŸ’–

okay bestie, so this is a page from the User Contributed Perl Documentation set β€” like, one of the perl(3pm) girlies. it's the manual for PGObject::Type::ByteString, and honestly? she's small but she works. 🫢


✨ NAME ✨

PGObject::Type::ByteString β€” a wrapper for raw strings that map to BYTEA columns. no cap, that's the whole job. πŸ’…


🌸 VERSION 🌸

Version 1.2.3 πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

PGObject::Type::ByteString->register();

and boom, that's it β€” now literally every BYTEA column comes back as a ByteString object. it's giving "one line of code, whole new world" ✨


πŸ’œ DESCRIPTION πŸ’œ

so this module is a basic lil wrapper around Perl strings, and its whole thing is mapping them to BYTEA database columns. like, a glow-up for your bytes. πŸŽ€

PGObject::Type::ByteString objects have no traditional properties β€” nope, none, don't go looking for them β€” but if you dereference one, you get the raw string it's holding. that's the vibe check and it passes. βœ…


🌈 SUBROUTINES/METHODS 🌈

register([registry => 'default',] [types => $types_arrayref])

by default this registers the type PG_BYTEA. that's the default, bestie β€” you can pass registry => 'default' and/or a types => $types_arrayref if you're feeling fancy, but if you don't, it's PG_BYTEA. πŸ’…

new

instantiates and returns a shiny new object, built from the scalar string you hand over, or from a scalar string reference. either one, she's flexible like that. 🌸

and yeah β€” dereferencing the object you get back will yield the original raw string. exactly what you put in, no funny business. πŸ”₯

from_db

returns a new PGObject::Type::ByteString object based on the supplied scalar string, or scalar string reference. same energy as new, just coming at you from the database side. πŸ¦‹

to_db

returns the object's binary string value, packaged up as a PG_BYTEA type/value hashref β€” and that hashref is suitable for passing straight to DBD::Pg. she's ready for the handoff, no notes. πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Erik Huelsmann, <ehuels at gmail.com> β€” the icon who made this happen, periodt.


πŸ’€ BUGS πŸ’€

pls pls pls report any bugs or feature requests to bug-pgobject-type-bytestring at rt.cpan.org, or slide through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=PGObject-Type-ByteString>.

and listen β€” the author will be notified, and then you'll automatically be notified of progress on your bug as changes get made. so you're not screaming into the void, you're in a group chat. 😭🫢


πŸŽ€ SUPPORT πŸŽ€

you can find the docs for this module with the perldoc command, like so:

perldoc PGObject::Type::ByteString

and you can also look for info at:

  • RT: CPAN's request tracker (report bugs here)

<http://rt.cpan.org/NoAuth/Bugs.html?Dist=PGObject-Type-ByteString>

  • AnnoCPAN: Annotated CPAN documentation

<http://annocpan.org/dist/PGObject-Type-ByteString>

  • CPAN Ratings

<http://cpanratings.perl.org/d/PGObject-Type-ByteString>

  • Search CPAN

<http://search.cpan.org/dist/PGObject-Type-ByteString/>


⭐ ACKNOWLEDGEMENTS ⭐

(yeah bestie, this section is literally empty in the original. nothing here. she said "no thoughts, head empty" πŸ™ˆ)


Copyright 2016-2018 Erik Huelsmann

This program is released under the following license: BSD


and that's the whole page, my love πŸ’– this one came out under perl v5.36.0 and was dated 2022-11-21, so shoutout to the perl era that blessed us with her. mwah, go register your BYTEA types, you got this 🧚✨