--- lib/Search/TokyoDystopia.pm 2008/08/18 13:17:52 13 +++ lib/Search/TokyoDystopia.pm 2008/08/18 18:44:47 20 @@ -30,6 +30,19 @@ IDBONOLCK IDBOLCKNB tcidbclose +tcidbput +tcidbout +tcidbget +tcidbsearch +IDBSSUBSTR +IDBSPREFIX +IDBSSUFFIX +IDBSFULL +IDBSTOKEN +IDBSTOKPRE +IDBSTOKSUF +tcidbiterinit +tcidbiternext ); =head1 NAME @@ -95,6 +108,44 @@ my $success = tcidbclose( $idb ); +=head2 tcidbput + + my $success = tcidbput( $idb, $id, $text ); + +=head2 tcidbout + + my $success = tcidbout( $idb, $id ); + +=head2 tcidbget + + my $text = tcidbget( $idb, $id ); + +=head2 tcidbsearch + + my @ids = tcidbsearch( $idb, $word, IDBSSUBSTR ) + +=cut + +use constant { + IDBSSUBSTR => 0, # substring matching + IDBSPREFIX => 1, # prefix matching + IDBSSUFFIX => 2, # suffix matching + IDBSFULL => 3, # full matching + IDBSTOKEN => 4, # token matching + IDBSTOKPRE => 5, # token prefix matching + IDBSTOKSUF => 6, # token suffix matching +}; + +=head2 tcidbiterinit + + my $success = tcidbiterinit( $idb ); + +=head2 tcidbiternext + + my $id = tcidbiternext( $idb ); + +=cut + =head1 KNOWN BUGS Low-level functions often just die when called on invalid (or deleted) database