DBIx::C...tistics(3)

🌈 NAME 🌈

DBIx::Class::Storage::Statistics β€” SQL Statistics

Okay so bestie, that's the class: DBIx::Class::Storage::Statistics, and it's all about SQL Statistics. We're keeping every detail, just with better vibes. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

No synopsis here β€” the original page leaves this part blank, and we're keeping it that way. πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so DBIx::Class::Storage::Statistics is called by DBIx::Class::Storage::DBI as a means of collecting statistics on its actions. It's lowkey the little stats bestie. 🧚

Using this class alone merely prints the SQL executed, the fact that it completes, and begin/end notification for transactions. That's it β€” no secret extra magic, no cap. ✨

To really use this class you should subclass it and create your own method for collecting the statistics as discussed in DBIx::Class::Manual::Cookbook. That's the main character move, periodt. πŸ‘‘


✨ METHODS ✨

🧚 new 🧚

Returns a new DBIx::Class::Storage::Statistics object. Fresh object, fresh vibes. 🫢

πŸŽ€ debugfh πŸŽ€

Sets or retrieves the filehandle used for trace/debug output. This should be an IO::Handle compatible object (only the print method is used). By default it is initially set to STDERR β€” although see discussion of the DBIC_TRACE environment variable. πŸ‘€

Invoked as a getter, it will lazily open a filehandle and set it to autoflush (if one is not already set). Lazy but productive, honestly iconic. πŸ’…

🌸 print 🌸

Prints the specified string to our debugging filehandle. Provided to save our methods the worry of how to display the message. Like, the method doesn't have to stress about presentation β€” print handles it. ✨

πŸ¦‹ silence πŸ¦‹

Turn off all output if set to true. Quiet mode activated. 🀫

⭐ txn_begin ⭐

Called when a transaction begins. Transaction era begins. 🎬

πŸ’œ txn_rollback πŸ’œ

Called when a transaction is rolled back. Oops, we're undoing. 😭

πŸ”₯ txn_commit πŸ”₯

Called when a transaction is committed. Slay, it's official. βœ…

πŸŽ€ svp_begin πŸŽ€

Called when a savepoint is created. Savepoint bestie has entered the chat. 🫢

🌈 svp_release 🌈

Called when a savepoint is released. Bye savepoint, you did great. πŸ’…

🧚 svp_rollback 🧚

Called when rolling back to a savepoint. Rewind moment. βͺ

πŸ‘‘ query_start πŸ‘‘

Called before a query is executed. The first argument is the SQL string being executed and subsequent arguments are the parameters used for the query. So it's got the SQL and the params β€” everything the query needs to know. πŸ’–

πŸ“ query_end πŸ“

Called when a query finishes executing. Has the same arguments as query_start. Matching set, cute. πŸŽ€

πŸ’¬ FURTHER QUESTIONS? πŸ’¬

Check the list of additional DBIC resources. That's the move. πŸ”

This module is free software copyright by the DBIx::Class (DBIC) authors. You can redistribute it and/or modify it under the same terms as the DBIx::Class library. πŸ’–


Signed off with love from the User Contributed Perl Documentation universe: perl v5.42.0, dated 2025-01-22, and the footer energy is DBIx::C...tistics(3). fr fr πŸ’…βœ¨

πŸ“¦ where this page comes from