From 6c5453cf9b62518da932be311c811f9b1b6e612e Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Fri, 5 Oct 2007 16:21:13 +0000 Subject: [PATCH] i'm dumb --- lib/WebGUI/DatabaseLink.pm | 17 ----------------- lib/WebGUI/SQL.pm | 13 +++++++++++++ 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/lib/WebGUI/DatabaseLink.pm b/lib/WebGUI/DatabaseLink.pm index ce200e259..32ab90c1d 100644 --- a/lib/WebGUI/DatabaseLink.pm +++ b/lib/WebGUI/DatabaseLink.pm @@ -266,23 +266,6 @@ sub get { #------------------------------------------------------------------- -=head2 getDriver ( ) - -Returns the DBI driver used by this database link - -=cut - -sub getDriver { - my $self = shift; - my $dsn = $self->get->{DNS}; - if ($dsn =~ /^dbi:(\w+):/i) { - return $1; - } - return; -} - -#------------------------------------------------------------------- - =head2 getId ( ) Returns the ID of this database link. diff --git a/lib/WebGUI/SQL.pm b/lib/WebGUI/SQL.pm index bd2ebd98b..97d49f952 100644 --- a/lib/WebGUI/SQL.pm +++ b/lib/WebGUI/SQL.pm @@ -459,6 +459,19 @@ sub getNextId { #------------------------------------------------------------------- +=head2 getDriver ( ) + +Returns the DBI driver used by this database link + +=cut + +sub getDriver { + my $self = shift; + return $self->{_dbh}->{Driver}->{Name}; +} + +#------------------------------------------------------------------- + =head2 getRow ( table, key, keyValue ) Returns a row of data as a hash reference from the specified table.