# Store single hash key/value or array element in database.
##
my $self = shift->_get_self;
- my ($key, $value, $orig_key) = @_;
- $orig_key = $key unless defined $orig_key;
+ my ($key, $value) = @_;
if ( !FileHandle::Fmode::is_W( $self->_fh ) ) {
$self->_throw_error( 'Cannot write to a readonly filehandle' );
$value = $self->_storage->{filter_store_value}->( $value );
}
- $self->_engine->write_value( $self, $key, $value, $orig_key );
+ $self->_engine->write_value( $self, $key, $value);
$self->unlock();
# Fetch single value or element given plain key or array index
##
my $self = shift->_get_self;
- my ($key, $orig_key) = @_;
- $orig_key = $key unless defined $orig_key;
+ my ($key) = @_;
##
# Request shared lock for reading
##
$self->lock( LOCK_SH );
- my $result = $self->_engine->read_value( $self, $key, $orig_key );
+ my $result = $self->_engine->read_value( $self, $key);
$self->unlock();
# Delete single key/value pair or element given plain key or array index
##
my $self = shift->_get_self;
- my ($key, $orig_key) = @_;
- $orig_key = $key unless defined $orig_key;
+ my ($key) = @_;
if ( !FileHandle::Fmode::is_W( $self->_fh ) ) {
$self->_throw_error( 'Cannot write to a readonly filehandle' );
##
# Delete bucket
##
- my $value = $self->_engine->delete_key( $self, $key, $orig_key );
+ my $value = $self->_engine->delete_key( $self, $key);
if (defined $value && !ref($value) && $self->_storage->{filter_fetch_value}) {
$value = $self->_storage->{filter_fetch_value}->($value);
$self->lock( $self->LOCK_SH );
- my $orig_key;
if ( $key =~ /^-?\d+$/ ) {
if ( $key < 0 ) {
$key += $self->FETCHSIZE;
return;
}
}
- $orig_key = $key;
}
else {
- $orig_key = undef;
}
- my $rv = $self->SUPER::FETCH( $key, $orig_key );
+ my $rv = $self->SUPER::FETCH( $key );
$self->unlock;
return $rv;
}
+# Now that we have a real Reference sector, we should store arrayzize there. However,
+# arraysize needs to be transactionally-aware, so a simple location to store it isn't
+# going to work.
sub FETCHSIZE {
my $self = shift->_get_self;
$self->unlock;
-# if ($packed_size) {
-# return int(unpack($self->_engine->{long_pack}, $packed_size));
-# }
-
return $size;
}