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. π
π COPYRIGHT AND LICENSE π
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
- opensuse-leap 16.0: perl-DBIx-Class 0.082844-bp160.1.10 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms