Click here to get back home

No queue support with the Sleepycat::Db Perl interface?

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
No queue support with the Sleepycat::Db Perl interface? Kim Scheibel 03-28-2006
Posted by Kim Scheibel on March 28, 2006, 7:03 pm
Please log in for more thread options


I've been unsuccessful in trying to use the queue table type with the
Sleepycat::Db interface and I cannot figure out why.

===
use Sleepycat::Db;

my $db = new Db();
$db->open(undef, "test.db", undef, Db::DB_QUEUE, Db::DB_CREATE);

my($k, $v) = ('', 'test value');

$db->put($k, $v, Db::DB_APPEND);
===
results in:
Db::_put() -- txnid is not an object reference at (eval 2) line 13,
<DATA> line 345.

(transactions aren't configured, obviously)

No luck _with_ transactions either:
===
use Sleepycat::Db;

eval {
my $env = new DbEnv;
$env->open('testenv',
Db::DB_CREATE|Db::DB_INIT_MPOOL|Db::DB_INIT_TXN|Db::DB_INIT_LOCK,
0666);

my $db = new Db($env);
$db->open(undef, "test.db", undef, Db::DB_QUEUE,
Db::DB_CREATE|Db::DB_AUTO_COMMIT);

my($k, $v) = ('', 'test value');

my $txn = $env->txn_begin;
$db->put($txn, $k, $v, Db::DB_APPEND);
$txn->commit;
};

if($@) {
print $@->what, "\n";
}

===
Db::put: Invalid argument in test_queue_txn, line 18

I've tried a number of other ways with much the same result. Does
anyone know if queues are just not supported by Sleepycat::Db?

/Kim


Similar ThreadsPosted
Perl interface to Google GDS SDK May 9, 2005, 2:22 am
Announcing VCI: The Version Control Interface for Perl August 31, 2007, 9:37 am
Perl interface to direct port I/O functions (inb(), outb() and friends) February 19, 2005, 9:00 pm
How to get GIF support with Perl-GD library? (Can't locate object method "newFromGif") June 5, 2007, 4:22 am
Announcing WWW::Metaweb - Perl interface to the Metaweb API (Freebase) September 14, 2007, 3:06 am
Announcing Net::Digg - Perl interface to the Digg API November 9, 2007, 4:26 pm
comp.lang.perl.modules,alt.autos.rod-n-custom,alt.kids-talk,alt.internet.p2p,alt.support.nutty.as.a.fruitcake December 28, 2004, 2:24 am
MIME::Lite need sendmail Queue ID November 16, 2006, 9:34 am
BerkeleyDB Queue Database Array Size August 14, 2006, 2:50 am
[RFC] Thread::MappedQueue - threadsafe queue with mapped responses July 8, 2005, 11:47 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap