Sqlite3ProducerDb extends ProducerDb to implement storage of keys for the producer using SQLite3.
More...
#include <sqlite3-producer-db.hpp>
Sqlite3ProducerDb extends ProducerDb to implement storage of keys for the producer using SQLite3.
It contains one table that maps time slots (to the nearest hour) to the content key created for that time slot.
- Note
- This class is an experimental feature. The API may change.
ndn::Sqlite3ProducerDb::Sqlite3ProducerDb |
( |
const std::string & |
databaseFilePath | ) |
|
Create an Sqlite3ProducerDb to use the given SQLite3 file.
- Parameters
-
databaseFilePath | The path of the SQLite file. |
Add key as the content key for the hour covering timeSlot.
- Parameters
-
timeSlot | The time slot as milliseconds since Jan 1, 1970 UTC. |
key | The encoded key. |
- Exceptions
-
ProducerDb::Error | if a key for the same hour already exists in the database, or other database error. |
Implements ndn::ProducerDb.
Delete the content key for the hour covering timeSlot.
If there is no key for the time slot, do nothing.
- Parameters
-
timeSlot | The time slot as milliseconds since Jan 1, 1970 UTC. |
- Exceptions
-
Implements ndn::ProducerDb.
Get the content key for the hour covering timeSlot.
- Parameters
-
timeSlot | The time slot as milliseconds since Jan 1, 1970 UTC. |
- Returns
- A Blob with the encoded key.
- Exceptions
-
Implements ndn::ProducerDb.
Check if a content key exists for the hour covering timeSlot.
- Parameters
-
timeSlot | The time slot as milliseconds since Jan 1, 1970 UTC. |
- Returns
- True if there is a content key for timeSlot.
- Exceptions
-
Implements ndn::ProducerDb.
The documentation for this class was generated from the following file: