|
libdballe
7.7
|
Fast cached access to the repinfo table. More...
#include <repinfo.h>
Public Member Functions | |
| SQLiteRepinfoBase (SQLiteConnection &conn) | |
| SQLiteRepinfoBase (const SQLiteRepinfoBase &)=delete | |
| SQLiteRepinfoBase (const SQLiteRepinfoBase &&)=delete | |
| SQLiteRepinfoBase & | operator= (const SQLiteRepinfoBase &)=delete |
| void | dump (FILE *out) override |
| Dump the entire contents of the database to an output stream. | |
Public Member Functions inherited from dballe::db::sql::Repinfo | |
| Repinfo (Connection &conn) | |
| void | to_record (int id, Record &rec) |
| Fill repinfo information in a Record based on the repinfo entry with the given ID. | |
| const char * | get_rep_memo (int id) |
| Get the rep_memo for a given ID; throws if id is not valud. | |
| int | get_id (const char *rep_memo) |
| Get the ID for a given rep_memo; throws if rep_memo is not valid. | |
| int | get_priority (int id) |
| Get the priority for a given ID; returns INT_MAX if id is not valid. | |
| void | update (const char *deffile, int *added, int *deleted, int *updated) |
| Update the report type information in the database using the data from the given file. More... | |
| std::map< std::string, int > | get_priorities () |
| Get a mapping between rep_memo and their priorities. | |
| std::vector< int > | ids_by_prio (const core::Query &rec) |
| Return a vector of IDs matching the priority constraints in the given record. | |
| int | obtain_id (const char *memo) |
| Get the id of a repinfo entry given its name. More... | |
Data Fields | |
| SQLiteConnection & | conn |
| DB connection. More... | |
Data Fields inherited from dballe::db::sql::Repinfo | |
| Connection & | conn |
Protected Member Functions | |
| int | id_use_count (unsigned id, const char *name) override |
| Return how many time this ID is used in the database. | |
| void | delete_entry (unsigned id) override |
| Delete a repinfo entry. | |
| void | update_entry (const sql::repinfo::Cache &entry) override |
| Update an entry using the new_* fields of entry. | |
| void | insert_entry (const sql::repinfo::Cache &entry) override |
| Insert an entry using the new_* fields of entry. | |
| void | read_cache () override |
| Reread the repinfo cache from the database. | |
| void | insert_auto_entry (const char *memo) override |
| Create an automatic entry for a missing memo, and insert it in the database. | |
Protected Member Functions inherited from dballe::db::sql::Repinfo | |
| const repinfo::Cache * | get_by_id (unsigned id) const |
| Get a Cache entry by database ID. | |
| const repinfo::Cache * | get_by_memo (const char *memo) const |
| Get a Cache entry by report name. | |
| int | cache_find_by_id (unsigned id) const |
| Lookup a cache index by database ID. Returns -1 if not found. | |
| int | cache_find_by_memo (const char *memo) const |
| Lookup a cache index by report name. Returns -1 if not found. | |
| void | cache_append (unsigned id, const char *memo, const char *desc, int prio, const char *descriptor, int tablea) |
| Append an entry to the cache. | |
| void | rebuild_memo_idx () const |
| Rebuild the memo_idx cache. | |
| std::vector< repinfo::Cache > | read_repinfo_file (const char *deffile) |
| Read cache entries from a repinfo file on disk. | |
Additional Inherited Members | |
Protected Attributes inherited from dballe::db::sql::Repinfo | |
| std::vector< repinfo::Cache > | cache |
| Cache of table entries. | |
| std::vector< repinfo::Memoidx > | memo_idx |
| rep_memo -> rep_cod reverse index | |
Fast cached access to the repinfo table.
| SQLiteConnection& dballe::db::sqlite::SQLiteRepinfoBase::conn |
DB connection.
The pointer is assumed always valid during the lifetime of the object
1.8.9.1