| 1 | package Gtk2::Ex::Threads::DBI::Query; | ||
| 2 | |||
| 3 | # This is just a query handle object used by Gtk2::Ex::Threads::DBI | ||
| 4 | use strict; | ||
| 5 | use warnings; | ||
| 6 | |||
| 7 | sub new { | ||
| 8 | my ($class, $name, $thread) = @_; | ||
| 9 | my $self = {}; | ||
| 10 | bless ($self, $class); | ||
| 11 | $self->{id} = $name; | ||
| 12 | $self->{thread} = $thread; | ||
| 13 | return $self; | ||
| 14 | } | ||
| 15 | |||
| 16 | sub execute { | ||
| 17 | my ($self, $sqlparams) = @_; | ||
| 18 | $self->{thread}->execute($self->{id}, $sqlparams); | ||
| 19 | } | ||
| 20 | |||
| 21 | 1; | ||
| 22 | |||
| 23 | =head1 AUTHOR | ||
| 24 | |||
| 25 | Ofey Aikon, C<< <ofey.aikon at gmail dot com> >> | ||
| 26 | |||
| 27 | =head1 ACKNOWLEDGEMENTS | ||
| 28 | |||
| 29 | To the wonderful gtk-perl-list. | ||
| 30 | |||
| 31 | =head1 COPYRIGHT & LICENSE | ||
| 32 | |||
| 33 | Copyright 2005 Ofey Aikon, All Rights Reserved. | ||
| 34 | |||
| 35 | This library is free software; you can redistribute it and/or modify it under | ||
| 36 | the terms of the GNU Library General Public License as published by the Free | ||
| 37 | Software Foundation; either version 2.1 of the License, or (at your option) any | ||
| 38 | later version. | ||
| 39 | |||
| 40 | This library is distributed in the hope that it will be useful, but WITHOUT ANY | ||
| 41 | WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
| 42 | PARTICULAR PURPOSE. See the GNU Library General Public License for more | ||
| 43 | details. | ||
| 44 | |||
| 45 | You should have received a copy of the GNU Library General Public License along | ||
| 46 | with this library; if not, write to the Free Software Foundation, Inc., 59 | ||
| 47 | Temple Place - Suite 330, Boston, MA 02111-1307 USA. | ||
| 48 | |||
| 49 | =cut |