RDF::Trine::Store::DBI::Pg - PostgreSQL subclass of DBI store


RDF-Trine documentation Contained in the RDF-Trine distribution.

Index


Code Index:

NAME

Top

RDF::Trine::Store::DBI::Pg - PostgreSQL subclass of DBI store

VERSION

Top

This document describes RDF::Trine::Store::DBI::Pg version 0.135

SYNOPSIS

Top

    use RDF::Trine::Store::DBI::Pg;

DESCRIPTION

Top

METHODS

Top

Beyond the methods documented below, this class inherits methods from the RDF::Trine::Store::DBI class.

new_with_config ( \%config )

Returns a new RDF::Trine::Store object based on the supplied configuration hashref.

BUGS

Top

Please report any bugs or feature requests to bug-rdf-store-dbi@rt.cpan.org, or through the web interface at http://rt.cpan.org.

AUTHOR

Top

Gregory Todd Williams <gwilliams@cpan.org>

COPYRIGHT

Top


RDF-Trine documentation Contained in the RDF-Trine distribution.
package RDF::Trine::Store::DBI::Pg;

use strict;
use warnings;
no warnings 'redefine';
use base qw(RDF::Trine::Store::DBI);

use Scalar::Util qw(blessed reftype refaddr);

our $VERSION;
BEGIN {
	$VERSION	= "0.135";
	my $class	= __PACKAGE__;
	$RDF::Trine::Store::STORE_CLASSES{ $class }	= $VERSION;
}


sub _config_meta {
	return {
		required_keys	=> [qw(dsn username password name)],
		fields			=> {
			name		=> { description => 'Model Name', type => 'string' },
			dsn			=> { description => 'DSN', type => 'string', template => 'DBI:Pg:dbname=[%database%]' },
			database	=> { description => 'Database Name', type => 'string' },
			username	=> { description => 'Username', type => 'string' },
			password	=> { description => 'Password', type => 'password' },
			driver		=> { description => 'Driver', type => 'string', value => 'Pg' },
		},
	}
}

sub new_with_config {
	my $proto	= shift;
	my $config	= shift;
	$config->{storetype}	= 'DBI::Pg';
	return $proto->SUPER::new_with_config( $config );
}

sub _column_name {
	my $self	= shift;
	my @args	= @_;
	my $col		= lc(join('_', @args));
	return $col;
}



1; # Magic true value required at end of module
__END__