CodeBase
view release on metacpan or search on metacpan
CodeBase.pm view on Meta::CPAN
=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
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
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
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.469 second using v1.01-cache-2.11-cpan-49f99fa48dc )