Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
DBIx::Class::Schema::TUserdContributed Perl DBIx::Class::Schema::TxnEndHook(3)

NAME
       DBIx::Class::Schema::TxnEndHook - provide add_txn_end_hook method to
       your schema class

SYNOPSIS
	   package MyApp::Schema;
	   use parent 'DBIx::Schema';
	   __PACKAGE__->ensure_class_loaded('DBIx::Class::Storage::TxnEndHook');
	   __PACKAGE__->ensure_class_loaded('DBIx::Class::Storage::DBI');
	   __PACKAGE__->inject_base('DBIx::Class::Storage::DBI', 'DBIx::Class::Storage::TxnEndHook');
	   __PACKAGE__->load_components('Schema::TxnEndHook');

	   package main

	   my $schema =	MyApp::Schema->connect(...)
	   $schema->txn_begin;
	   $schema->add_txn_end_hook(sub { ... });
	   $schema->txn_commit;

DESCRIPTION
       DBIx::Class::Schema::TxnEndHook provide "add_txn_end_hook" method to
       your schema class.

METHODS
       $schema->add_txn_end_hook(sub{ ... })
	   It is short cut for "$schema->storage->add_txn_end_hook(sub{	...
	   })".

perl v5.32.0			  2020-08-29DBIx::Class::Schema::TxnEndHook(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=DBIx::Class::Schema::TxnEndHook&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help