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

FreeBSD Manual Pages

  
 
  

home | help
Data::Model::Driver::DUser)Contributed Perl DocumenData::Model::Driver::DBI(3)

NAME
       Data::Model::Driver::DBI	- storage driver for DBI

SYNOPSIS
	 package MyDB;
	 use base 'Data::Model';
	 use Data::Model::Schema;
	 use Data::Model::Driver::DBI;

	 my $dbi_connect_options = {};
	 my $driver = Data::Model::Driver::DBI->new(
	     dsn	     =>	'dbi:mysql:host=localhost:database=test',
	     username	     =>	'user',
	     password	     =>	'password',
	     connect_options =>	$dbi_connect_options,
	     reuse_dbh	     =>	1, # sharing dbh (experimental option)
				   # When you use by MySQL, please set up
				   # connect_options =>	{ mysql_auto_reconnect => 1 },
				   # simultaneously. but mysql_auto_reconnect is very unsettled.
	 );

	 base_driver $driver;
	 install_model model_name => schema {
	   ....
	 };

DESCRIPTION
       DBD that	is working now is only mysql and SQLite.

SEE ALSO
       DBI, Data::Model

AUTHOR
       Kazuhiro	Osawa <yappo <at> shibuya <doet> pl>

LICENSE
       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

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

       Around line 568:
	   Non-ASCII character seen before =encoding in	'<doet>'. Assuming
	   UTF-8

perl v5.32.0			  2013-07-08	   Data::Model::Driver::DBI(3)

NAME | SYNOPSIS | DESCRIPTION | SEE ALSO | AUTHOR | LICENSE | POD ERRORS

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

home | help