5 function DbaPartition(&$dbm, $prefix) {
10 function open($mode = 'w') {
22 for ($key = $dbh->firstkey(); $key !== false; $key = $dbh->nextkey()) {
23 if (substr($key, 0, $n) == $prefix)
24 return (string) substr($key, $n);
33 for ($key = $dbh->nextkey(); $key !== false; $key = $dbh->nextkey()) {
34 if (substr($key, 0, $n) == $prefix)
35 return (string) substr($key, $n);
40 function exists($key) {
41 return $this->_h->exists($this->_p . $key);
44 function fetch($key) {
45 return $this->_h->fetch($this->_p . $key);
48 function insert($key, $val) {
49 return $this->_h->insert($this->_p . $key, $val);
52 function replace($key, $val) {
53 return $this->_h->replace($this->_p . $key, $val);
56 function delete($key) {
57 return $this->_h->delete($this->_p . $key);
61 return $this->_h->get($this->_p . $key);
64 function set($key, $val) {
65 return $this->_h->set($this->_p . $key, $val);
69 return $this->_h->sync();
73 return $this->_h->optimize();
81 // c-hanging-comment-ender-p: nil
82 // indent-tabs-mode: nil