Download the PHP package simpletools/db-indexedfile without Composer
On this page you can find all versions of the php package simpletools/db-indexedfile. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download simpletools/db-indexedfile
More information about simpletools/db-indexedfile
Files in simpletools/db-indexedfile
Package db-indexedfile
Short Description High-throughput non-concurrent NoSQL key-value file-based database with a memory-backed index.
License BSD-3-Clause
Homepage http://www.getsimpletools.com/
Informations about the package db-indexedfile
High-throughput non-concurrent NoSQL key-value file-based database with a memory-backed index.
IndexedFile is a DB system allowing to very quickly process and store big amount of data by leveraging memory as an index while keeping all the other data on disk with high-throughput read and write engine.
To simplify snippets below, its assumed that the following namespaces are in use
:
Initialise Temp DB
To start a new temp DB which will get removed when the script terminates:
Initialise from existing DB
To start DB which might have already exists or which should persist after script terminate:
Setup a custom IndexStore
You can write your own IndexStore which implements IndexStoreInterface
and preset it with the following static method:
Storing data
Inserting/Replacing data by key
Storing data if not exists
Ignoring insert if key already exists
Reading data
Reading by key
Iterating through all entries
Iterating through all entires
Upserting data
Updating/Inserting your data
Removing data
Removing a key
Truncating database
Removing all entires
or when booting up
Sorting
Declare text sort
Declare integer sort
includeSortStats
flag adds to the indexed object _sort
meta field with position
in sort and percent
of total (integer only)
Own input and output files
Example of use for sorting by price and list with an iterator