Jiro Nishiguchi > RocksDB-0.02 > RocksDB::Comparator

Download:
RocksDB-0.02.tar.gz

Annotate this POD

Website

View/Report Bugs
Source  

NAME ^

RocksDB::Comparator - rocksdb::Comparator object

SYNOPSIS ^

  use RocksDB;

  my $handler = MyComparator->new;
  my $db = RocksDB->new('/path/to/db', {
      create_if_missing => 1,
      comparator        => RocksDB::Comparator->new($handler),
  });

DESCRIPTION ^

RocksDB::Comparator is a utility class to make rocksdb::Comparator object.

CONSTRUCTOR ^

RocksDB::Comparator->new($handler :Object) :RocksDB::Comparator

Create and return a new RocksDB::Comparator object.

$handler must respond to "compare".

See 'HANDLER METHODS' section for more details.

HANDLER METHODS ^

$handler->compare($a :Str, $b :Str) :Int

Three-way comparison. Returns value:

  < 0 iff $a < $b,
  == 0 iff $a == $b,
  > 0 iff $a > $b

SEE ALSO ^

RocksDB

AUTHOR ^

Jiro Nishiguchi <jiro@cpan.org>

syntax highlighting: