[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[2999] trunk/LedgerSMB/DBObject.pm
- Subject: SF.net SVN: ledger-smb:[2999] trunk/LedgerSMB/DBObject.pm
- From: ..hidden..
- Date: Wed, 05 May 2010 18:09:08 +0000
Revision: 2999
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2999&view=rev
Author: aurynn_cmd
Date: 2010-05-05 18:09:08 +0000 (Wed, 05 May 2010)
Log Message:
-----------
Adding schema support to the core DBObject
Modified Paths:
--------------
trunk/LedgerSMB/DBObject.pm
Modified: trunk/LedgerSMB/DBObject.pm
===================================================================
--- trunk/LedgerSMB/DBObject.pm 2010-04-30 23:10:13 UTC (rev 2998)
+++ trunk/LedgerSMB/DBObject.pm 2010-05-05 18:09:08 UTC (rev 2999)
@@ -102,6 +102,9 @@
my $self = shift @_;
my %args = @_;
my $funcname = $args{funcname};
+
+ my $schema = $args{schema} || $LedgerSMB::Sysconfig::db_namespace;
+
$logger->debug("exec_method: \$funcname = $funcname");
my @in_args;
@in_args = @{ $args{args}} if $args{args};
@@ -118,7 +121,7 @@
my $sth = $self->{dbh}->prepare(
$query
);
- $sth->execute($funcname, $LedgerSMB::Sysconfig::db_namespace)
+ $sth->execute($funcname, $schema)
|| $self->error($DBI::errstr . "in exec_method");
my $ref;
@@ -147,10 +150,10 @@
for (@in_args) { push @call_args, $_ } ;
$self->{call_args} = ..hidden..;
$logger->debug("exec_method: \$self = " . Data::Dumper::Dumper($self));
- return $self->call_procedure( procname => $funcname, args => ..hidden.., order_by => $self->{_order_method}->{"$funcname"} );
+ return $self->call_procedure( procname => $funcname, args => ..hidden.., order_by => $self->{_order_method}->{"$funcname"}, schema=>$schema);
}
else {
- return $self->call_procedure( procname => $funcname, args => ..hidden.., order_by => $self->{_order_method}->{"$funcname"} );
+ return $self->call_procedure( procname => $funcname, args => ..hidden.., order_by => $self->{_order_method}->{"$funcname"}, schema=>$schema);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.