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

FreeBSD Manual Pages

  
 
  

home | help
T2::Storage(3)	      User Contributed Perl Documentation	T2::Storage(3)

NAME
       T2::Storage - Database handle, object cache

SYNOPSIS
	 # load	the application	schema,	connect	to the database
	 my $storage = T2::Storage->open("MyApp");

	 # store an object with	a schema
	 $storage->insert($object);

DESCRIPTION
       The Tangram T2 Storage class.  Currently, this is a subclass of
       Tangram::Storage, but it	is planned to slowly move pieces of Tangram
       proper into this	new core.

METHODS
       T2::Storage->open($site,	$schema)
	   This	function opens a connection to a named database	source.	 It
	   takes between one and two parameters:

	   $site
	       The `site' to connect to.  This is a named data source, a bit
	       like using ODBC but stored in a text file rather	than an	opaque
	       registry.  This should correspond to a file in etc/ called
	       $site.dsn, as extracted by "T2::Storage::get_dsn_info" (see
	       get_dsn_info).

	   $schema
	       This should be either a Tangram::Schema object, or a T2::Schema
	       object.

	       Gets the	database information for $site_name, in	the form
	       ($dsn, $username, $password, $schema); If $dont_get_schema is
	       set, no attempt to load the Tangram schema is made.

		   Returns the site name that was used to connect to this
		   database.

		       Save an object to the database (that is,	do an insert
		       if this is a new	object or an update if it is already
		       persistent).

		       unload_all()

		       A smarter version of unload_all() that really makes
		       sure all	objects	are cleaned up from memory, using
		       Class::Tangram's	clear_refs() method.

		       rollback_all

		       Make double damned sure that this instance of the
		       Storage handle doesn't hold any locks

		       dbi_handle()

		       Returns a current DBI handle, though you	are not
		       guaranteed to get Tangram's own handle.

AUTHOR
       Sam Vilain, <samv@cpan.org>

POD ERRORS
       Hey! The	above document had some	coding errors, which are explained
       below:

       Around line 101:
	   =over should	be: '=over' or '=over positive_number'

       Around line 153:
	   =over should	be: '=over' or '=over positive_number'

       Around line 166:
	   =over should	be: '=over' or '=over positive_number'

	   You can't have =items (as at	line 198) unless the first thing after
	   the =over is	an =item

       Around line 284:
	   You forgot a	'=back'	before '=head1'

	   You forgot a	'=back'	before '=head1'

	   You forgot a	'=back'	before '=head1'

perl v5.24.1			  2005-11-06			T2::Storage(3)

NAME | SYNOPSIS | DESCRIPTION | METHODS | AUTHOR | POD ERRORS

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

home | help