[Jifty-commit] r2379 - Jifty-DBI/trunk/lib/Jifty/DBI/Handle

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Tue Dec 12 04:05:12 EST 2006


Author: audreyt
Date: Tue Dec 12 04:05:10 2006
New Revision: 2379

Modified:
   Jifty-DBI/trunk/lib/Jifty/DBI/Handle/ODBC.pm

Log:
* Jifty::DBI::Handle::ODBC - Bring in the missing build_dsn method from
  DBIx::SearchBuilder such that this backend can work again.
  Requested by: agentzh++

Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Handle/ODBC.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Handle/ODBC.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Handle/ODBC.pm	Tue Dec 12 04:05:10 2006
@@ -32,6 +32,29 @@
     return (undef);
 }
 
+=head2 build_dsn
+
+=cut
+
+sub build_dsn {
+    my $self = shift;
+    my %args = (
+        driver     => undef,
+        database   => undef,
+        host       => undef,
+        port       => undef,
+        @_
+    );
+
+    $args{dbname} ||= delete $args{database};
+
+    my $dsn = "dbi:$args{driver}:$args{dbname}";
+    $dsn .= ";host=$args{'host'}" if $args{'host'};
+    $dsn .= ";port=$args{'port'}" if $args{'port'};
+
+    $self->{'dsn'} = $dsn;
+}
+
 =head2 apply_limits
 
 =cut
@@ -62,6 +85,10 @@
     $$statementref .= $sb->_order_clause;
 }
 
+=head2 encoding
+
+=cut
+
 sub encoding {
 }
 


More information about the Jifty-commit mailing list