DBIx::TextIndex::DBD::mysql - Driver for MySQL


DBIx-TextIndex documentation Contained in the DBIx-TextIndex distribution.

Index


Code Index:

NAME

Top

DBIx::TextIndex::DBD::mysql - Driver for MySQL

SYNOPSIS

Top

 require DBIx::TextIndex::DBD::mysql;

DESCRIPTION

Top

Contains MySQL-specific overrides for methods of DBIx::TextIndex::DBD.

Used internally by DBIx::TextIndex.

INTERFACE

Top

Restricted Methods

insert_doc_key

AUTHOR

Top

Daniel Koch, dkoch@cpan.org.

COPYRIGHT

Top

LICENSE

Top

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e., under the terms of the "Artistic License" or the "GNU General Public License".

DISCLAIMER

Top

This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the "GNU General Public License" for more details.


DBIx-TextIndex documentation Contained in the DBIx-TextIndex distribution.

package DBIx::TextIndex::DBD::mysql;

use strict;
use warnings;

our $VERSION = '0.26';

use base qw(DBIx::TextIndex::DBD);

sub insert_doc_key {
    my $self = shift;
    my $doc_key = shift;

    my $sql = <<END;
INSERT INTO $self->{DOC_KEY_TABLE} (doc_key) VALUES (?)
END

    $self->{INDEX_DBH}->do($sql, undef, $doc_key);
    my $doc_id = $self->{INDEX_DBH}->{mysql_insertid};
    return $doc_id;
}

1;
__END__