GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DBIx::Class::ResultSet::AuditLog(3) User Contributed Perl Documentation DBIx::Class::ResultSet::AuditLog(3)

DBIx::Class::ResultSet::AuditLog

version 0.6.4

Either create your own resultset-classes for each audited result-class, and load AuditLogs resultset-component:

        package MySchema::ResultSet::MyAuditedSource;
        
        use base "DBIx::Class::ResultSet"; # or use Moose and MooseX::NonMoose;

        __PACKAGE__->load_components("ResultSet::AuditLog");

Or set the default resultset-class in your Schema:

        package MySchema;

        use base "DBIx::Class::Schema";

        ...

        __PACKAGE__->load_namespaces(
                default_resultset_class => "AuditLog"
        );

This resultset class enables logging for database updates made by calling "delete" in DBIx::Class::ResultSet and "update" in DBIx::Class::ResultSet. This includes any updates made by methods which rely on the above, like "set_\$rel" in DBIx::Class::Relationship::Base.

If you want full logging in a relational database, you most likely want to use this component.

The current implementation enables logging in the resultset by simply delegating 'delete' and 'update' to 'delete_all' and 'update_all', which call the required triggers. As a result, a database query like

 "DELETE FROM table WHERE id IN '1', '2', '3'"

will result in 3 atomic queries:

 "DELETE FROM table WHERE id = '1'";
 "DELETE FROM table WHERE id = '2'";
 "DELETE FROM table WHERE id = '3'";

which is much slower. It is therefore recommended to use this module only for resultset classes where it is needed. Specifying this module as default resultset class is only recommended if logging is needed for all tables.

DBIx::Class::ResultSet::AuditLog - ResultSet base class for DBIx::Class::AuditLog

version 0.1

Calls "delete_all" in DBIx::Class::ResultSet to ensure that triggers defined by DBIx::Class::AuditLog are run.

Calls "update_all" in DBIx::Class::ResultSet to ensure that triggers defined by DBIx::Class::AuditLog are run.

See "AUTHOR" in DBIx::Class::AuditLog and "CONTRIBUTORS" in DBIx::Class::AuditLog

This software is copyright (c) 2012 by Mark Jubenville.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Mark Jubenville <ioncache@cpan.org>

This software is copyright (c) 2012 by Mark Jubenville.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2022-04-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.