… | |
… | |
87 | Request has reached the end of its lifetime and holds no resources |
87 | Request has reached the end of its lifetime and holds no resources |
88 | anymore (except possibly for the Perl object, but its connection to |
88 | anymore (except possibly for the Perl object, but its connection to |
89 | the actual aio request is severed and calling its methods will |
89 | the actual aio request is severed and calling its methods will |
90 | either do nothing or result in a runtime error). |
90 | either do nothing or result in a runtime error). |
91 | |
91 | |
|
|
92 | WIN32 FILENAMES/DATABASE NAME MESS |
|
|
93 | Perl on Win32 supports only ASCII filenames (the reason is that it |
|
|
94 | abuses an internal flag to store wether a filename is Unicode or ANSI, |
|
|
95 | but that flag is used for somethign else in the perl core, so there is |
|
|
96 | no way to detect wether a filename is ANSI or Unicode-encoded). The BDB |
|
|
97 | module tries to work around this issue by assuming that the filename is |
|
|
98 | an ANSI filename and BDB was built for unicode support. |
|
|
99 | |
92 | BERKELEYDB FUNCTIONS |
100 | BERKELEYDB FUNCTIONS |
93 | All of these are functions. The create functions simply return a new |
101 | All of these are functions. The create functions simply return a new |
94 | object and never block. All the remaining functions all take an optional |
102 | object and never block. All the remaining functions take an optional |
95 | callback as last argument. If it is missing, then the function will be |
103 | callback as last argument. If it is missing, then the function will be |
96 | executed synchronously. In both cases, $! will reflect the return value |
104 | executed synchronously. In both cases, $! will reflect the return value |
97 | of the function. |
105 | of the function. |
98 | |
106 | |
99 | BDB functions that cannot block (mostly functions that manipulate |
107 | BDB functions that cannot block (mostly functions that manipulate |
100 | settings) are method calls on the relevant objects, so the rule of thumb |
108 | settings) are method calls on the relevant objects, so the rule of thumb |
101 | is: if its a method, its not blocking, if its a function, it takes a |
109 | is: if it's a method, it's not blocking, if it's a function, it takes a |
102 | callback as last argument. |
110 | callback as last argument. |
103 | |
111 | |
104 | In the following, $int signifies an integer return value, "octetstring" |
112 | In the following, $int signifies an integer return value, "octetstring" |
105 | is a "binary string" (i.e. a perl string with no character indices |
113 | is a "binary string" (i.e. a perl string with no character indices |
106 | >255), "U32" is an unsigned 32 bit integer, "int" is some integer, "NV" |
114 | >255), "U32" is an unsigned 32 bit integer, "int" is some integer, "NV" |
… | |
… | |
361 | flags: SEQ_DEC SEQ_INC SEQ_WRAP |
369 | flags: SEQ_DEC SEQ_INC SEQ_WRAP |
362 | $int = $seq->set_range (db_seq_t min, db_seq_t max) |
370 | $int = $seq->set_range (db_seq_t min, db_seq_t max) |
363 | |
371 | |
364 | Example: |
372 | Example: |
365 | my $seq = $db->sequence; |
373 | my $seq = $db->sequence; |
366 | |
374 | |
367 | db_sequence_open $seq, undef, "seq", BDB::CREATE; |
375 | db_sequence_open $seq, undef, "seq", BDB::CREATE; |
368 | db_sequence_get $seq, undef, 1, my $value; |
376 | db_sequence_get $seq, undef, 1, my $value; |
369 | |
377 | |
370 | SUPPORT FUNCTIONS |
378 | SUPPORT FUNCTIONS |
371 | EVENT PROCESSING AND EVENT LOOP INTEGRATION |
379 | EVENT PROCESSING AND EVENT LOOP INTEGRATION |
372 | $msg = BDB::strerror [$errno] |
380 | $msg = BDB::strerror [$errno] |
373 | Returns the string corresponding to the given errno value. If no |
381 | Returns the string corresponding to the given errno value. If no |
374 | argument is given, use $!. |
382 | argument is given, use $!. |
|
|
383 | |
|
|
384 | Note that the BDB module also patches the $! variable directly, so |
|
|
385 | you should be able to get a bdb error string by simply stringifying |
|
|
386 | $!. |
375 | |
387 | |
376 | $fileno = BDB::poll_fileno |
388 | $fileno = BDB::poll_fileno |
377 | Return the *request result pipe file descriptor*. This filehandle |
389 | Return the *request result pipe file descriptor*. This filehandle |
378 | must be polled for reading by some mechanism outside this module |
390 | must be polled for reading by some mechanism outside this module |
379 | (e.g. Event or select, see below or the SYNOPSIS). If the pipe |
391 | (e.g. Event or select, see below or the SYNOPSIS). If the pipe |