Debian Codegraph @

src/modules/app_perl/lib/perl/Kamailio/VDB/Adapter/TableVersions.pm

raw
1 #
2 # $Id: TableVersions.pm 757 2007-01-05 10:56:28Z bastian $
3 #
4 # Perl module for Kamailio
5 #
6 # Copyright (C) 2007 Collax GmbH
7 # (Bastian Friedrich <[email protected]>)
8 #
9 # This file is part of Kamailio, a free SIP server.
10 #
11 # Kamailio is free software; you can redistribute it and/or modify
12 # it under the terms of the GNU General Public License as published by
13 # the Free Software Foundation; either version 2 of the License, or
14 # (at your option) any later version
15 #
16 # Kamailio is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 #
25
26 package Kamailio::VDB::Adapter::TableVersions;
27
28 use Kamailio;
29 use Kamailio::Constants;
30
31 sub version {
32 my $table = shift;
33
34 # FIXME We need to split table name again - possibly, this is a function only, so this one will not work
35 my $v = $table->version();
36
37 my @cols;
38 my @row;
39
40 push @cols, new Kamailio::VDB::Column(DB_INT, "table_version");
41 push @row, new Kamailio::VDB::Value(DB_INT, $v);
42
43 return new Kamailio::VDB::Result(\@cols, (bless \@row, Kamailio::Utils::Debug));
44 }
45
46 1;
47