libdballe  9.11
sqlite/repinfo.h
1 #ifndef DBALLE_DB_V7_SQLITE_REPINFO_H
2 #define DBALLE_DB_V7_SQLITE_REPINFO_H
3 
4 #include <dballe/db/v7/repinfo.h>
5 #include <dballe/sql/fwd.h>
6 #include <vector>
7 #include <string>
8 #include <map>
9 
10 namespace dballe {
11 namespace db {
12 namespace v7 {
13 namespace sqlite {
14 
19 {
25 
27  SQLiteRepinfoV7(const SQLiteRepinfoV7&) = delete;
28  SQLiteRepinfoV7(const SQLiteRepinfoV7&&) = delete;
29  virtual ~SQLiteRepinfoV7();
30  SQLiteRepinfoV7& operator=(const SQLiteRepinfoV7&) = delete;
31 
32  void dump(FILE* out) override;
33 
34 protected:
36  int id_use_count(unsigned id, const char* name) override;
37  void delete_entry(unsigned id) override;
38  void update_entry(const v7::repinfo::Cache& entry) override;
39  void insert_entry(const v7::repinfo::Cache& entry) override;
40  void read_cache() override;
41  void insert_auto_entry(const char* memo) override;
42 };
43 
44 }
45 }
46 }
47 }
48 #endif
Forward declarations for public dballe/sql names.
int id_use_count(unsigned id, const char *name) override
Return how many time this ID is used in the database.
void read_cache() override
Reread the repinfo cache from the database FIXME: needed when rolling back a transaction, won&#39;t be needed anymore when repinfo is moved to Transaction instead of db.
void update_entry(const v7::repinfo::Cache &entry) override
Update an entry using the new_* fields of entry.
Fast cached access to the repinfo table.
Definition: sqlite/repinfo.h:18
dballe::sql::SQLiteConnection & conn
DB connection.
Definition: sqlite/repinfo.h:24
Fast cached access to the repinfo table.
Definition: repinfo.h:71
Definition: cmdline.h:18
void insert_entry(const v7::repinfo::Cache &entry) override
Insert an entry using the new_* fields of entry.
void insert_auto_entry(const char *memo) override
Create an automatic entry for a missing memo, and insert it in the database.
void delete_entry(unsigned id) override
Delete a repinfo entry.
void dump(FILE *out) override
Dump the entire contents of the database to an output stream.
repinfo cache entry
Definition: repinfo.h:24
Repinfo table management used by the db module.
Database connection.
Definition: sqlite.h:34