|
| __construct ($name, array $options=[ 'create_if_missing'=> true, 'error_if_exists'=> false, 'paranoid_checks'=> false, 'block_cache_size'=> 8 *(2<< 20), 'write_buffer_size'=> 4<< 20, 'block_size'=> 4096, 'max_open_files'=> 1000, 'block_restart_interval'=> 16, 'compression'=> LEVELDB_SNAPPY_COMPRESSION, 'comparator'=> NULL,], array $read_options=[ 'verify_check_sum'=> false, 'fill_cache'=> true,], array $write_options=['sync'=> false]) |
|
| get ($key, array $read_options=[]) |
|
| set ($key, $value, array $write_options=[]) |
|
| put ($key, $value, array $write_options=[]) |
|
| delete ($key, array $write_options=[]) |
|
| write (LevelDBWriteBatch $batch, array $write_options=[]) |
|
| getProperty ($name) |
|
| getApproximateSizes ($start, $limit) |
|
| compactRange ($start, $limit) |
|
| close () |
|
| getIterator (array $options=[]) |
|
| getSnapshot () |
|
|
static | destroy ($name, array $options=[]) |
|
static | repair ($name, array $options=[]) |
|
◆ __construct()
__construct |
( |
|
$name, |
|
|
array |
$options = [ 'create_if_missing' = , |
|
|
true |
, |
|
|
'error_if_exists' |
, |
|
|
false |
, |
|
|
'paranoid_checks' |
, |
|
|
false |
, |
|
|
'block_cache_size' |
, |
|
|
8 * |
2<< 20, |
|
|
'write_buffer_size' |
, |
|
|
4<< |
20, |
|
|
'block_size' |
, |
|
|
4096 |
, |
|
|
'max_open_files' |
, |
|
|
1000 |
, |
|
|
'block_restart_interval' |
, |
|
|
16 |
, |
|
|
'compression' |
, |
|
|
LEVELDB_SNAPPY_COMPRESSION |
, |
|
|
'comparator' |
, |
|
|
NULL |
, |
|
|
] |
, |
|
|
array |
$read_options = [ 'verify_check_sum' = , |
|
|
false |
, |
|
|
'fill_cache' |
, |
|
|
true |
, |
|
|
] |
, |
|
|
array |
$write_options = [ 'sync' = , |
|
|
false] |
|
|
) |
| |
- Parameters
-
string | $name | Path to database |
array | $options | |
array | $read_options | |
array | $write_options | |
◆ close()
◆ compactRange()
compactRange |
( |
|
$start, |
|
|
|
$limit |
|
) |
| |
◆ delete()
delete |
( |
|
$key, |
|
|
array |
$write_options = [] |
|
) |
| |
- Parameters
-
string | $key | |
array | $write_options | |
- Returns
- bool
◆ destroy()
static destroy |
( |
|
$name, |
|
|
array |
$options = [] |
|
) |
| |
|
static |
◆ get()
get |
( |
|
$key, |
|
|
array |
$read_options = [] |
|
) |
| |
- Parameters
-
string | $key | |
array | $read_options | |
- Returns
- string|bool
◆ getApproximateSizes()
getApproximateSizes |
( |
|
$start, |
|
|
|
$limit |
|
) |
| |
◆ getIterator()
getIterator |
( |
array |
$options = [] | ) |
|
◆ getProperty()
Valid properties:
- leveldb.stats: returns the status of the entire db
- leveldb.num-files-at-level: returns the number of files for each level. For example, you can use leveldb.num-files-at-level0 the number of files for zero level.
- leveldb.sstables: returns current status of sstables
- Parameters
-
- Returns
- mixed
◆ getSnapshot()
◆ put()
put |
( |
|
$key, |
|
|
|
$value, |
|
|
array |
$write_options = [] |
|
) |
| |
- Parameters
-
string | $key | |
string | $value | |
array | $write_options | |
◆ repair()
static repair |
( |
|
$name, |
|
|
array |
$options = [] |
|
) |
| |
|
static |
◆ set()
set |
( |
|
$key, |
|
|
|
$value, |
|
|
array |
$write_options = [] |
|
) |
| |
Alias of LevelDB::put()
- Parameters
-
string | $key | |
string | $value | |
array | $write_options | |
◆ write()
Executes all of the operations added in the write batch.
- Parameters
-
The documentation for this class was generated from the following file:
- src/spl/stubs/leveldb.php