Perlbug::Database - Bug support functions for Perlbug


Perlbug documentation  | view source Contained in the Perlbug distribution.

Index


NAME

Top

Perlbug::Database - Bug support functions for Perlbug

DESCRIPTION

Top

Access to the database for Perlbug

SYNOPSIS

Top

	my $o_db = Perlbug::Database->new(@args);

	my $sth  = $o_db->query('show tables');

	my @tables = $sth->fetchrow_array; # yek (should move get_list|data() from Base to here)

	print "tables: @tables\n";

METHODS

Top

new

Get a new db object

	my $o_db = Perlbug::Database->new(@args);

quote

Quote the given string/s to 'sql\'s'

	my $quoted = $o_db->quote($sql); 

comp

Return the appropriate comparison operator: LIKE or =

	my $comp = $o_db->comp($str); 

dbh

Returns database handle for queries

	my $o_dbh = $o_db->dbh;

DBConnect

DBConnect() checks to see if there is an open connection to the Savant database, opens one if there is not, and returns a global database handle. This eliminates opening and closing database handles during a session. undef is returned

query

Return sth from given query

	my $sth = $o_db->query($sql);

case_sensitive

Return given args(column, string) as case sensitive match

	my $sql = $o_db->case_sensitive('format', 'H');

AUTHOR

Top

Richard Foley perlbug@rfi.net Oct 1999 2000 2001

From original work by Chris Masto chrism@netmonger.net


Perlbug documentation  | view source Contained in the Perlbug distribution.