Jifty:...le::Pg(3pm)

๐Ÿ“ฆ
version 0.78 ยท 2 versions
  • 0.78 ยท debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.78 ยท ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

โœจ NAME โœจ

Jifty::DBI::Handle::Pg โ€” a Postgres-specific Handle object ๐Ÿ’… (it lives in the Jifty:...le::Pg page of the User Contributed Perl Documentation, so you already know it's giving ~legacy~ but make it work ๐Ÿซถ)


๐ŸŒธ SYNOPSIS ๐ŸŒธ

okay so bestie... there's literally nothing here. no synopsis. no code. the section exists and that's it. iconic behaviour honestly ๐ŸŽ€ (go read METHODS instead, that's where the good stuff is)


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

This module hands you a subclass of Jifty::DBI::Handle that exists purely to compensate for some of the idiosyncrasies of Postgres ๐Ÿ˜ญ like Postgres is amazing and we love her but she does have her little quirks and this module is the bestie who smooths everything over. no cap.


๐Ÿ’– METHODS ๐Ÿ’–

๐ŸŒˆ connect

connect takes a hashref and passes it off to SUPER::connect; forces the timezone to GMT, returns a database handle โœจ

so like, it's a middleman but a useful middleman. it grabs your hashref, yeets it up to SUPER::connect, makes sure the timezone is locked to GMT, and hands you back a database handle. periodt. ๐Ÿซถ

๐ŸŒˆ insert

Takes a table name as the first argument and assumes that the rest of the arguments are an array of key-value pairs to be inserted. ๐Ÿ’Œ

In case of insert failure, returns a Class::ReturnValue object preloaded with error info ๐Ÿ˜ญ so if it flops, you get a whole object with the tea in it instead of just... nothing.

๐ŸŒˆ id_sequence_name TABLE

Takes a TABLE name and returns the name of the sequence of the primary key for that table ๐Ÿ”‘ like "hey what's the sequence called" and it tells you.

๐ŸŒˆ blob_params column_NAME column_type

Returns a hash ref for the bind_param call to identify BLOB types used by the current database for a particular column type. ๐Ÿ“ The current Postgres implementation only supports BYTEA types โ€” that's it, that's the whole menu, no substitutions bestie.

๐ŸŒˆ apply_limits STATEMENTREF ROWS_PER_PAGE FIRST_ROW

takes an SQL SELECT statement and massages it to return ROWS_PER_PAGE starting with FIRST_ROW ๐Ÿ’†โ€โ™€๏ธ like it literally gives your query a little spa day so it comes back paginated exactly how you asked.

๐ŸŒˆ _make_clause_case_insensitive column operator VALUE

Takes a column, operator and value. performs the magic necessary to make your database treat this clause as case insensitive โœจ๐Ÿ”ฎ

Returns a column operator value triple ๐Ÿ‘‘ (yes it's the same three things but now the magic has been performed, trust)

๐ŸŒˆ distinct_query STATEMENTREF

takes an incomplete SQL SELECT statement and massages it to return a DISTINCT result set ๐ŸŒŸ another lil spa day, but this time your results come back de-duplicated.

๐ŸŒˆ canonical_true

The canonical true value in Postgres is 't' โœ…

๐ŸŒˆ canonical_false

The canonical false value in Postgres is 'f' โŒ


๐ŸŽ€ SEE ALSO ๐ŸŽ€

  • Jifty::DBI
  • Jifty::DBI::Handle
  • DBD::Pg

and that's the whole page, bestie ๐Ÿ’œ this was Jifty:...le::Pg from the User Contributed Perl Documentation, dated 2022-06-15 and generated with perl v5.34.0. go forth and query responsibly, mwah ๐Ÿ˜˜๐Ÿ’…

๐Ÿ“ฆ where this page comes from