From 2aa92462c19709880a4dc629aa5e7c3a59ed89f6 Mon Sep 17 00:00:00 2001 From: einhverfr Date: Tue, 8 May 2007 16:06:22 +0000 Subject: Added stored procedure collation handling stub git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1172 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/DBObject.pm | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'LedgerSMB') diff --git a/LedgerSMB/DBObject.pm b/LedgerSMB/DBObject.pm index 2b4b35da..63c27f7c 100644 --- a/LedgerSMB/DBObject.pm +++ b/LedgerSMB/DBObject.pm @@ -47,7 +47,8 @@ sub AUTOLOAD { $type =~ m/::(.*?)$/; $type = lc $1; print "Type: $type\n"; - $self->exec_method( procname => "$type" . "_" . $AUTOLOAD, args => \@_ ); + $self->exec_method( procname => "$type" . "_" . $AUTOLOAD, args => \@_ + order_by => $order_by); } sub new { @@ -64,8 +65,19 @@ sub new { $self; } +sub set_ordering { + my $self = shift @_; + my %args = @_; + + if (not defined $self->{_order_method}){ + $self->{_order_method} = {}; + } + + $self->{_order_method}->{$args{method}} = $args{column}; +} + sub exec_method { - my ($self) = shift @_; + my $self = shift @_; my %args = @_; my $funcname = $args{funcname}; my @in_args = @{ $args{args} }; -- cgit v1.2.3