CodeBase
view release on metacpan or search on metacpan
CodeBase.pm view on Meta::CPAN
502503504505506507508509510511512513514515516517518519520521522=item recall_record [RECNO]
Recalls the record specified or the current record if called without a
record number. (Not yet implemented).
=item flush [TRIES]
Flushes to file any outstanding changes (made by C<set_field()>.
Records need to be locked while changes are written. C<TRIES> is the
number of attempts that should be made to aquire the lock. Subsequent
attempts are made with a one second interval.
=item pack COMPRESS-MEMO-FLAG
Packs the database file removing deleted records. If flag parameter
is specified as true then memo fields are compressed at the same time:
$fh->pack(1);
CodeBase.xs view on Meta::CPAN
894895896897898899900901902903904905906907908909910911912913914
XSRETURN_UNDEF;
}
CB_TRACE(1, (
"recsize returns %d\n"
, RETVAL));
OUTPUT:
RETVAL
# $file->flush([$tries])
# flushes the data file an its index and memo files to disk
# calls d4flush, which returns 0, r4locked or r4unique.
void
flush(self, ...)
CodeBase::File
*self
PREINIT:
/*
int
tries; */
CODE:
CB_TRACE(1, (
"flush(\"%s\")\n"
, SELF));
cb_errno = d4flush(self->data4);
CodeBase.xs view on Meta::CPAN
100510061007100810091010101110121013101410151016101710181019102010211022102310241025
CB_TRACE(1, (
"unlock returns (errno = %d)\n"
, cb_errno));
XSRETURN_UNDEF;
}
CB_TRACE(1, (
"unlock returns OK\n"
));
XSRETURN_YES;
# $file->pack([$compress_memo])
# Pack removes all deleted reocords from the data file
# and also reindexes open index files. an its index and memo files to disk
# Calls d4pack, which returns 0, r4locked, r4unique or an error code < 0.
void
pack
(self, compress_memo = FALSE)
CodeBase::File
*self
Boolean compress_memo
CODE:
CB_TRACE(1, (
"pack(\"%s\", %s)\n"
, SELF, compress_memo ?
"TRUE"
:
"FALSE"
));
cb_errno = CB_SUCCESS;
if
( (d4pack(self->data4) != 0)
|| (compress_memo
CodeBase.xs view on Meta::CPAN
2016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055
CB_TRACE(1, (
"open_index error %d\n"
, cb_errno));
XSRETURN_UNDEF;
}
CB_TRACE(1, (
"open_index returns OK\n"
));
XSRETURN_YES;
# $file->check_indexes()
# Reindexes all index files open for the file.
# Calls d4reindex, which returns 0, r4locked, r4unique or an error code < 0.
void
check_indexes(self)
CodeBase::File
*self
CODE:
CB_TRACE(1, (
"check_indexes(\"%s\")\n"
, SELF));
cb_errno = CB_SUCCESS;
if
(d4check(self->data4) != 0)
{
CB_TRACE(1, (
"check_indexes returns error %d\n"
, cb_errno));
XSRETURN_UNDEF;
}
CB_TRACE(1, (
"check_indexes returns OK\n"
));
XSRETURN_YES;
# $file->reindex()
# Reindexes all index files open for the file.
# Calls d4reindex, which returns 0, r4locked, r4unique or an error code < 0.
void
reindex(self)
CodeBase::File
*self
CODE:
CB_TRACE(1, (
"reindex(\"%s\")\n"
, SELF));
cb_errno = CB_SUCCESS;
if
(d4reindex(self->data4) != 0)
{
CB_TRACE(1, (
"reindex returns error %d\n"
, cb_errno));
( run in 0.427 second using v1.01-cache-2.11-cpan-87723dcf8b7 )