/usr/share/perl5/DBIx/SearchBuilder/Handle/ODBC.pm is in libdbix-searchbuilder-perl 1.66-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | # $Header: /home/jesse/DBIx-SearchBuilder/history/SearchBuilder/Handle/ODBC.pm,v 1.8 2001/10/12 05:27:05 jesse Exp $
package DBIx::SearchBuilder::Handle::ODBC;
use strict;
use warnings;
use base qw(DBIx::SearchBuilder::Handle);
=head1 NAME
DBIx::SearchBuilder::Handle::ODBC - An ODBC specific Handle object
=head1 SYNOPSIS
=head1 DESCRIPTION
This module provides a subclass of DBIx::SearchBuilder::Handle that
compensates for some of the idiosyncrasies of ODBC.
=head1 METHODS
=cut
=head2 CaseSensitive
Returns a false value.
=cut
sub CaseSensitive {
my $self = shift;
return (undef);
}
=head2 BuildDSN
=cut
sub BuildDSN {
my $self = shift;
my %args = (
Driver => undef,
Database => undef,
Host => undef,
Port => undef,
@_
);
my $dsn = "dbi:$args{'Driver'}:$args{'Database'}";
$dsn .= ";host=$args{'Host'}" if (defined $args{'Host'} && $args{'Host'});
$dsn .= ";port=$args{'Port'}" if (defined $args{'Port'} && $args{'Port'});
$self->{'dsn'} = $dsn;
}
=head2 ApplyLimits
=cut
sub ApplyLimits {
my $self = shift;
my $statementref = shift;
my $per_page = shift or return;
my $first = shift;
my $limit_clause = " TOP $per_page";
$limit_clause .= " OFFSET $first" if $first;
$$statementref =~ s/SELECT\b/SELECT $limit_clause/;
}
=head2 DistinctQuery
=cut
sub DistinctQuery {
my $self = shift;
my $statementref = shift;
my $sb = shift;
$$statementref = "SELECT main.* FROM $$statementref";
$$statementref .= $sb->_GroupClause;
$$statementref .= $sb->_OrderClause;
}
sub Encoding {
}
1;
__END__
=head1 AUTHOR
Autrijus Tang
=head1 SEE ALSO
DBIx::SearchBuilder, DBIx::SearchBuilder::Handle
=cut
|